珍珠棉异形件:Disk I/O pacing

来源:百度文库 编辑:中财网 时间:2024/04/27 15:50:42

Disk I/O pacing

Disk-I/O pacing is intended to prevent programs that generate very large amounts of output from saturating the system's I/O facilities and causing the response times of less-demanding programs to deteriorate.

Disk-I/O pacing enforces per-segment, or per-file, high and low-water marks on the sum of all pending I/Os. When a process tries to write to a file that already has high-water mark pending writes, the process is put to sleep until enough I/Os have completed to make the number of pending writes less than or equal to the low-water mark. The logic of I/O-request handling does not change. The output from high-volume processes is slowed down somewhat.

You can set the high and low-water marks system-wide with the SMIT tool by selecting System Environments -> Change / Show Characteristics of Operating System(smitty chgsys) and then entering the number of pages for the high and low-water marks or for individual file systems by using the maxpout and minpout mount options.

The maxpout parameter specifies the number of pages that can be scheduled in the I/O state to a file before the threads are suspended. The minpout parameter specifies the minimum number of scheduled pages at which the threads are woken up from the suspended state. The default value for both the maxpout and minpout parameters is 0, which means that the I/O pacing feature is disabled.

Changes to the system-wide values of the maxpout and minpout parameters take effect immediately without rebooting the system. Changing the values for the maxpout and minpout parameters overwrites the system-wide settings. You can exclude a file system from system-wide I/O pacing by mounting the file system and setting the values for the maxpout and minpout parameters explicitly to 0. The following command is an example:
mount -o minpout=0,maxpout=0 /
Tuning the maxpout and minpout parameters might prevent any thread that is doing sequential writes to a file from dominating system resources.

The following table demonstrates the response time of a session of the vi editor on an IBM? eServer? pSeries? model 7039-651, configured as a 4-way system with a 1.7 GHz processor, with various values for the maxpout and the minpout parameters while writing to disk:

Value for maxpoutValue for minpoutdd block size (10 GB)write (sec)Throughput (MB/sec)vi comments001000020149.8after dd completed33241000042023.8no delay65321000029134.4no delay129321000031232.1no delay129641000026637.6no delay257321000031631.6no delay257641000034129.3no delay2571281000022344.8no delay513321000024041.7no delay513641000023742.2no delay5131281000022045.5no delay5132561000020648.5no delay5133841000020648.53 - 6 seconds 7695121000020349.315-40 seconds, can be longer7696401000020748.3less than 3 seconds1025321000022444.6no delay1025641000021446.7no delay10251281000020947.8less than 1 second10252561000020449.0less than 1 second10253841000020349.33 seconds10255121000020349.325-40 seconds, can be longer10256401000020249.57 - 20 seconds, can be longer10257681000020249.515 - 95 seconds, can be longer10258961000020947.83 - 10 seconds

The best range for the maxpout and minpout parameters depends on the CPU speed and the I/O system. I/O pacing works well if the value of the maxpout parameter is equal to or greater than the value of the j2_nPagesPerWriteBehindCluster parameter. For example, if the value of the maxpout parameter is equal to 64 and the minpout parameter is equal to 32, there are at most 64 pages in I/O state and 2 I/Os before blocking on the next write.

The default tuning parameters are as follows: ParameterDefault Valuej2_nPagesPerWriteBehindCluster32j2_nBufferPerPagerDevice 512

For Enhanced JFS, you can use the ioo -o j2_nPagesPerWriteBehindCluster command to specify the number of pages to be scheduled at one time. The default number of pages for an Enhanced JFS cluster is 32, which implies a default size of 128 KB for Enhanced JFS. You can use the ioo -o j2_nBufferPerPagerDevice command to specify the number of file system bufstructs. The default value is 512. For the value to take effect, the file system must be remounted.