System Administration
Showing results for 
Search instead for 
Did you mean: 

about real memory utilization

Frequent Advisor

about real memory utilization

From the output of vmstat we are getting the number of active virtual pages and free memory in size.

To calculate the amount of real memory being used at a particular time, can we multiply the avm value with the size of each page.

Please let me know your views.


Don Morris_1
Honored Contributor

Re: about real memory utilization

No, not at all. Virtual page consumption only relates to Real page consumption in that it is pretty rare to have a real page consumed but without a corresponding virtual page (hence Virtual page consumption tends to be at least Real Page consumption, but typically is much, much more).

Quick example:

Use malloc() to malloc() 1Gb. This is virtual memory, and virtual pages goes up by 1Gb / sysconf(_SC_PAGE_SIZE). Nothing has been touched, however -- so Real page consumption stays the same.

Touch one byte within the range -- and some number (may be 1, may be more depending on what the OS thinks will help your performance) of Real pages are brought in (but typically less than the 1Gb unless you explicitly ask for that via chatr flags). Virtual is unchanged.

It would be much simpler to get the total memory on the system (which is invariant before 11iv3, once you move into 11iv3 and later -- you need to just ask whenever you report this) via pstat_getstatic() or other such interfaces and then subtract the free memory (Total - Free = Used).