Operating System - HP-UX
1833714 Members
2335 Online
110063 Solutions
New Discussion

Re: How to Set Max Memory for User Account

 
DJR
Advisor

How to Set Max Memory for User Account

Hi All-

We are running HP-UX 11i v2 are have our webMethods application running the server (4 CPU x 16 GB RAM).

I would like to know if there is a way to set the maximum amount of memory that the wM application account (the "webm" user) can use. For example, I would like to limit the "webm" account to be able to use no more that half of the total RAM on this server. Thus any processes that this user spawns could consume a max of 8 GB of RAM.

How can I go about doing this?

Thanks in advance for your assistance!

Regards,
Darren
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: How to Set Max Memory for User Account

Shalom Darren,

ulimit.

Generally we place them in /etc/profile so the users can't just increase them.

For certain users like oracle that need more we modify the .profile for those users.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wim Rombauts
Honored Contributor

Re: How to Set Max Memory for User Account

Do you really mean 8GB per process ? Then ulimit is the way, but the user can easily start 10 processes and consume up all memory.

If you want a per-user limit (all processes of the user together), I guess you need something like PRM or WLM to limit memory usage.
Don Morris_1
Honored Contributor

Re: How to Set Max Memory for User Account

I don't think ulimit suffices.

You could set the RLIMIT_AS equivalent (total address space for the process), but that only limits virtual address space for that process itself (which isn't RAM either, you can eat 8Gb of virtual space but only touch 1 page). Fork a few children -- and you're over the desired limit. ulimit plus playing with the fork limit tunables might do it... but it seems rather hacky.

I think a better fit here is the PRM (Process Resource Manager) product. That will let you place several different categories (application, user, group, etc.) into memory resource partitions such that you'll get this sort of behavior.

Take a look at the PRM documentation at:
http://h20338.www2.hp.com/hpux11i/cache/317534-0-0-225-121.html
to see if it fits your needs (there's also ordering information, etc. there).
DJR
Advisor

Re: How to Set Max Memory for User Account

Thanks for the quick responses everyone!

I am not looking to limit memory per process currently (allthough it would be useful to understand how I could do that at some point in the future).

Currently, I need to know how to limit the max total memory that can be allocated to a single user to run all thier processes.

Cheers,
Darren
Don Morris_1
Honored Contributor

Re: How to Set Max Memory for User Account

Right -- which is what PRM or WLM (which includes PRM from my quick read of the documentation) can do for you.