AIX Tip of the Week

Subject: Tuning JFS2 Filesystem Buffers

Audience: All

Date: October 9, 2006

JFS2 buffers often needs to be tuned for I/O intensive applications. The performance gains can be large. Last month I was involved in a stress benchmark where JFS2 tuning improved batch performance by a factor of three.

To determine if your AIX system needs JFS2 tuning, run the "vmstat -v" command several times over a period of 10-30 minutes during peak processing. If the number of "I/O's blocked with no fsbuf" increases with time, you need to increase JFS2 buffers.

Increasing JFS2 buffers is straightforward. Simply increase the j2_dynamicBufferPreallocation setting via AIX's "ioo" command (or smit tuning => "Tuning I/O Parameters"). This is a dynamic setting, and takes effect immediately. Increase this setting until the "I/O's blocked" stop increasing with time.

You may have noticed this method differs from how we tuned JFS2 in the past, In the past we would increase j2_nBufferPerPagerDevice and the filesystem would have to be unmounted/remounted. The "ioo" command line help says the j2_nBufferPerPagerDevice is still relevant, but not the preferred tuning method. See the command line help:

ioo -h j2_dynamicBufferPreallocation
ioo -h j2_nBufferPerPagerDevices

My guidelines for initial settings when running I/O intensive applications are as follows:

  1. Set j2_nBufferPerPagerDevice to 2048.
  2. Monitor "vmstat -v". Increase j2_dynamicBufferPreallocation as necessary

My reasoning is that j2_nBufferPerPagerDevice doesn't take a lot of memory, and increasing this parameter is "insurance" against having to unmount/mount the filesystem.

Finally, you should be aware that there are other options for tuning I/O (j2_maxPageReadAhead, DIO, CIO). However, I've found tuning the JFS2 buffers is the most used option. If you need help, call IBM Support.


Bruce Spencer,
baspence@us.ibm.com

October 9, 2006