AIX understanding memory using

Hello,

I would like to understand better in AIX memory use

[root@xxx] / > svmon -G -O unit=MB
Unit: MB
--------------------------------------------------------------------------------------
               size       inuse        free         pin     virtual  available   mmode
memory      9216.00     2325.38     6890.62      896.11     1943.12    6975.40     Ded
pg space   18944.00        8.48

               work        pers        clnt       other
pin          539.12           0        9.23      347.75
in use      1943.12           0      382.26

So I can say that, my total free RAM is : free (2325.38) + available (1943.12) = 4268.5 MB ???
So what are pin/virtual meaning here?

please see this link HOWTO: analyze memory usage on AIX, aka svmon << 101 >> AIX � My AIX Cheatsheet

2 Likes

Basically you have three types of memory in an AIX system: "used" and "unused" and the "used" category divides into two parts: "computational" and "file" memory.

"unused" is memory the kernel has absolutely no use for. In a longer running (and correctly tuned) system this is near to zero.

"computational" memory is the memory used by loaded and running programs.

"file" memory is basically cache. All the memory not used for programs (but not strictly set aside by tuning provisions) is added to the file cache - over time. The kernel will only make use of memory to cache file access if it has an idea what to cache. This is why freshly started systems have lots of free memory. The kernel simply doesn't know what to put into the cache and therefore doesn't allocate a lot of it.

Should RAM become used over time and more computational memory is needed (i.e. more programs are started) the file cache is diminished accordingly or regrown again should memory become free again. The tuning parameters "numperm", "minperm", "maxperm", "minclient" and "maxclient" deal with how and when exactly file memory is turned into computational memory and vice versa. There is a daemon - the "least recently used daemon" or "lrud" for short - which constantly scans memory pages and decides when they should be claimed as "computational" or "file". What it is doing exactly shows in the output of vmstat -vs , i.e. "revolutions of the clock hand" means: since the last start the lrud has scanned the whole memory that often completely. If this value is fast growing you know that even if memory is not scarce right now it is at the brink of being exhausted and paging will start soon if any more memory is needed.

You may want to consult my "Most Incomplete Guide to Performance Tuning" for a more thorough (though not complete - this is a complex area) discussion about memory management in UNIX systems in general and how to assess it.

I hope this helps.

bakunin

6 Likes

well I would like to add that you need to make sure that you always always need to have enough real free memory to support the IOs your system needs to do. If you dont, your system will stop ALL work and starts scanning and freeing up memory pages until there is sufficient free memory available and than restarts processing. If you are very low in free memory and your system had to do this frequently on a box with lots of IO, like a DB box, this is much worse for your performance than if you would run from paging space and it can grind a busy box to a complete halt - a fact that IBM support to this day prefers to completely ignore.

3 Likes

This is always true, not only for AIX.
For example in Linux, paging is the better alternative to its awful "OOM killer".
Always gives the system some swap!

Moderator comments were removed during original forum migration.