z/OS DFSMSdfp Advanced Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


HFS Deferred File System Synchronization

z/OS DFSMSdfp Advanced Services
SC23-6861-01

Normal HFS disk hardening executes under a sync daemon that runs periodically to write out all file and metadata changes that have occurred since the last time the sync daemon ran. If a large number of files are created, modified, or deleted within the time span that is between the file system sync intervals, then with the next file system sync, these file changes are collected and the disk version of the file system is sync'ed with a greatly reduced number of media manager calls. This reduces the actual I/O activity.

The reduced I/O can have a dramatic effect on performance, because the default sync daemon interval is one minute. The sync daemon runs in the OMVS address space and is independent of any user request to the file system.

When the sync daemon runs, all the HFS changes are batched into one large I/O request that gets passed to the media manager. The intent is to perform one long I/O operation to the HFS on disk. However, even with optimal conditions, where the HFS resides on one volume and is contained within a single extent, it is necessary to have a few media manager calls during the disk hardening I/O operation. If the HFS has multiple extents or resides on multiple volumes, multiple channel programs must be built, because a single I/O operation cannot span multiple extents.

In addition to the sync daemon interval, HFS also supports the individual file sync (fsync). The fsync can be performed at any time by the application program. However, be aware that an fsync will result in the entire file system being sync'ed. It is very important to note that during the HFS file system sync operation, the sync task runs independently of the users that are currently accessing the HFS. When the sync task runs, it obtains an exclusive latch for the file system being sync'ed. This latch is held for the duration of the file system sync operation. While this latch is held UNIX system services users of the HFS file system will not be able to access the HFS. When the sync task runs, the HFS must:

  1. Update all of the new or changed files' metadata
  2. Delete structures for any removed files
  3. Update the internal HFS storage maps within the HFS attributes directory
  4. Call the media manager to perform the I/O operation that makes the changes to the disk version of the HFS data set.

The I/O operation is synchronous, which means that HFS sync task will be suspended for the duration of the media manager call. Normally, this file system sync lockout condition is brief, lasting for a few seconds, and is rarely noticed by the end user. However, in some situations the file system sync lockout could last much longer. The duration of the lockout depends on the sync interval, the amount of work that must be performed by the SYNC task, and the performance of the I/O subsystem.

To minimize the effect on applications from the file system sync operations that take a long time to complete, you can do one or more of the following:

  1. Mount the affected HFS with a shorter sync interval. This will reduce overall HFS performance, but the sync lockout will not be as long.
  2. Split the HFS into two or more smaller HFS data sets.
  3. Avoid high impact commands such as "rm -R" on large directories.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014