Date: June 5, 2006
The AIX "lru_file_repage" is a new memory tuning option that solves the problem of having to limit JFS2 file cache to guarantee memory for applications like databases. It is available starting with AIX 5.2 ML5 and AIX 5.3 ML2. It can be set using the "vmo" command or via "smit tuning => Memory". Here's how it works.
AIX classifies memory into two categories: file cache and working storage. Over time, memory use grows with both types of memory. AIX will eventually need to free memory, and it can do so by freeing either file cache or working storage. To maximize performance, you'd want AIX to release the type of memory not being used by the application. So for databases, which use working storage, you would want AIX to release file cache memory first. To do so in the past, you would put a strict limit on JFS2 file cache memory using maxclient. It is not unusual to see database servers with file cache limited to 15% of total memory. However, a strict limit is not always desirable.
The new "lru_file_repage" option solves this problem. By setting "lru_file_repage=0", AIX only frees file cache memory. This guarantees working storage stays in memory, and allows file cache to grow.
So in the past you might have set maxclient at 20% for database servers. Today you could set maxclient at 90% and "lru_file_repage=0". The exact setting will vary based on your application and amount of memory. Contact IBM Support if you need help determining the optimum setting.
Upate 6/8/06: Barry Saad's lru_file_repage tip
Update 6/20/06: A customer reported this approach can cause excessively high paging when there are multiple, unbalanced memory pools. In this case, IBM Support suggested disabling memory affinity. If you run into this behavior, I recommend calling IBM Support and reference this tip.
Bruce Spencer,
baspence@us.ibm.com
June 5, 2006