<?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: swap spce problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/swap-spce-problem/m-p/3162061#M159568</link>
    <description>Sure.&lt;BR /&gt;&lt;BR /&gt;The key is that HP-UX processes must reserve the swap that they require when they request virtual space (there are some exceptions [lazy swap, etc.] -- I'm just trying to give the high level here).&lt;BR /&gt;&lt;BR /&gt;So if a process creates an anonymous mmap object (or malloc, etc.) of 64Mb and never touches a page of it -- that still gets 64Mb of swap reservation. This is done so that *if* all of the space is used and any/all of the space needs to be swapped out by the system, the space is guaranteed to be there.&lt;BR /&gt;&lt;BR /&gt;In the case of your system -- all the disk swap is already reserved, so the kernel is using accounting tricks to do memory swap. Simply put, this means that the "swap" reserved for a physical page of memory is the page itself. If you didn't have this enabled, you would have had processes reporting allocation failures (or handling them depending on their coding) 5,348Mb ago.&lt;BR /&gt;&lt;BR /&gt;So you can in fact have the swap space 100% reserved without a single page out on disk (which it sounds like is your problem). This means that you have large virtual sizes in use with relatively small physical needs (the system never gets to the point where it has to push pages out). If you want to run this workload as is... you'll need to add more swap (either real [disk/file] or pseudo [RAM]). Another option is that there's a poorly written executable out there eating too much virtual space. top / ps / Glance / pstat will help you track virtual usage by processes. You may also want to lower your fencepost limits (maxdsiz, maxssiz, shmmax) to force processes to use lower limits and try to catch a memory leak.&lt;BR /&gt;&lt;BR /&gt;There may be no leak and nothing else you can do -- you may just need more virtual space for the workload you want to run.</description>
    <pubDate>Mon, 12 Jan 2004 13:56:49 GMT</pubDate>
    <dc:creator>Don Morris_1</dc:creator>
    <dc:date>2004-01-12T13:56:49Z</dc:date>
    <item>
      <title>swap spce problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap-spce-problem/m-p/3162060#M159567</link>
      <description>We had a problem with our swap space (100% full). However, when using swapinfo, it indicated that the system only uses the pseudo-swap without using actual disk device swap. &lt;BR /&gt;&lt;BR /&gt;Could you explain when the system only uses the pseudo-swap. BTW, when we recycle one of the Tuxedo applications on the system, the swap space is back to normal (65%).&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;swapinfo -mat&lt;BR /&gt;             Mb      Mb      Mb   PCT  START/      Mb&lt;BR /&gt;TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME&lt;BR /&gt;dev         256       0     256    0%       0       -    1  /dev/vg00/lvol2&lt;BR /&gt;dev        4096      58    4038    1%       0       -    0  /dev/vg00/swap2&lt;BR /&gt;reserve       -    4294   -4294&lt;BR /&gt;memory     6241    5348     893   86%&lt;BR /&gt;total     10593    9700     893   92%       -       0    -&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jan 2004 12:41:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap-spce-problem/m-p/3162060#M159567</guid>
      <dc:creator>Wei_9</dc:creator>
      <dc:date>2004-01-12T12:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: swap spce problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap-spce-problem/m-p/3162061#M159568</link>
      <description>Sure.&lt;BR /&gt;&lt;BR /&gt;The key is that HP-UX processes must reserve the swap that they require when they request virtual space (there are some exceptions [lazy swap, etc.] -- I'm just trying to give the high level here).&lt;BR /&gt;&lt;BR /&gt;So if a process creates an anonymous mmap object (or malloc, etc.) of 64Mb and never touches a page of it -- that still gets 64Mb of swap reservation. This is done so that *if* all of the space is used and any/all of the space needs to be swapped out by the system, the space is guaranteed to be there.&lt;BR /&gt;&lt;BR /&gt;In the case of your system -- all the disk swap is already reserved, so the kernel is using accounting tricks to do memory swap. Simply put, this means that the "swap" reserved for a physical page of memory is the page itself. If you didn't have this enabled, you would have had processes reporting allocation failures (or handling them depending on their coding) 5,348Mb ago.&lt;BR /&gt;&lt;BR /&gt;So you can in fact have the swap space 100% reserved without a single page out on disk (which it sounds like is your problem). This means that you have large virtual sizes in use with relatively small physical needs (the system never gets to the point where it has to push pages out). If you want to run this workload as is... you'll need to add more swap (either real [disk/file] or pseudo [RAM]). Another option is that there's a poorly written executable out there eating too much virtual space. top / ps / Glance / pstat will help you track virtual usage by processes. You may also want to lower your fencepost limits (maxdsiz, maxssiz, shmmax) to force processes to use lower limits and try to catch a memory leak.&lt;BR /&gt;&lt;BR /&gt;There may be no leak and nothing else you can do -- you may just need more virtual space for the workload you want to run.</description>
      <pubDate>Mon, 12 Jan 2004 13:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap-spce-problem/m-p/3162061#M159568</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2004-01-12T13:56:49Z</dc:date>
    </item>
  </channel>
</rss>

