- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Memory usage - confusing
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
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
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-04-2008 12:54 PM
02-04-2008 12:54 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2008 05:39 PM
02-04-2008 05:39 PM
Re: Memory usage - confusing
If a program 'mallocs' 1Gb and does nothing else, you might see SIZE=1GB and RES=1MB
And those values coudl be appearing on a 64GB physical memory system, or a 512MB system (if you can still find one that small).
Check out the Java command line options used, notably:
Xms = the initial/minimum Java heap size within the VM.
Xmx = the maximum Java heap size within the VM.
Google for: +java +memory +tuning for more info. Toss in +Xms or +Xmx as desired :-)
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 08:05 AM
02-06-2008 08:05 AM
Re: Memory usage - confusing
--
Total virtual size of the process in kilobytes. This includes virtual sizes of text, data, stack, mmap regions, shared memory regions and IO mapped regions. This may also include virtual memory regions shared with other processes.
---
Interesting part is that virtual memory region could be shared with other processes.
1. So, is there a way to find out more detailed information about memory usage of a process ?
2. How to determine how much virtual memory is being shared by other processes ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 08:20 AM
02-06-2008 08:20 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 09:35 AM
02-06-2008 09:35 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 01:25 PM
02-06-2008 01:25 PM
Re: Memory usage - confusing
what glance sees is the OS POV. http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html
http://java.sun.com/docs/hotspot/gc1.4.2/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 01:55 PM
02-06-2008 01:55 PM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:53 PM
02-06-2008 05:53 PM
SolutionTry compiling the attached (+DD64 or +DD32 -D_PSTAT64), and my apologies in advance if it doesn't compile because I've used something too new... it _should_ be okay barring some printf() format conversion complaints.
Point it at the pid of your Java process with at least one level of verbosity ( -v -p
Other alternatives are, as always, Glance -- any number of other programs/scripts folks have written to talk to pstat if you don't like this one, kmeminfo if you can get it from support, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2008 05:54 PM
02-06-2008 05:54 PM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 08:35 AM
02-07-2008 08:35 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 09:53 AM
02-07-2008 09:53 AM
Re: Memory usage - confusing
Something wrong on your side / site.
need to click that 'go ahead it is safe' in the 'yellow bar' in a browser window? It might have appeared in a different browser window if you have multiple. Try again?
Just in case the extention ".C" caused a problem I'll re-attach Don's source as ".txt"
Also... google for pstat_getprocvm will get several alternatives.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 10:12 AM
02-07-2008 10:12 AM
Re: Memory usage - confusing
$ aCC -o meminfo 298591.c
$ meminfo -v -p 11765
VIRT/PHYS/LOCKED/SWAP summaries in pages.
System page size is 4096 or 0x1000 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 12:02 PM
02-07-2008 12:02 PM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 01:06 PM
02-07-2008 01:06 PM
Re: Memory usage - confusing
PID 11765:
UNUSED TYPE consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
UAREA consumes 192 VIRT, 192 PHYS, 0 LOCKED and 192 SWAP.
TEXT consumes 16 VIRT, 15 PHYS, 0 LOCKED and 0 SWAP.
DATA/HEAP consumes 10223 VIRT, 10095 PHYS, 0 LOCKED and 10223 SWAP.
MAIN STACK consumes 576 VIRT, 96 PHYS, 0 LOCKED and 576 SWAP.
SYSV SHMEM consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
NULL DEREF consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
MEM MAPPED I/O consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
MMAP consumes 308674 VIRT, 54399 PHYS, 0 LOCKED and 45134 SWAP.
GRAPHICS SPECIFIC consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
GRAPHICS SPECIFIC consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
RSE STACK consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.
PID 11765 Mb in Use:
Virt: 1248 Phys: 253 Swap: 219
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 01:59 PM
02-07-2008 01:59 PM
Re: Memory usage - confusing
"VIRT/PHYS/LOCKED/SWAP summaries in pages"
followed by telling you how many bytes are in a page for your system [yes, it isn't always 4096 ;) ]: "System page size is 4096 or 0x1000 bytes".
So for your Data/Heap -- that process is using 10095*4096 = 41349120 bytes (40380kb... 39.43359375Mb) of Physical Memory [RAM].
MMAPs are the biggest Virtually at 1.17749Gb -- if this is the process you started the thread about, there's your answer. If you want to know the sizes of each object, add another "-v" option [verbose level greater than 1 spits out the virtual range in question for each virtual object in the process]. That may not have much meaning for you -- though in this case it would let you know if that's one big mmap or just a whole pile of little ones.
I'd note though that there's only around 212Mb in use (and if these are MMAPs of shared libraries, some of that cost is going to be independent of the process anyway... any process linked to the library will show at least some consumption for it).... so I really wouldn't think any of this is worth worrying about unless you're actually running out of swap or something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 03:31 PM
02-07-2008 03:31 PM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2008 05:30 PM
02-07-2008 05:30 PM
Re: Memory usage - confusing
1) The profiler reports your expected/worst case physical memory consumption for your direct allocations (RES, not SIZE).
2) Your profiler may report your expected virtual memory needs... but doesn't report every single virtual object which will be affiliated with your process when it runs (like a file being mmap()'d, the total virtual size of every shared library attached, etc.). This is my suspicion since you specifically mention you're profiling your heap (which usually means that somewhere there's a malloc() or brk() call... I don't think Java's odd enough to do this stuff on the Stack, though it might use private MAP_ANONYMOUS mmap() calls. Your DATA/Heap virtual usage is well within the profiling boundary -- it is the other mmap() objects in the process that are using the virtual address space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 08:00 AM
02-08-2008 08:00 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 08:41 AM
02-08-2008 08:41 AM
Re: Memory usage - confusing
Yes, mmap() created objects [files or Anonymous memory ranges] can be either shared or private. Yes, shared objects affect the virtual size of all processes attached to them.
At this point, perhaps you should look over:
http://docs.hp.com/en/1218/mem_mgt.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 09:01 AM
02-08-2008 09:01 AM
Re: Memory usage - confusing
What does it mean and how can I trace that inode number to actual file ? One of these files is taking 90MB space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 09:41 AM
02-08-2008 09:41 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 10:13 AM
02-08-2008 10:13 AM
Re: Memory usage - confusing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 10:19 AM
02-08-2008 10:19 AM
Re: Memory usage - confusing
Just trace the thing if you can start a new one:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.8/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2008 05:36 PM
02-08-2008 05:36 PM
Re: Memory usage - confusing
>What does it mean and how can I trace that inode number to actual file?
If you know the filesystem, you can use brute force to find it:
find /opt -inum 22451
If it is /opt, it may be a shlib.