<?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 Swap in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205392#M464076</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Here's the output to swapinfo -tam&lt;BR /&gt;&lt;BR /&gt;TYPE      AVAIL    USED    FREE  USED   LIMIT &lt;BR /&gt;dev       20000    4536   15464   23%       &lt;BR /&gt;reserve       -   15464  -15464&lt;BR /&gt;memory    32700   26903    5797   82%&lt;BR /&gt;total     52700   46903    5797   89%       &lt;BR /&gt;&lt;BR /&gt;Basically, my question is, should I add more Swap?? Howcome Memory used is so high and swap space is barely being used? Does it matter what VG swap is located in? For example, SAP/Oracle is on VG03, does it matter if I add LV Swap in VG00 as opposed to VG03? Does it affect performance? Is there a guideline as to how much swap should be used, in general of course?&lt;BR /&gt;&lt;BR /&gt;As you can see, I'm not very knowledgeable with SWAP so your input here would be very much appreciated!!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 21 Oct 2009 20:44:28 GMT</pubDate>
    <dc:creator>Fern H2O</dc:creator>
    <dc:date>2009-10-21T20:44:28Z</dc:date>
    <item>
      <title>Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205392#M464076</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Here's the output to swapinfo -tam&lt;BR /&gt;&lt;BR /&gt;TYPE      AVAIL    USED    FREE  USED   LIMIT &lt;BR /&gt;dev       20000    4536   15464   23%       &lt;BR /&gt;reserve       -   15464  -15464&lt;BR /&gt;memory    32700   26903    5797   82%&lt;BR /&gt;total     52700   46903    5797   89%       &lt;BR /&gt;&lt;BR /&gt;Basically, my question is, should I add more Swap?? Howcome Memory used is so high and swap space is barely being used? Does it matter what VG swap is located in? For example, SAP/Oracle is on VG03, does it matter if I add LV Swap in VG00 as opposed to VG03? Does it affect performance? Is there a guideline as to how much swap should be used, in general of course?&lt;BR /&gt;&lt;BR /&gt;As you can see, I'm not very knowledgeable with SWAP so your input here would be very much appreciated!!&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 20:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205392#M464076</guid>
      <dc:creator>Fern H2O</dc:creator>
      <dc:date>2009-10-21T20:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205393#M464077</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;a) "...should I add more Swap?? ..." - yep&lt;BR /&gt;b) "...Howcome Memory used is so high and swap space is barely being used?..." - Normal.  Swapping is bad and slower I/O fetching than in memory.&lt;BR /&gt;c) "..Does it matter what VG swap is located in? ..." - vg00 lvol2 must always be the 2nd lvol in vg00.  Any additional 2ndary swap can be in any vg.&lt;BR /&gt;d) "...Does it affect performance..." - No, as long as they are on different luns/disk/PVs.  You create a disk bottle neck if too much I/O is on the same disk.  And better performance is obtained with more spindles / luns.  This is load balancing and a frequent subject in you job - How to balance the load for better performance.&lt;BR /&gt;e) "...Is there a guideline as to how much swap should be used, in general of course?..."  Right now you are at 89%.  You want to always be below 75%.  If you expect swap growth then add as much to get down to 50%.&lt;BR /&gt;&lt;BR /&gt;Refer to this doc&lt;BR /&gt;&lt;BR /&gt;C:\Users\MFS\Documents\HP-UX\Understanding HP-UX swap reservation and allocation.htm&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 21:52:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205393#M464077</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2009-10-21T21:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205394#M464078</link>
      <description>Fern H20,&lt;BR /&gt;&lt;BR /&gt;Also check this out:, &lt;BR /&gt;&lt;BR /&gt;How Much Swap Do I need?&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/1219/tuningwp.html#swapneed" target="_blank"&gt;http://docs.hp.com/en/1219/tuningwp.html#swapneed&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Swap space management:&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/1218/mem_mgt.html#SWAP" target="_blank"&gt;http://docs.hp.com/en/1218/mem_mgt.html#SWAP&lt;/A&gt; SPACE MANAGEMENT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Wed, 21 Oct 2009 22:14:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205394#M464078</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2009-10-21T22:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205395#M464079</link>
      <description>Thanks Michael &amp;amp; Raj! That was very helpful. I now get the gist of what swap is.&lt;BR /&gt;&lt;BR /&gt;One question though, in the document Raj provided, what does it mean by: &lt;BR /&gt;&lt;BR /&gt;NOTE: For best performance, swap space should be distributed evenly across all disks configured with swap&lt;BR /&gt;&lt;BR /&gt;I'm not sure exactly what that means. Could you give me an example??&lt;BR /&gt;&lt;BR /&gt;P.S. Michael, I think you forgot to attach your document.</description>
      <pubDate>Thu, 22 Oct 2009 12:20:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205395#M464079</guid>
      <dc:creator>Fern H2O</dc:creator>
      <dc:date>2009-10-22T12:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205396#M464080</link>
      <description>One More Thing,&lt;BR /&gt;&lt;BR /&gt;I already have 20GB on VG00 and thanks to your input I'm going to add another 10GB. But, my question is, should I add it in VG00? or would it be better to add it on another VG? Perhaps the same VG where SAP/Oracle are in? Or maybe create a new VG with disk just for swap? And why?&lt;BR /&gt;&lt;BR /&gt;Thanks alot guys!</description>
      <pubDate>Thu, 22 Oct 2009 12:25:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205396#M464080</guid>
      <dc:creator>Fern H2O</dc:creator>
      <dc:date>2009-10-22T12:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205397#M464081</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; NOTE: For best performance, swap space should be distributed evenly across all disks configured with swap. I'm not sure exactly what that means.&lt;BR /&gt;&lt;BR /&gt;The idea is that if you have multiple swap device files on different physical disks, you might want to set the swap priority equal and allow any swap I/O to be interleaved (round-robined) among the devices.  This keeps any one physical disk from doing all the I/O and potentially being slowed.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I already have 20GB on VG00 and thanks to your input I'm going to add another 10GB. But, my question is, should I add it in VG00? or would it be better to add it on another VG? Perhaps the same VG where SAP/Oracle are in? Or maybe create a new VG with disk just for swap? And why?&lt;BR /&gt;&lt;BR /&gt;My personal preference is to add secondary device swap to something _other than_ vg00 where primary swap resides.  I then set the swap priority to a _lower_ numeric value than primary swap which makes the secondary swap device the _preferred_ one over the primary.  This would reduce vg00 I/O in times of swap activity.&lt;BR /&gt;&lt;BR /&gt;All of your choices are adding or subtracting drops from a rainstorm.  You never want to actually do swap I/O.  You want to have enough memory and you want to control your running environment in a way that avoids swapping.  You do need some swapspace for process reservation.  That is, every process must _reserve_ swap space in anticipation that if it is every truly needed in will be available,  This differs from actual swapping.  You can use 'vmstat' and look at the page-out (po) values.  Numbers greater than about 10 indicate the beginning of significant swapping and the beginning of overall performance degradation.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 22 Oct 2009 12:42:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205397#M464081</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-10-22T12:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205398#M464082</link>
      <description>I like JRF's rainstorm analogy - here's another I use to try and explain why spending time optimising swap is a pretty fruitless exercise...&lt;BR /&gt;&lt;BR /&gt;when you look at the relative speeds of memory access vs disk access you quickly realise there is NO POINT in trying to "optimize" your swap disk speed.&lt;BR /&gt;&lt;BR /&gt;Consider:&lt;BR /&gt;&lt;BR /&gt;a typical memory access might take 150ns (nano-seconds or billionth of a second). so that's:&lt;BR /&gt;&lt;BR /&gt;0.00000015s&lt;BR /&gt;&lt;BR /&gt;a typical disk access on a nice fast disk system could realistically get as good as 4ms (milli-seconds or thousandth of a second). so that's:&lt;BR /&gt;&lt;BR /&gt;0.004s&lt;BR /&gt;&lt;BR /&gt;So thats a difference of about 26,000 times!&lt;BR /&gt;&lt;BR /&gt;To put that into context its like comparing a man walking (4mph) to some future concept spacecraft travelling at 100,000mph. If the man optimizes what he's doing (starts running) in relative terms its not going to make much difference.&lt;BR /&gt;&lt;BR /&gt;So just make sure you *have* enough swap, but really don't worry about the performance of it - it really won't matter.... much better put put your efforts into making sure you have enough physical RAM, or you tune your system to not exceed your phsyical RAM so you never actually have to use swap...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 22 Oct 2009 12:50:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205398#M464082</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-10-22T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Swap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205399#M464083</link>
      <description>Thanks alot everyone!&lt;BR /&gt;&lt;BR /&gt;You've been of great help!</description>
      <pubDate>Thu, 22 Oct 2009 12:53:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swap/m-p/5205399#M464083</guid>
      <dc:creator>Fern H2O</dc:creator>
      <dc:date>2009-10-22T12:53:32Z</dc:date>
    </item>
  </channel>
</rss>

