HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: memory reports in top and ps!!!
Operating System - HP-UX
1834645
Members
2514
Online
110069
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
01-15-2002 08:56 AM
01-15-2002 08:56 AM
Hi!
I try to understand how memory is used on my HP-UX 11 server.
Here is an example for a java process:
with ps (UNIX95) I have :
sz=554*4K=2216K
vsz=10300K
with top I have :
SIZE=10300K
RES=21296K
So vsz (in ps) = SIZE (in top)
It's the size of the process. Right?
But what does sz exactly report?
RES is the resident size of the process but what does it mean?
I use ipcs and my process java doesn't use shared memory. So why RES is so big?
Thanks for help!
I try to understand how memory is used on my HP-UX 11 server.
Here is an example for a java process:
with ps (UNIX95) I have :
sz=554*4K=2216K
vsz=10300K
with top I have :
SIZE=10300K
RES=21296K
So vsz (in ps) = SIZE (in top)
It's the size of the process. Right?
But what does sz exactly report?
RES is the resident size of the process but what does it mean?
I use ipcs and my process java doesn't use shared memory. So why RES is so big?
Thanks for help!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2002 12:20 PM
01-15-2002 12:20 PM
Solution
top and ps are measuring very different parts of memory, and just be forewarned, understanding how memory is used in HP-UX (or any virtual memory Unix system) is very complex.
Program memory that is easy to identify are the 3 chunks: text (unchanging instructions), stack and data. That's the easy part. Virtually all programs will use shared libraries...now it gets complicated: how do you count memory allocated to shared libraries that many different programs use at the same time? (ans: there is no right answer)
Then there is the buffer cache, shared by all programs that read/write files. Very dynamic and many segments in the buffer cache are used by several programs at the same time (ie, a copy of the passwd file is usually in the cache all the time and accessed by every ls -l command).
Then there are memory-mapped files, semaphores and a myriad of other Inter-Process Communication calls, all of which should be equally shared by participants but impossible to fairly allocate.
So for today's systems, worrying about exactly how much RAM is used is not useful. Instead, look at the basics: text+stack+data (the vsz value in ps) to see if it grows without bounds, and put reasonable limits on the growth of the buffer cache (50% max is NOT reasonable). Then check vmstat for po (page outs) and when this number begins to appear as 2 or 3 digits (steadily), time for more RAM.
With the high cost of commercial quality database systems today, it makes no sense to cripple them with a few hundred megs of RAM.
Bill Hassell, sysadmin
Program memory that is easy to identify are the 3 chunks: text (unchanging instructions), stack and data. That's the easy part. Virtually all programs will use shared libraries...now it gets complicated: how do you count memory allocated to shared libraries that many different programs use at the same time? (ans: there is no right answer)
Then there is the buffer cache, shared by all programs that read/write files. Very dynamic and many segments in the buffer cache are used by several programs at the same time (ie, a copy of the passwd file is usually in the cache all the time and accessed by every ls -l command).
Then there are memory-mapped files, semaphores and a myriad of other Inter-Process Communication calls, all of which should be equally shared by participants but impossible to fairly allocate.
So for today's systems, worrying about exactly how much RAM is used is not useful. Instead, look at the basics: text+stack+data (the vsz value in ps) to see if it grows without bounds, and put reasonable limits on the growth of the buffer cache (50% max is NOT reasonable). Then check vmstat for po (page outs) and when this number begins to appear as 2 or 3 digits (steadily), time for more RAM.
With the high cost of commercial quality database systems today, it makes no sense to cripple them with a few hundred megs of RAM.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2002 12:25 PM
01-15-2002 12:25 PM
Re: memory reports in top and ps!!!
Here's a good bedtime story:
http://docs.hp.com/hpux/onlinedocs/os/11i/mem_mgt.html
live free or die
harry
http://docs.hp.com/hpux/onlinedocs/os/11i/mem_mgt.html
live free or die
harry
Live Free or Die
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2002 12:49 PM
01-15-2002 12:49 PM
Re: memory reports in top and ps!!!
Here's another one:
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=5965-4641&service=hpux&path=../5965-4641/00/00/1&title=HP-UX%20Memory%20Management
live free or die
harry
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=5965-4641&service=hpux&path=../5965-4641/00/00/1&title=HP-UX%20Memory%20Management
live free or die
harry
Live Free or Die
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP