- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to limit resident set size of a process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 01:11 AM
тАО05-14-2009 01:11 AM
how to limit resident set size of a process
I wonder if there is a way to limit resident set size of a process on HP-UX 11.23 or 11.31?
My 64 bit program allocates for its caches lots of memory using malloc(). As a result its size is about 10 Gb according to the top command. I think it is useful to set a certain limit on the size of resident set of the process (for example 5GB) so that other applications also have enough free memory.
So my questions are:
1) If limiting the resident set size is necessary for archiving this goal?
2) How can I restrict the resident set size of the process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 01:19 AM
тАО05-14-2009 01:19 AM
Re: how to limit resident set size of a process
If I understand your question, limitation on process memory use can be done with the kernel settings on the system.
http://docs.hp.com/en/939/KCParms/KCparams.OverviewAll.html
See maxdsiz and maxsiz
I don't see anything that permits an adjustable hard limit on allocation, but with some work and research you might be able to get the job done.
If this involves shared memory, some manipulation may work there as well. Note, though this can have a negative impact on other applications.
Specifics:
1) No, I would set the limits within your application code.
2) This is in my opinion an issue best dealt with in the application. I would see the documentation on malloc and see if you can code in a limit.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 01:59 AM
тАО05-14-2009 01:59 AM
Re: how to limit resident set size of a process
Let me clarify my situation.
First, it doesn├в t involve shared memory.
Second, I have already thought of setting maxdsiz_64bit but as far as I understand it is not what I want. If I set it to let say 5 GB then I will not be able to allocate in total more memory than 5 GB. But it is not that I want. I want to let the application allocate as much memory as it needs (but no more than maxdsiz_64bit bytes) but also I want its resident set size (measured using the top command) to be lower than a certain level so that other applications have enough memory. So, for instance if the size of the process is 12 GB and the limit of resident set size is 5 GB then 7GB of the process is in the swap.
As for your suggestion about limiting within the application code it is really feasible as it will require rewriting a lot of the application and changing the way its caches operates. Moreover I believe is should be sort of OS feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 02:03 AM
тАО05-14-2009 02:03 AM
Re: how to limit resident set size of a process
First, it does not involve shared memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 02:45 AM
тАО05-14-2009 02:45 AM
Re: how to limit resident set size of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 05:18 AM
тАО05-14-2009 05:18 AM
Re: how to limit resident set size of a process
Seems like PRM memory resource groups might be useful. I need to read more about them to be certain about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 08:34 PM
тАО05-14-2009 08:34 PM
Re: how to limit resident set size of a process
>2) How can I restrict the resident set size of the process?
Just let the kernel handle this. HP-UX will dynamically adjust the resident set size depending on the memory pressure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 09:09 PM
тАО05-14-2009 09:09 PM
Re: how to limit resident set size of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2009 07:28 AM
тАО05-15-2009 07:28 AM
Re: how to limit resident set size of a process
Just would like to ask about that memory pressure. Ho do I measure when it is high and when it is low? My current understanding is that I should use the vmstat command. If the column po is low then the memory pressure is low. If there are a lot of page outs during work of my application and other applications and what even worse their number keep rising then probably I should think of increasing amount of RAM. Am I right?
- Tags:
- vmstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2009 12:34 PM
тАО05-15-2009 12:34 PM
Re: how to limit resident set size of a process
Yes, or use glance.
>If there are a lot of page outs during work of my application and other applications ... then probably I should think of increasing amount of RAM. Am I right?
Yes.
Don is the VM guru. I'm surprised he misunderstood your question. He assumed you were asking about mafia hit men, instead of traffic cops. ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 02:38 AM
тАО05-18-2009 02:38 AM
Re: how to limit resident set size of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 02:42 AM
тАО05-18-2009 02:42 AM
Re: how to limit resident set size of a process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2009 02:06 PM
тАО05-18-2009 02:06 PM
Re: how to limit resident set size of a process
pst_rssize resident set size for process (private pages)
pst_maxrss highwater mark for proc resident set size
- Tags:
- pstat