Using svmon to display available memory on AIX

Author: Chris Gibson

Published: 21st October 2019

 

Did you know that you can use the AIX svmon command to display available memory? No? Well let’s take a quick look at the behaviour of AIX free memory and "paging to paging space" on most systems today.

 

It is very common for AIX systems to report all memory consumed i.e. 100% utilisation. However, this does not necessarily mean that the system does not have any free memory!

 

AIX will use any and all "free" memory for the file system cache BUT this memory is also the primary candidate for page replacement i.e. the memory is pageable and can be stolen to make free memory.

 

For example, on the AIX LPAR below (which is running DB2), computational memory (the purple section, Process%, in the diagram below) is the DB2 database and related code in memory. This is consuming around 80% of real memory. This is acceptable. The yellow-ish section (highlighted in the red box, FScache%, in the diagram below) is memory used for file system cache. This is non-persistent memory, which means it can and will be sacrificed if/when it is required for computational memory workload. In other words, it is, in fact, free (available) memory. The system will start to consume this chunk of memory, before it starts to page out to paging space.

 

 

 

So even though the system appears to be "low on memory" it really isn't. The system is running with ~80% computational memory usage. Leaving around 20% of memory for file system cache (which is essentially free memory). This is acceptable. We only start to worry about a lack of real memory when computational memory is in the mid to high 90s and/or the system is starting to page to paging space (i.e. paging space page outs/ins, shown with vmstat -s).

 

The svmon command can show you how much "available" memory there is on a system.

 

 

For example:

 

 

 

It's a very quick way to "eye-ball" how much memory is free (available) (in MB or GB) on a given system. I like, very much, that svmon will report "available memory" as this is the amount of memory available to applications. It includes memory in the file cache. The basic idea is that a user can consume the "available memory" without causing the system to start paging to paging space. Once "available memory" is depleted, AIX will have to start paging out to paging space.

 

Now, having said all of that, if the AIX system has, in fact, paged out to paging space but there’s still free memory, then this should be investigated further. This behaviour isn’t considered normal (or acceptable). It could be the by-product of several things such as poor memory placement (the SRAD) for the LPAR or perhaps an AIX defect. In my next post I’ll talk about how to identify poor memory placement for an LPAR and how you can alleviate and/or rectify this kind of behaviour on your AIX system.

 

For more information on the svmon command, please refer to the following links:

 

https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_svmon.html

 

https://www.ibm.com/support/knowledgecenter/ssw_aix_72/s_commands/svmon.html