Monday, December 30, 2013

How much IBM AIX JFS2 Filesystem RAM Overhead? j2_inodeCacheSize & j2_metadataCacheSize



The biggest takeaways from the stuff below:
AIX 6.1 defaults can result in ~14% of server memory eventually used for JFS2 inode and metadatacache.
AIX 7.1 defaults can result in ~7% of server memory eventually used for JFS2 inode and metadatacache.


*****
These details come from the location above.

j2_inodeCacheSize
range = 1:1000
previous default = 400 (~10% server memory)
AIX 7.1 default 200 (~5% server memory)
maximum value of 1000 = ~25% server memory

j2_metadataCacheSize
range = 1:1000
previous default = 400 (~4% server memory)
AIX 7.1 default = 200 (~2% server memory)
maximum value of 1000 = ~10% server memory

The metadata and inode cache never shrink.  Once they reach their configured size, contents begin to be retired so new contents can be cached.

If these cache portions are too large for a given server, the cache will continue to grow slowly until reaching maximum size.  The gradual increase in kernel memory used could put pressure on other memory uses if not accounted for.

On the other hand, if the inode or metadata cache is too small for the activity on a given server, the cache churn could result in a performance penalty. 


*****
Below is an excerpted question and answer from the URL immediately above, which seems to indicate that many folks have asked about the way that kernel memory on large memory servers grows over time.

Q5:What if the Inuse column in Used in AIX kernel & extension segments row grows over time?



A5:Growth of the Inuse column in Used in AIX kernel & extension segments row may seem like a memory leak.



Take, for example, the graph (to the right) of the Inuse column in Used in AIX kernel & extension segments row from the same AIX LPAR over a period of 26 days. AIX was rebooted on January 29, about four days before the first data point was collected. Memory used in AIX kernel & extension segments grew from 3386.81 MBs on Feb 3 to 4997.13 MBs on Mar 1. It does appear that there is a memory leak, but the following command (captured on March 1):



\# cat /proc/sys/fs/jfs2/memory_usage

metadata cache: 849981440

inode cache: 2129920000

total: 2979901440

\#



suggests that the growth in memory used by the AIX kernel & extensions can be addressed by tuning the AIX JFS2 i-node and metadata caches.



**Beware: The cat /proc/sys/fs/jfs2/memory_usage command above can crash AIX V6.1 TL0 and TL1 if the fix is not installed for APAR IZ06360: SYSTEM CRASH WHEN READING /PROC/SYS/FS/JFS2/MEMORY_USAGE (on TL0) or APAR IZ06954: SYSTEM CRASH WHEN READING /PROC/SYS/FS/JFS2/MEMORY_USAGE (on TL1).**

No comments:

Post a Comment