VMM and VxFS Chunking on AIX

book

Article ID: 100034294

calendar_today

Updated On:

Description

Error Message

No errors are reported.  CPU overhead whilst perform chunking will increase if the chunk size is set too small.

Resolution

Chunking prevents the current CPU from being monopolized when flushing and freeing pages for a large file that may be densely populated with pages that hold the file's data in memory. The page-flushing and page freeing operations disable interrupts on the CPU. This forces other threads scheduled on the same CPU to wait for interrupts to be re-enabled. Therefore chunking simply prevents interrupts from being disabled on a CPU for too long. 
The choice of chunking method can be made within VxFS using the following tuning command whilst no VxFS file systems are mounted:
 
vxtunefs –D dchunk_enable= value   Specifying a value of 1 enables the VMM chunking mode while  
also disabling the VxFS chunking mode. Specifying a value of 0
disables the VMM chunking mode, while also enabling the VxFS
chunking mode. To utilize the VMM chunking mode on AIX 6.1
and AIX 7.1, AIX operating system patches are required (please
see the table below). Due to requiring AIX patches,   dchunk_enable
has a default value of 0.
 
Verify the setting of the current value of  dchunk_enable   and other related tunables by running command vxtunefs –D print.  Please observe that upon completion of the command   vxtunefs –D dchunk_enable=1 , the dchunk_enable value (dchunk_enable 1) is automatically added to the /etc/vx/vxfssystem file. This will make the setting persistent across reboots. Please refer to   vxtunefs   man page in the attached  vxt unefs.1m.pd f  file for more details.

 
Tuning VxFS Chunking
VxFS chunking is used when  dchunk_enable   is set to 0. To set the chunk size used by VxFS when flushing a file and when freeing pages associated with a file run the following commands: 
 
 
vxtunefs –D chunk_flush_size= value    Sets the chunk size used by the file system when flushing a large  
file to disk. Value 0 disables chunked flushing, values of  1, 2, 3,
4, 5, 6 and 7 set chunk sizes of 256 MB, 128 MB, 64 MB, 32 MB, 
16 MB, 8 MB and 4 MB respectively. The default chunk size is 
128 MB. If a value of 1 has been specified for    dchunk_enable  
(i.e. VMM chunking is enabled instead of VxFS chunking) then
the value of  chunk_flush_size  is ignored.  
 
   vxtunefs –D chunk_inval_size= value    Sets the chunk size used by the file system when freeing  
(invalidating) memory pages associated with a large. Value
10 disables chunked invalidation, values of  1, 2, 3, 4, 5, 6, 7, 8,  
and 9 set chunk sizes of 256 MB, 128 MB, 64 MB, 32 MB, 16 MB, 
8 MB, 4 MB, 2 MB and 1 MB respectively . the default chunk size
is 8 MB. If a value of 1 has been specified for dchunk_enable  
(i.e. VMM chunking is enabled instead of VxFS chunking) then
the value of  chunk_inval_size  is ignored.
 
Verify the setting of the current value of   chunk_flush_size   and   chunk_inval_size    by running command    vxtunefs –D print
 
  Tuning VMM Chunking and prerequisites
VMM chunking is used when  dchunk_enable  is set to 1. To set the chunk size used by VMM when flushing a file and when freeing pages associated with a file run the following commands:
 
  vmo –p -o thrpgio_npages= value        This tunable is the VMM equivalent of the VxFS   
chunk_flush_size  tunable. Its value is specified in 4 KB pages. If
the value is set to 0, the VMM chunk flushing is disabled.  
Veritas recommends that you set it to a default value of 
8 MB by running:
 
# vmo −p −o thrpgio_npages=2048
 
  vmo –p -o thrpgio_inval= value            This tunable is the VMM equivalent of the VxFS   
chunk_inval_size  tunable. Its value is specified in 4 KB pages. If
the value is set to 0, the VMM chunk invalidation is disabled.  
Veritas recommends that you set it to a default value of 
8 MB by running:
 
# vmo −p −o thrpgio_inval=2048
 
Verify the settings by 
# vmo -Fa | grep thrpgio
                 thrpgio_inval = 2048
                 thrpgio_npages = 2048  
 
These are restricted tunables. The -F option forces display of restricted tunable parameters.


Before using the VMM chunking feature, you must install following AIX APARs. The table shows AIX operating system versions, their corresponding required APARs and the corresponding default settings for thrpgio_npages and thrpgio_inval tunables.
 
Operating SystemRequired APARsDefault APAR value for thrpgio_npages and thrpgio_inval tunables
AIX 6 TL6IV190240
AIX 6 TL7 SP4IV168391024
AIX 6 TL8IV16685, IV188461024
AIX 7 TL0IV165210
AIX 7 TL1 SP4IV16765, IV187781024
AIX 7 TL2IV17138, IV193721024
 
For more tunables please refer to the vxtunefs  man page in the attached  vxtunefs.1m.pdf  file.


Applies To

Any environment with VxFS release 5.1SP1RP3 and above running on AIX 6.1 TL6 or newer and AIX 7.1 TL0 or newer (see the Table with AIX APARs below) offers this tuning functionality.

Issue/Introduction

Since VxFS 5.1SP1RP3 release (also including 6.0.1 onwards), for the AIX platform only, there is now a choice of "chunking" for buffered i/o.  
 
VxFS file data is held in memory using pages. Chunking mechanisms perform flushing and/or freeing of pages associated with a VxFS file in chunks, as opposed to flushing or freeing all the pages associated with a file in a single operation. Thus "chunking" refers to a section of a file that is being flushed, or having its pages freed, in a single operation before then moving to the next section (of equal size) of the file – in other words we are “chunking down the file” rather than performing a single operation on the entire file.
 
There are now two methods of performing "chunking", VxFS chunking and Virtual Memory Management [VMM] chunking. The two mechanisms are mutually exclusive. The VxFS chunking mechanism is enabled by default. The VMM chunking mechanism is considered more efficient, however VMM chunking requires pre-installed AIX patches. Eventually the VxFS chunking mechanism will be phased out, but for now we have two chunking mechanisms to choose from.

 
Each chunking mechanism has two tunables, one tunable determines the chunk size whilst flushing a file, the other tunable determines the chunk size whilst freeing pages associated with a file (we call freeing of pages - page invalidation).
 
This document intends to explain the tunable names, how to set chunk size values and how to switch between the two chunking mechanisms.

Attachments

vxtunefs.1m.pdf get_app