<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory usage - confusing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140143#M317529</link>
    <description>Two possibilities leap to mind:&lt;BR /&gt;&lt;BR /&gt;1) The profiler reports your expected/worst case physical memory consumption for your direct allocations (RES, not SIZE).&lt;BR /&gt;&lt;BR /&gt;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.</description>
    <pubDate>Fri, 08 Feb 2008 01:30:04 GMT</pubDate>
    <dc:creator>Don Morris_1</dc:creator>
    <dc:date>2008-02-08T01:30:04Z</dc:date>
    <item>
      <title>Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140127#M317513</link>
      <description>Java app runs on HP 11 box. Now after running my code through the profiler I see that only 200 MB of heap space is being utilized but when I run top command I see 200 MB of RES space and total size is 1 GB. I tried to look at profiler but can't see where it's using extra 800 MB of memory. This application extracts blob and then encrypts them and writes to the file system. There are 4 threads that extract different kind of data. Any suggestions on where memory is being utilized</description>
      <pubDate>Mon, 04 Feb 2008 20:54:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140127#M317513</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-04T20:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140128#M317514</link>
      <description>That's just the difference between 'virtual memory' or 'address space' and real, touched memory.&lt;BR /&gt;&lt;BR /&gt;If a program 'mallocs' 1Gb and does nothing else, you might see SIZE=1GB and RES=1MB&lt;BR /&gt;And those values coudl be appearing on a 64GB physical memory system, or a 512MB system (if you can still find one that small).&lt;BR /&gt;&lt;BR /&gt;Check out the Java command line options used, notably:&lt;BR /&gt;&lt;BR /&gt;Xms = the initial/minimum Java heap size within the VM. &lt;BR /&gt;Xmx = the maximum Java heap size within the VM.  &lt;BR /&gt;&lt;BR /&gt;Google for: +java +memory +tuning for more info. Toss in +Xms or +Xmx as desired :-)&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel (at gmail dot com)&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2008 01:39:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140128#M317514</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-02-05T01:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140129#M317515</link>
      <description>Is there a way to find out where it's sucking so much memory. When I did man on top the definition of SIZE is interesting:&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;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.&lt;BR /&gt;---&lt;BR /&gt;Interesting part is that virtual memory region could be shared with other processes.&lt;BR /&gt;&lt;BR /&gt;1. So, is there a way to find out more detailed information about memory usage of a process ?&lt;BR /&gt;2. How to determine how much virtual memory is being shared by other processes ?</description>
      <pubDate>Wed, 06 Feb 2008 16:05:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140129#M317515</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-06T16:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140130#M317516</link>
      <description>If you have Glance you can map memory regions of a process. Mostly,for shared regions it would be *.so (shared libraries).</description>
      <pubDate>Wed, 06 Feb 2008 16:20:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140130#M317516</guid>
      <dc:creator>Zeev Schultz</dc:creator>
      <dc:date>2008-02-06T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140131#M317517</link>
      <description>I'll look at manual. But if somebody could also tell me what steps I need to follow to map a process to shared memory regions and what to deduce from it, and how to understand the output, would be helpful.</description>
      <pubDate>Wed, 06 Feb 2008 17:35:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140131#M317517</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-06T17:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140132#M317518</link>
      <description>java uses garbage collector. a facility with different policies for different occations who does all memory utilization for proper java oprations. when a need for memory arrises, the GC according to its policy frees (or accuires more) memory from the OS.&lt;BR /&gt;what glance sees is the OS POV. &lt;A href="http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html" target="_blank"&gt;http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://java.sun.com/docs/hotspot/gc1.4.2/" target="_blank"&gt;http://java.sun.com/docs/hotspot/gc1.4.2/&lt;/A&gt;</description>
      <pubDate>Wed, 06 Feb 2008 21:25:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140132#M317518</guid>
      <dc:creator>Avishay_Cohen</dc:creator>
      <dc:date>2008-02-06T21:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140133#M317519</link>
      <description>I am confused because when I do top I see SIZE as 1 GB and RES as 200 MB. But when I run it through the profiler total heap size allocated is just 200 MB by JVM. I see 800MB worth memory unaccounted for.</description>
      <pubDate>Wed, 06 Feb 2008 21:55:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140133#M317519</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-06T21:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140134#M317520</link>
      <description>I don't know if Java is expressing the Heap in terms of real page usage (SZ) instead of virtual size (VSZ) or if you've just got 800Mb of shared libraries, stack, text, etc... all of which would show up in SIZE for top.&lt;BR /&gt;&lt;BR /&gt;Try 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.&lt;BR /&gt;&lt;BR /&gt;Point it at the pid of your Java process with at least one level of verbosity ( -v -p &lt;PID&gt; ) and you should get a breakdown by object type for Virtual and Physical memory consumption. That should narrow things down.&lt;BR /&gt;&lt;BR /&gt;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.&lt;/PID&gt;</description>
      <pubDate>Thu, 07 Feb 2008 01:53:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140134#M317520</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-07T01:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140135#M317521</link>
      <description>Argh! And I forget to attach the code while blathering on about how to use it. My apologies (and no points on this followup, certainly!)</description>
      <pubDate>Thu, 07 Feb 2008 01:54:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140135#M317521</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-07T01:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140136#M317522</link>
      <description>I am unable to download the attachment.</description>
      <pubDate>Thu, 07 Feb 2008 16:35:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140136#M317522</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-07T16:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140137#M317523</link>
      <description>I could download just fine. &lt;BR /&gt;Something wrong on your side / site.&lt;BR /&gt;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?&lt;BR /&gt;&lt;BR /&gt;Just in case the extention ".C" caused a problem I'll re-attach Don's source as ".txt"&lt;BR /&gt;&lt;BR /&gt;Also... google for pstat_getprocvm will get several alternatives.&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Feb 2008 17:53:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140137#M317523</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-02-07T17:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140138#M317524</link>
      <description>I compiled and ran, but I just get this:&lt;BR /&gt;&lt;BR /&gt;$ aCC -o meminfo 298591.c&lt;BR /&gt;$ meminfo  -v -p 11765&lt;BR /&gt;VIRT/PHYS/LOCKED/SWAP summaries in pages.&lt;BR /&gt;System page size is 4096 or 0x1000 bytes.&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Feb 2008 18:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140138#M317524</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-07T18:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140139#M317525</link>
      <description>Just to eliminate the obvious, compile with +DD64 or +DD32 -D_PSTAT64 as I requested. Calling pstat on a 64-bit kernel without handling 64-bit values is a good way to get garbage results [such as perhaps not finding the pid you though you should].</description>
      <pubDate>Thu, 07 Feb 2008 20:02:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140139#M317525</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-07T20:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140140#M317526</link>
      <description>How do I interpret these results ? Are these in bytes ?&lt;BR /&gt;&lt;BR /&gt;PID 11765:&lt;BR /&gt; UNUSED TYPE  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; UAREA  consumes 192 VIRT, 192 PHYS, 0 LOCKED and 192 SWAP.&lt;BR /&gt; TEXT  consumes 16 VIRT, 15 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; DATA/HEAP  consumes 10223 VIRT, 10095 PHYS, 0 LOCKED and 10223 SWAP.&lt;BR /&gt; MAIN STACK  consumes 576 VIRT, 96 PHYS, 0 LOCKED and 576 SWAP.&lt;BR /&gt; SYSV SHMEM  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; NULL DEREF  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; MEM MAPPED I/O  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; MMAP  consumes 308674 VIRT, 54399 PHYS, 0 LOCKED and 45134 SWAP.&lt;BR /&gt; GRAPHICS SPECIFIC  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; GRAPHICS SPECIFIC  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt; RSE STACK  consumes 0 VIRT, 0 PHYS, 0 LOCKED and 0 SWAP.&lt;BR /&gt;PID 11765 Mb in Use:&lt;BR /&gt;        Virt: 1248      Phys: 253       Swap: 219</description>
      <pubDate>Thu, 07 Feb 2008 21:06:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140140#M317526</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-07T21:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140141#M317527</link>
      <description>No, those are all in pages -- hence the line about:&lt;BR /&gt;"VIRT/PHYS/LOCKED/SWAP summaries in pages"&lt;BR /&gt;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".&lt;BR /&gt;&lt;BR /&gt;So for your Data/Heap -- that process is using 10095*4096 = 41349120 bytes (40380kb... 39.43359375Mb) of Physical Memory [RAM].&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Thu, 07 Feb 2008 21:59:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140141#M317527</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-07T21:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140142#M317528</link>
      <description>Thanks. So if 212MB is in use then why does it report the total size of 1.7 GB ? I know for sure it doesn't need more than 250 MB because I've run it in profiler</description>
      <pubDate>Thu, 07 Feb 2008 23:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140142#M317528</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-07T23:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140143#M317529</link>
      <description>Two possibilities leap to mind:&lt;BR /&gt;&lt;BR /&gt;1) The profiler reports your expected/worst case physical memory consumption for your direct allocations (RES, not SIZE).&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Fri, 08 Feb 2008 01:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140143#M317529</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-08T01:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140144#M317530</link>
      <description>What really is mmap ? Is it something that could be shared between other processes too ? Does it mean that some space is reserved but could be used by other processes, if required ?</description>
      <pubDate>Fri, 08 Feb 2008 16:00:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140144#M317530</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-08T16:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140145#M317531</link>
      <description>&lt;A href="http://docs.hp.com/en/B2355-60130/mmap.2.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/mmap.2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;At this point, perhaps you should look over:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/1218/mem_mgt.html" target="_blank"&gt;http://docs.hp.com/en/1218/mem_mgt.html&lt;/A&gt;</description>
      <pubDate>Fri, 08 Feb 2008 16:41:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140145#M317531</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-02-08T16:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage - confusing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140146#M317532</link>
      <description>thanks I'll try to read the manual. When I look at glance I see FIle Name as &lt;REG&gt;&lt;BR /&gt;&lt;BR /&gt;What does it mean and how can I trace that inode number to actual file ? One of these files is taking 90MB space.&lt;/REG&gt;</description>
      <pubDate>Fri, 08 Feb 2008 17:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-usage-confusing/m-p/4140146#M317532</guid>
      <dc:creator>MohitAnchlia</dc:creator>
      <dc:date>2008-02-08T17:01:00Z</dc:date>
    </item>
  </channel>
</rss>

