- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- another discussion on memory usage
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
тАО02-17-2003 09:16 AM
тАО02-17-2003 09:16 AM
I remember there're some discussion on memory usage last week, I have a similar situation here which kind of confusing me. On one of my dev server(HPUX11.0), we have 2GB memory, /usr/contrib/Q4/bin/kmeminfo shows the following:
Physical memory usage summary (in pages):
Physmem = 524288 Available physical memory:
Freemem = 14933 Free physical memory
Used = 509355 Used physical memory:
System = 234215 by kernel:
Static = 20312 for text and static data
Dynamic = 135260 for dynamic data
Bufcache = 78643 for file-system buffer cache
User = 277644 by user processes
Uarea = 5848 for thread uareas
Disowned = 1024 disowned pages
it tells me that user process consumed 277k pages( more that 1.1GB) memory.
but using UNIX95= ps -e -o 'vsz ruser' | grep -v VSZ | grep -v root|awk '{ sum += $1 } END { printf "%ld\n", sum }' the result is only 683368KB.
Note that I was getting 'vsz' of the process, but still there're about 500MB user process memory difference un-account for.
what may cause this? BTW, we don't have Glance on this server.
any idea is greatly welcomed.
thanks,
Gary
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 09:19 AM
тАО02-17-2003 09:19 AM
Re: another discussion on memory usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 09:49 AM
тАО02-17-2003 09:49 AM
Re: another discussion on memory usage
The command you are running is excluding all processes owned by root, hence here is probably where the shortfall is.
Remember root is just another user, albeit with special privileges, so many of the processes owned by it will contribute to user memory usage.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 10:05 AM
тАО02-17-2003 10:05 AM
Re: another discussion on memory usage
thanks for the reply, I guess I should include root, but with root, the result from UNIX95 ps is still only 795820KB
Gary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 10:38 AM
тАО02-17-2003 10:38 AM
SolutionMaybe this example will help. I've taken a process at random (well, almost at random - one with shared memory usage) and used different methods of checking its memory:
# ps -el|grep 1674
2001 S 30 1674 1662 0 154 20 42b25800 322 42ae44e8 ? 0:00 httpd
*322 is the RSS - equal to real text+data+stack in the next example.
# UNIX95= ps -e -o 'vsz ruser' -o 'pid'|grep 1674
2656 www 1674
# ./procmem 1674
Memory usage for process 1674:
Real Pages Text : 167
Real Pages Data : 147
Real Pages Stack : 8
Real Pages Shared Memory : 47
Real Pages Memory Mapped : 1041
Real Pages U-Area + Kernel Stack : 8
Real Pages I/O mapping : 0
Resident Set Size : 352
Virtual Pages Text : 497
Virtual Pages Data : 159
Virtual Pages Stack : 8
Virtual Pages Shared Memory : 303
Virtual Pages Memory Mapped : 1412
Virtual Pages U-Area + Kernel Stack : 8
Virtual Pages I/O mapping : 0
So you can see the total from the UNIX95 command is the virtual text+data+stack. ((497+159+8)*4096)/1024. It doesn't include shared memory or mapped areas.
procmem is just a program I wrote myself using the pstat interface, see "man pstat" for a full description.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 10:42 AM
тАО02-17-2003 10:42 AM
Re: another discussion on memory usage
I need to take care to compare apple with apples.
Your kmeminfo output reports a physical memory statistic. So you cannot compare that with the vsz metric of ps(1), since this is a virtual memory metric.
OK, you could use ps' rz metric...
UNIX95= ps -e -o sz= | awk '{x=x+$1} END {print x*4}'
But here you have the problem that it does not consider the reference counts, causing pages of shared objects to be counted more than once.
Check if your kmeminfo version supports the -user option. This should give you a really precise stat.
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2003 07:34 PM
тАО06-04-2003 07:34 PM
Re: another discussion on memory usage
Could you share the procmem program with me?