Go Premium for a chance to win a PS4. Enter to Win


AIX Real Memory Allocation, % Comp memory and Non Comp or Client Memory

Posted on 2010-08-19
Medium Priority
Last Modified: 2013-11-17

I need to allocate 85% of my real memory to be utilized by %Comp Processes and remaining 15% by non comp (Client) processes. Currently there are issues with memory allocation.

Can someone please tell me how to do that?

Extra information- if it helps in helping me set that up
i already have to test servers which have that setting of 85% Comp and 15% Client on them already.

Question by:assistunix
  • 8
  • 6
LVL 68

Accepted Solution

woolmilkporc earned 2000 total points
ID: 33482681
I guess you're talking abaout a database server doing asynchronous I/O or using raw devices?
Else such a setting would cost a bit too much filesystem cache, I think.
What are your "memory issues"?
Anyway, the command to use here is "vmo" (Virtual Memory Options).
To check your current settings issue
vmo -a  ( vmo -F -a under AIX 6)
and examine maxclient%, maxperm% and minperm%.
To achieve your desired settings, issue
vmo -o minperm%=10
vmo -o maxperm%=15
vmo -o maxclient%=15

To make these settings permanent across reboots add the "-p" flag -
vmo -p -o minperm%=10
vmo -p -o maxperm%=15
vmo -p -o maxclient%=15

PERM memory is used for file pages, CLIENT memory is essentially the same (with some specifics for JFS2 and NFS, which can be ignored here). The remainder is in a way "reserved" for working storage pages (%Comp).
These settings will be applied immediately, but since AIX is somewhat "conservative" in its memory management it will need some time to adjust its memory usage.
Also, the values will not really be taken "seriously". If not needed for COMP, AIX will use more memory for PERM than is set with maxperm%.
To avoid this, and to speed up memory adjustment, you could additionally set strict_maxclient = 1 and strict_maxperm = 1.
I don't recommend this, because it will cause very high page in/page out activity for a while, and will withdraw all flexibility in memory management (with the strict settings there will never be more than maxperm% file pages, regardless of whether the rest is really needed for COMP or not).

Author Comment

ID: 33482732
While googling i found some information that may be related to my question

"OS automatically manages the size of Comp and Non-comp space. It decides the value depending on vmstat parameters (minperm, maxperm and numperm). numperm is the real-time value. numperm should always be in between minperm and maxperm. "

I believe that i have to change vmstat parameters to allow %COMP memory to use 85% of the memory and non comp client to use 15%.   Can someone confirm that?

Also if what stated above is correct, how would i go about changing the vmstat parameters and WHAT parameters do i have to change for my task?  (minperm? maxperm? numperm? are there any other parameters that need to be changed as well such minclient or maxpin?

Real Memory is size is 10240MB.
LVL 68

Expert Comment

ID: 33482761
See my comment.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 68

Expert Comment

ID: 33482778
numperm is a calculated value and cannot be changed.
minclient does not exist.
maxpin% is by default 80% and suitable for ALL normal situations (maybe except for benchmarking).

Author Comment

ID: 33482838
Hi thank you for your quick response and sorry for my comment, i wrote my comment before your reply and sent it after your reply.

So just to reiterate, to allocate 85% memory to %comp and 15% memory to non comp(client)

i need to change  three parameters
vmo -o minperm%=10
vmo -o maxperm%=15
vmo -o maxclient%=15

can you explain the- 10,15,15 value meaning?

also you said vmo -p -o minperm%=10  is for permanent change across reboots,
does that mean that vmo -o minperm%=10  is temporary only for current session and will revert back to old setting after a reboot?

Thanks again.

Author Comment

ID: 33482847
it is AIX 6.1

Author Comment

ID: 33482891
My Current setting are
LVL 68

Expert Comment

ID: 33482928
with AIX 6.1 the query should contain the "-F" flag to display the so-called "restricted parameters" along with the non-restricted ones. Not needed with "-o".
>> can you explain the- 10,15,15 value meaning? <<

100% minus (desired value of 85% for COMP) = 15%
Thus we set maxperm% to 15. Since maxclient% is essentially the same as maxperm% we set it to 15 as well.
minperm% should be lower than maxperm%, thus we set it to 10. This value will probably not have any real influence, because with a setting of maxperm% to as low as 15 PERM will always be near 15%, I guess.
>> does that mean that vmo -o minperm%=10  is temporary only for current session and will revert back to old setting after a reboot? <<
Exactly! "-p" will create an entry in /etc/tunables/nextboot, a file which is read and executed at ... nextboot.

"man vmo" gives some good explanation, "vmo -h tunable" gives help for the specified parameter tunable, and here is the "official" IBM guide -
LVL 68

Expert Comment

ID: 33482935
>> My Current settings are  minperm%=3 <<
You can leave this value as is. It's not really important.


Author Comment

ID: 33485172
Thank you for that.

Coming back to the memory issue that started this question.

The memory issue that we are facing is that a component which requires about 7.5gb memory on an AIX server with 10gb real memory is getting this error

/rv/src/8_1_2/rvd/router.c:2814: Memory Allocation failed.

can you please advise on how to resolve and get around this issue.?
i thought that changing the comp memory would work but i am not sure if that is the ideal way to do so or not.

What would you suggest to would be the best way to deal with this error and resolve it?

Thank you again.

LVL 68

Expert Comment

ID: 33485441
I think this isn't related to maxperm% or the like.
It could have to do with user limits.
Edit /etc/security/limits (as root) and add a stanza for the user normally running the failing program (if it's not already there) and add values of  "-1" for data, rss, data_hard and rss_hard, like this (assuming your user is myuser) -
        data = -1
        rss = -1  
        data_hard = -1
        rss_hard = -1  
Recycle the process in question, or if the user is logged in when starting it, have them logout and re-login.
If this doesn't help - is the program in question 32-bit?
If so, we might have to manipulate the LDR_CNTRL variable.
But please try the "limits" approach first.

Author Comment

ID: 33485786
Thank you very much. :) for your assistance.

For now the issue has been routed back to application team, but if it comes back i will surely try the /etc/security/limits method.

All in all, thank you once again.

Your rank truly justifies you. Genius.!!!
LVL 68

Expert Comment

ID: 33485839
Thank you for the points and the nice compliment.
You're always welcome!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question