<?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: Process memory - doesn't make sense in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505758#M843680</link>
    <description>&lt;BR /&gt;Shared memory and shared memory regions are special. In glance for example if a process has a 10 MB shared memory region and 4 other processes are attached to that shared memory. Therefore 5 processes are attached to the shared memory.  So 10MB/5 = 2&lt;BR /&gt;&lt;BR /&gt;So each process in glance is charged for only 2 MB of that shared memory in glance.&lt;BR /&gt;&lt;BR /&gt;Its buried somewhere in the metric descriptions.  I found it somewhere once.&lt;BR /&gt;&lt;BR /&gt;here is a excerpt of a file I have I hope it clears this up.  I kept this because it was a good explination of what you are asking.&lt;BR /&gt;&lt;BR /&gt;Emil Velez&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;Resident memory (RSS) is calculated as&lt;BR /&gt;&lt;BR /&gt;RSS = sum of private region pages + (sum of shared region pages / number of references)&lt;BR /&gt;&lt;BR /&gt;The number of references is a count of the number of attachments to the memory region.  Attachments, for shared regions, may come from several processes sharing the same memory, a single process with multiple attachments, or combinations of these."&lt;BR /&gt;&lt;BR /&gt;This then means that the PROC_MEM_RES metric can be useful for summing up process memory usage and comparing it with the APP_MEM_RES metric.  It also means, though, that there will most likely be a discrepancy if we compare the PROC_MEM_RES value to the "SZ" value from the ps -el command, as that does not utilize the reference count for shared segments in its calculations. It also means that we cannot use this metric to answer the question that was posed earlier in this paper; "How much memory would this process be using if it were the only process running on the system?"&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 17 Mar 2005 09:06:06 GMT</pubDate>
    <dc:creator>Emil Velez</dc:creator>
    <dc:date>2005-03-17T09:06:06Z</dc:date>
    <item>
      <title>Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505752#M843674</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I have a question about process memory.&lt;BR /&gt;&lt;BR /&gt;I got the sz column from ps and multiplied it&lt;BR /&gt;by the page size (4096) to get total memory&lt;BR /&gt;usage for a process.&lt;BR /&gt;&lt;BR /&gt;But, this figure is always larger than either&lt;BR /&gt;the RSS or Virtual SS from Glance.&lt;BR /&gt;&lt;BR /&gt;ie&lt;BR /&gt;From GlancePlus :&lt;BR /&gt;&lt;BR /&gt;Process Name :      PID:      RSS:     VSS:&lt;BR /&gt;ora_smon_AHSTD     10582     7.4mb    21.4mb&lt;BR /&gt;  &lt;BR /&gt;From ps :&lt;BR /&gt;&lt;BR /&gt;PID       sz*4096  Process Name : &lt;BR /&gt; 10582    35.5 MB ora_smon_AHSTD &lt;BR /&gt;&lt;BR /&gt;You see that the value from ps is always&lt;BR /&gt;MUCH larger than Glance.&lt;BR /&gt;&lt;BR /&gt;Now, I've read the docs in Glance where it&lt;BR /&gt;does discuss this.  And it mentions that&lt;BR /&gt;Glance takes account of the Shared memory&lt;BR /&gt;areas as well as the private data areas.&lt;BR /&gt;&lt;BR /&gt;So, shouldn't the figure from Glance be&lt;BR /&gt;LARGER than ps?  &lt;BR /&gt;&lt;BR /&gt;And, in the end, which value do I believe?&lt;BR /&gt;&lt;BR /&gt;If I sum up all the sz*4096 values from ps,&lt;BR /&gt;I get a figure which is MUCH larger than&lt;BR /&gt;the physical memory on our hp-ux box.&lt;BR /&gt;This leads me to think that the value from&lt;BR /&gt;ps is worthless.  But then why publish the &lt;BR /&gt;info at all?&lt;BR /&gt;&lt;BR /&gt;Confused.&lt;BR /&gt;&lt;BR /&gt;Paul Stuart</description>
      <pubDate>Wed, 16 Mar 2005 06:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505752#M843674</guid>
      <dc:creator>Alun  Territt</dc:creator>
      <dc:date>2005-03-16T06:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505753#M843675</link>
      <description>In glance, take these numbers down:&lt;BR /&gt;&lt;BR /&gt;Data RSS&lt;BR /&gt;Text RSS&lt;BR /&gt;Stack RSS&lt;BR /&gt;&lt;BR /&gt;Add them up.&lt;BR /&gt;&lt;BR /&gt;Mutliply by 1024.&lt;BR /&gt;&lt;BR /&gt;Take your ps 'sz' number and multiply by 4096.&lt;BR /&gt;&lt;BR /&gt;Divide that by 1024, and magic happens!&lt;BR /&gt;&lt;BR /&gt;If not, then post your ps and glance numbers plus the output from kmtune.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 16 Mar 2005 06:41:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505753#M843675</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-03-16T06:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505754#M843676</link>
      <description>Hi Harry,&lt;BR /&gt;&lt;BR /&gt;How do I get those values? (data,text&lt;BR /&gt;and stack)&lt;BR /&gt;&lt;BR /&gt;I used the metrics :&lt;BR /&gt;&lt;BR /&gt;proc_region_res, &lt;BR /&gt;proc_region_res_text, &lt;BR /&gt;proc_region_res_stack&lt;BR /&gt;&lt;BR /&gt;in a .syntax file, but it appears to &lt;BR /&gt;return a whole list of values for each&lt;BR /&gt;process.  &lt;BR /&gt;&lt;BR /&gt;Paul S</description>
      <pubDate>Wed, 16 Mar 2005 07:43:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505754#M843676</guid>
      <dc:creator>Alun  Territt</dc:creator>
      <dc:date>2005-03-16T07:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505755#M843677</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;gpm &amp;gt; reports &amp;gt; process list &amp;gt; select process &amp;gt; process memory regions.&lt;BR /&gt;&lt;BR /&gt;Its the first column of the memory regions, first three rows.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 16 Mar 2005 08:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505755#M843677</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-03-16T08:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505756#M843678</link>
      <description>If you are STUCK using "glance" and NOT gpm, then:&lt;BR /&gt;&lt;BR /&gt;glance&lt;BR /&gt;s&lt;BR /&gt;PID&lt;BR /&gt;M&lt;BR /&gt;&lt;BR /&gt;at the bottom of the screen note the line that looks like this:&lt;BR /&gt;&lt;BR /&gt;Text RSS/VSS:388kb/416kb Data RSS/VSS:1.3mb/3.1mb Stack RSS/VSS: 48kb/ 48kb&lt;BR /&gt;&lt;BR /&gt;take the first "set" of numbers: 388 from text, 1.3mb from Data, 48kb from Stack&lt;BR /&gt;&lt;BR /&gt;on my system thats 388kb, 1.3mb, and 48kb&lt;BR /&gt;&lt;BR /&gt;the conversion of 1.3mb to kb is NOT exact, thus you could be off a little, which is why I use gpm.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Wed, 16 Mar 2005 08:29:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505756#M843678</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-03-16T08:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505757#M843679</link>
      <description>OK, so I have :&lt;BR /&gt;&lt;BR /&gt;Text  RSS/VSS: 19mb/ 30mb  &lt;BR /&gt;Data  RSS/VSS:560kb/1.0mb  &lt;BR /&gt;Stack RSS/VSS: 24kb/ 64kb&lt;BR /&gt;Shmem RSS/VSS: 41mb/ 46mb  &lt;BR /&gt;Other RSS/VSS:3.3mb/7.3mb&lt;BR /&gt;                &lt;BR /&gt;And ps says :&lt;BR /&gt;&lt;BR /&gt;10691   19.1 MB ora_ckpt_ITUAT  &lt;BR /&gt;&lt;BR /&gt;So that makes sense to me.  Great!&lt;BR /&gt;&lt;BR /&gt;The only thing is, when I run my Glance syntax file (in adviser_only), i say :&lt;BR /&gt; &lt;BR /&gt;PRINT proc_proc_name, proc_proc_id, proc_mem_res&lt;BR /&gt;&lt;BR /&gt;I get :&lt;BR /&gt;&lt;BR /&gt;ora_ckpt_ITUAT     10691     6.3mb &lt;BR /&gt;&lt;BR /&gt;How come this figure doesn't align with any of the other stuff we've come up with?&lt;BR /&gt;&lt;BR /&gt;Paul</description>
      <pubDate>Wed, 16 Mar 2005 08:54:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505757#M843679</guid>
      <dc:creator>Alun  Territt</dc:creator>
      <dc:date>2005-03-16T08:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505758#M843680</link>
      <description>&lt;BR /&gt;Shared memory and shared memory regions are special. In glance for example if a process has a 10 MB shared memory region and 4 other processes are attached to that shared memory. Therefore 5 processes are attached to the shared memory.  So 10MB/5 = 2&lt;BR /&gt;&lt;BR /&gt;So each process in glance is charged for only 2 MB of that shared memory in glance.&lt;BR /&gt;&lt;BR /&gt;Its buried somewhere in the metric descriptions.  I found it somewhere once.&lt;BR /&gt;&lt;BR /&gt;here is a excerpt of a file I have I hope it clears this up.  I kept this because it was a good explination of what you are asking.&lt;BR /&gt;&lt;BR /&gt;Emil Velez&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;Resident memory (RSS) is calculated as&lt;BR /&gt;&lt;BR /&gt;RSS = sum of private region pages + (sum of shared region pages / number of references)&lt;BR /&gt;&lt;BR /&gt;The number of references is a count of the number of attachments to the memory region.  Attachments, for shared regions, may come from several processes sharing the same memory, a single process with multiple attachments, or combinations of these."&lt;BR /&gt;&lt;BR /&gt;This then means that the PROC_MEM_RES metric can be useful for summing up process memory usage and comparing it with the APP_MEM_RES metric.  It also means, though, that there will most likely be a discrepancy if we compare the PROC_MEM_RES value to the "SZ" value from the ps -el command, as that does not utilize the reference count for shared segments in its calculations. It also means that we cannot use this metric to answer the question that was posed earlier in this paper; "How much memory would this process be using if it were the only process running on the system?"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Mar 2005 09:06:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505758#M843680</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2005-03-17T09:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Process memory - doesn't make sense</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505759#M843681</link>
      <description>Paul,&lt;BR /&gt;&lt;BR /&gt;have a look at: &lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1111068874265+28353475&amp;amp;threadId=99729" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1111068874265+28353475&amp;amp;threadId=99729&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Thu, 17 Mar 2005 09:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-memory-doesn-t-make-sense/m-p/3505759#M843681</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-03-17T09:18:37Z</dc:date>
    </item>
  </channel>
</rss>

