AIX EXTRA: Tuning AIX With ioo and vmo
The vmtune command that systems administrators have historically used to tune I/O and memory usage on AIX systems is being replaced by the vmo and ioo commands, which provide many of the same facilities. ioo handles all the I/O-related parameters, while vmo handles the virtual memory management ones.
When using these commands to tune systems, it's imperative to test all of your chosen options in advance on a test server, as not everyone will realize the same results from these commands and the various options chosen. Recommendations I make in this article have been used on multiple systems, but I can't guarantee them for every environment.
The ioo parameters to tune include:
- minpgahead and maxpgahead
- j2_minpgahead and j2_maxpgahead
The vmo parameters are:
- minfree and maxfree
- minperm, maxperm and maxclient
minpgahead and maxpgahead determine the number of pages to be read ahead when the system determines it's reading sequential data. The primary reason for tuning these is to enhance performance for programs that access large files sequentially. Basically, the first access to the file causes the first page to be read in. If the program goes directly to the next page without accessing any other pages in the file, the Virtual Memory Manager (VMM) determines that the application is using sequential access and reads in the requested page plus the next set of (minpgahead) pages. So, if minpgahead is set to two, it reads in the next two pages as well as the requested one. As the application continues reading sequentially, the VMM doubles minpgahead each time to determine how many pages to read in, with maxpgahead determining the cap (default is eight). Sequential read-ahead terminates when the application ends or accesses a page out of order.
You can tune these values separately for normal file systems (jfs) and enhanced file systems (jfs2) by setting the values for minpgahead/maxpgahead for jfs and j2_minpgahead and j2_maxpgahead for jfs2 filesystems.
While maxpgahead goes up to 4096 (in powers of two), IBM recommends that you don't exceed 512, due to kernel limitations. A good starting point is minpgahead=2 and maxpgahead=16 for a 64 KB stripe size. If you do increase maxpgahead, you'll also need to increase the vmo maxfree parameter, which should always be >= to minfree plus maxpgahead.