Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Using svmon to display available memory on IBM AIX

Introduction

Did you know that you can use the IBM® AIX® svmon command to display available memory? No? Well, in this article let’s take a quick look at the behavior of AIX free memory and paging to paging space on most systems today.

Determining free memory on AIX

It is very common for AIX systems to report that all memory (that is, 100%) has been utilized. 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 that is, the memory is pageable and can be stolen to make free memory.

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

Figure 1. AIX memory utilization graph

image 1

So even though the system appears to be low on memory it really isn’t. The system is running with approximately 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 (that is, paging space page outs/ins, shown with vmstat -s).

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

For example:

code

It’s a very quick way to eye-ball how much free memory is available (in MB or GB) on a given system. The svmon command reports this 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. After the available memory is depleted, AIX will have to start paging out to paging space.

Summary

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 behavior 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 or rectify this kind of behavior on your AIX system.

Chris Gibson