<?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: Leaking all over the place in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235952#M172883</link>
    <description>First, you need to understand that free() doesn't release memory back to the OS. It does put it back on the heap for reuse by the same process. Only if the malloc() request can't be granted by the freed heaped space is more memory allocated to the process. You can shrink a process using sbrk() but it is death to mix sbrks() and malloc(), calloc(), and realloc(). If you choose to use sbrk(), you must use only it and assume full responsibility for memory management. This is really no practical because so many library functions allocate memory using malloc().&lt;BR /&gt;&lt;BR /&gt;If you have a reasonably well-patched version of 10.20 and libc is reasonably new (bearing in mind the last 10.20 Gen Release patchset was Dec. '01) then there are no big memory leaks. I'm betting on a leak in the application itself. If you are linking 3rd-party libraries (e.g. databases), you might look there.&lt;BR /&gt;</description>
    <pubDate>Wed, 31 Mar 2004 17:08:23 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-03-31T17:08:23Z</dc:date>
    <item>
      <title>Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235948#M172879</link>
      <description>Hello all,&lt;BR /&gt;  I have HP-UX 10.20 running on an HP744 and am having problems with memory leaks (I think). Our applications alloc and then free memory in chunks but the virtual memory usage on the system keeps increasing and the processes keep eating up more VM. Is there a know problem with HP-UX not releasing memory to the system even when the app frees it? Is there some kernel parameter that can be tweaked? Thanks for any help.&lt;BR /&gt;&lt;BR /&gt;Mike</description>
      <pubDate>Wed, 31 Mar 2004 16:51:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235948#M172879</guid>
      <dc:creator>Michael D'Aulerio</dc:creator>
      <dc:date>2004-03-31T16:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235949#M172880</link>
      <description>Other than making sure that you have the latest patches installed for your version, there is not a lot you can do at the OS level. You will find that the application is the problem with the memory leak. The only way of fixing this is to schedule regular reboots, or get the application vendor to fix their problem. You could increase your shared memory (shmmax) but this I am sure will be a temporary solution only.</description>
      <pubDate>Wed, 31 Mar 2004 16:56:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235949#M172880</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-03-31T16:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235950#M172881</link>
      <description>Hello Mike,&lt;BR /&gt;&lt;BR /&gt;I know there is a problem with the mib2agt eating up memory. Specifically with 10.20, I am not sure. I have had the mib2agt problem on 11.00. I would probably recommend updating your patch level first off, if they are not up to date....whatever that maybe for 10.20. Have you run the following command to see if you see anything eating a lot of memory:&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -e -o ruser,vsz,pid,args | sort -rnk2 | more&lt;BR /&gt;&lt;BR /&gt;Please note that you need to have a space between the = and the ps.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;-Bryan</description>
      <pubDate>Wed, 31 Mar 2004 16:58:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235950#M172881</guid>
      <dc:creator>Bryan D. Quinn</dc:creator>
      <dc:date>2004-03-31T16:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235951#M172882</link>
      <description>The virtual pages marked as free by an executable can freed at the OS level later on. My point is virtual memory is a layer an abstraction maintend by the OS, so a lot of the memory can be allocated in the swap space and not on physical memory, making the memory freed less urgent. Does you box suffer memory shortage ?&lt;BR /&gt;&lt;BR /&gt;Anyway, if you're facing a memory leak, the cause of the trouble is likely to be in the application code and not in the hp kernel, at least this is my bet.&lt;BR /&gt;&lt;BR /&gt;Maybe you can use a debuger to run and profile the application.</description>
      <pubDate>Wed, 31 Mar 2004 17:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235951#M172882</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-03-31T17:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235952#M172883</link>
      <description>First, you need to understand that free() doesn't release memory back to the OS. It does put it back on the heap for reuse by the same process. Only if the malloc() request can't be granted by the freed heaped space is more memory allocated to the process. You can shrink a process using sbrk() but it is death to mix sbrks() and malloc(), calloc(), and realloc(). If you choose to use sbrk(), you must use only it and assume full responsibility for memory management. This is really no practical because so many library functions allocate memory using malloc().&lt;BR /&gt;&lt;BR /&gt;If you have a reasonably well-patched version of 10.20 and libc is reasonably new (bearing in mind the last 10.20 Gen Release patchset was Dec. '01) then there are no big memory leaks. I'm betting on a leak in the application itself. If you are linking 3rd-party libraries (e.g. databases), you might look there.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Mar 2004 17:08:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235952#M172883</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-31T17:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235953#M172884</link>
      <description>Thank you all for the education on how the OS handles memory management. We are not experiencing memory problems at the moment but it has plagued us in the past. At first we only had 256 MB on board memory and the system was constantly thrashing, swapping processes in and out from disk to memory. We solved that by doubling the RAM. Later we found that when a lot of apps were running we used up the Virtual Memory and new processes would not spawn. We doubled the Swap from 1 GB to 2 GB and resolved that. I'm concerned that some apps are eating up chunks of memory and that we may run into memory problems in the future. I will check that we have the latest recommended patch set but I guess the real problem is with the individual apps. Thanks for the help.</description>
      <pubDate>Wed, 31 Mar 2004 17:21:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235953#M172884</guid>
      <dc:creator>Michael D'Aulerio</dc:creator>
      <dc:date>2004-03-31T17:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235954#M172885</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;Its helpful to find out where your virtual memory is going.  Use the program "kmeminfo" to do this.  If you don't have it, one way to get it is to install the 10.20 q4 patch PHCO_28068. &lt;BR /&gt;&lt;BR /&gt;# ./kmeminfo.10.20&lt;BR /&gt;Warning: found 1 unmapped system pages&lt;BR /&gt;&lt;BR /&gt;Physical memory usage (in pages):&lt;BR /&gt;physmem            =   40960   Available physical memory&lt;BR /&gt;freemem            =   13722   Free physical memory&lt;BR /&gt;Used               =   27238   Physical memory Used:&lt;BR /&gt;  System           =   11523     by Kernel:&lt;BR /&gt;    firstfree      =    4107       for Text and Static Data&lt;BR /&gt;    Bufpages       =    4096       for Buffer Cache&lt;BR /&gt;      pagepool     =       0         available for buffers&lt;BR /&gt;    Dynamic        =    3319       for Dynamic Data:&lt;BR /&gt;      MALLOC       =    2723         MALLOC() buckets:&lt;BR /&gt;        bucket[ 0] =       0           size 1&lt;BR /&gt;        bucket[ 1] =       0           size 2&lt;BR /&gt;        bucket[ 2] =       0           size 4&lt;BR /&gt;        bucket[ 3] =       0           size 8&lt;BR /&gt;        bucket[ 4] =       0           size 16&lt;BR /&gt;        bucket[ 5] =      44           size 32&lt;BR /&gt;        bucket[ 6] =      12           size 64&lt;BR /&gt;        bucket[ 7] =     115           size 128&lt;BR /&gt;        bucket[ 8] =     174           size 256&lt;BR /&gt;        bucket[ 8] =     174           size 256&lt;BR /&gt;        bucket[ 9] =     443           size 512&lt;BR /&gt;        bucket[10] =     151           size 1024&lt;BR /&gt;        bucket[11] =     409           size 2048&lt;BR /&gt;        bucket[12] =      24           size 4096&lt;BR /&gt;        bucket[13] =      38           size 8192&lt;BR /&gt;        bucket[14] =      78           size 16384&lt;BR /&gt;        bucket[15] =     117           size 32768&lt;BR /&gt;        bucket[16] =      52           size 65536&lt;BR /&gt;        bucket[17] =      32           size 131072&lt;BR /&gt;        bucket[18] =     954           size 262144&lt;BR /&gt;        bucket[19] =      80           size 524288&lt;BR /&gt;        bucket[20] =       0           size 1048576&lt;BR /&gt;      Kmalloc      =     544         k[m]alloc()&lt;BR /&gt;      Eqalloc      =      44         eqalloc()&lt;BR /&gt;      Reserved     =       8         Reserved Pools&lt;BR /&gt;    Other          =       1       other system&lt;BR /&gt;  User             =   14679     by User processes&lt;BR /&gt;  Reclaimable      =      23     by Page Cache&lt;BR /&gt;  Disowned         =      21&lt;BR /&gt;  Uarea            =     492     by Ureas&lt;BR /&gt;  Other            =     741     not accounted...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Brian Hackley</description>
      <pubDate>Thu, 01 Apr 2004 11:30:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235954#M172885</guid>
      <dc:creator>Brian Hackley</dc:creator>
      <dc:date>2004-04-01T11:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Leaking all over the place</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235955#M172886</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;As Brian points out, kmeminfo is a great utility - highly recommended.&lt;BR /&gt;I'd also recommend the equivalent utility for scoping out shared memory - shminfo - avail here:&lt;BR /&gt;&lt;BR /&gt;ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Thu, 01 Apr 2004 11:46:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/leaking-all-over-the-place/m-p/3235955#M172886</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-04-01T11:46:00Z</dc:date>
    </item>
  </channel>
</rss>

