<?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 space issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621769#M40544</link>
    <description>I have a system running some tomcat application on it. The users are having some performance issues and the application owner are pushing this issue on us that it is due to swap space.&lt;BR /&gt;&lt;BR /&gt;Here is the output of the free command:&lt;BR /&gt;&lt;BR /&gt;# free&lt;BR /&gt;             total       used       free     shared    buffers     cached&lt;BR /&gt;Mem:      16436856   16349104      87752          0       1912    1105768&lt;BR /&gt;-/+ buffers/cache:   15241424    1195432&lt;BR /&gt;Swap:     16779884    8389580    8390304&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and output of fdisk -l is:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# fdisk -l /dev/sda&lt;BR /&gt;&lt;BR /&gt;Disk /dev/sda: 146.6 GB, 146694733824 bytes&lt;BR /&gt;255 heads, 63 sectors/track, 17834 cylinders&lt;BR /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;BR /&gt;&lt;BR /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;BR /&gt;/dev/sda1   *           1          13      104391   83  Linux&lt;BR /&gt;/dev/sda2              14        2102    16779892+  82  Linux swap / Solaris&lt;BR /&gt;/dev/sda3            2103        4713    20972857+  83  Linux&lt;BR /&gt;/dev/sda4            4714       17834   105394432+   5  Extended&lt;BR /&gt;/dev/sda5            4714        6018    10482381   83  Linux&lt;BR /&gt;/dev/sda6            6019        7323    10482381   83  Linux&lt;BR /&gt;/dev/sda7            7324        8106     6289416   83  Linux&lt;BR /&gt;/dev/sda8            8107        8367     2096451   83  Linux&lt;BR /&gt;/dev/sda9            8368        8628     2096451   83  Linux&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;We can add some space space in the extended partition here.&lt;BR /&gt;&lt;BR /&gt;My questions here are:&lt;BR /&gt;&lt;BR /&gt;1- Does adding swap space solve the performance issue? &lt;BR /&gt;&lt;BR /&gt;2- If yes, what will be steps involved in adding the swap space to this system?&lt;BR /&gt;&lt;BR /&gt;3- Any other recommendations or thoughts?&lt;BR /&gt;&lt;BR /&gt;Any help is highly appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 21 Apr 2010 15:51:04 GMT</pubDate>
    <dc:creator>Waqar Razi</dc:creator>
    <dc:date>2010-04-21T15:51:04Z</dc:date>
    <item>
      <title>Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621769#M40544</link>
      <description>I have a system running some tomcat application on it. The users are having some performance issues and the application owner are pushing this issue on us that it is due to swap space.&lt;BR /&gt;&lt;BR /&gt;Here is the output of the free command:&lt;BR /&gt;&lt;BR /&gt;# free&lt;BR /&gt;             total       used       free     shared    buffers     cached&lt;BR /&gt;Mem:      16436856   16349104      87752          0       1912    1105768&lt;BR /&gt;-/+ buffers/cache:   15241424    1195432&lt;BR /&gt;Swap:     16779884    8389580    8390304&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and output of fdisk -l is:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# fdisk -l /dev/sda&lt;BR /&gt;&lt;BR /&gt;Disk /dev/sda: 146.6 GB, 146694733824 bytes&lt;BR /&gt;255 heads, 63 sectors/track, 17834 cylinders&lt;BR /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;BR /&gt;&lt;BR /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;BR /&gt;/dev/sda1   *           1          13      104391   83  Linux&lt;BR /&gt;/dev/sda2              14        2102    16779892+  82  Linux swap / Solaris&lt;BR /&gt;/dev/sda3            2103        4713    20972857+  83  Linux&lt;BR /&gt;/dev/sda4            4714       17834   105394432+   5  Extended&lt;BR /&gt;/dev/sda5            4714        6018    10482381   83  Linux&lt;BR /&gt;/dev/sda6            6019        7323    10482381   83  Linux&lt;BR /&gt;/dev/sda7            7324        8106     6289416   83  Linux&lt;BR /&gt;/dev/sda8            8107        8367     2096451   83  Linux&lt;BR /&gt;/dev/sda9            8368        8628     2096451   83  Linux&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;We can add some space space in the extended partition here.&lt;BR /&gt;&lt;BR /&gt;My questions here are:&lt;BR /&gt;&lt;BR /&gt;1- Does adding swap space solve the performance issue? &lt;BR /&gt;&lt;BR /&gt;2- If yes, what will be steps involved in adding the swap space to this system?&lt;BR /&gt;&lt;BR /&gt;3- Any other recommendations or thoughts?&lt;BR /&gt;&lt;BR /&gt;Any help is highly appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2010 15:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621769#M40544</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2010-04-21T15:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621770#M40545</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1- Does adding swap space solve the performance issue?&lt;BR /&gt;&lt;BR /&gt;If apps will not launch for inability to reserve swap space, adding swap will help. If there is actual paging going on (vmstat) then no swap space addition will not help. In the case of actual paging, either reduce the demand for memory or increase the supply.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2- If yes, what will be steps involved in adding the swap space to this system?&lt;BR /&gt;&lt;BR /&gt;Add disk for swap, carve it up with fdisk&lt;BR /&gt;&lt;A href="http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-swap-adding.html" target="_blank"&gt;http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-swap-adding.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;3- Any other recommendations or thoughts?&lt;BR /&gt;&lt;BR /&gt;More memory.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 21 Apr 2010 16:48:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621770#M40545</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-04-21T16:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621771#M40546</link>
      <description>We have graphs of available swap space for a week and we have noticed that some times, the available free swap space reaches to 0. The application starts without any problem but they are having some performace issues. And from the research, it seems that available swap space some times reaches to zero.&lt;BR /&gt;&lt;BR /&gt;Need your suggestion.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 21 Apr 2010 17:46:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621771#M40546</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2010-04-21T17:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621772#M40547</link>
      <description>Here is the output of vmstat:&lt;BR /&gt;&lt;BR /&gt;# vmstat&lt;BR /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------&lt;BR /&gt; r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st&lt;BR /&gt; 0  0 2254512 10682404  30412 146744    2   17     2    19    0    0  1  1 98  0  0&lt;BR /&gt;#&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2010 17:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621772#M40547</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2010-04-21T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621773#M40548</link>
      <description>Wagar,&lt;BR /&gt;&lt;BR /&gt;Your current stats do not show an issue but I will key off of the swap space comment.&lt;BR /&gt;&lt;BR /&gt;If you run out of swap space then new processes cannot fork and will not run.&lt;BR /&gt;&lt;BR /&gt;From your current stats this server has 16gb of physical ram of which the buffer cache has 1GB allocated ( this tells me that you have 1GB still available ), so currently no issue.&lt;BR /&gt;&lt;BR /&gt;If you see swap space at zero I would allocate additional swap space using what is available on /dev/sda starting at cyl 8629 and up to cyl 17384.&lt;BR /&gt;&lt;BR /&gt;Adding swap will NOT solve your performance issue. Once you start swapping ( aka running out of physical ram) performance will be poor. &lt;BR /&gt; &lt;BR /&gt;You will need more RAM to solve that, adding swap space will solve the issue where processes cannot start due to lack of virtual memory..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2010 19:06:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621773#M40548</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2010-04-21T19:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621774#M40549</link>
      <description>sorry let me be more exact with the memory statement.&lt;BR /&gt;&lt;BR /&gt;from this:&lt;BR /&gt;# free&lt;BR /&gt;total used free shared buffers cached&lt;BR /&gt;Mem: 16436856 16349104 87752 0 1912 1105768&lt;BR /&gt;-/+ buffers/cache: 15241424 1195432&lt;BR /&gt;Swap: 16779884 8389580 8390304&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I see 16GB physical total.&lt;BR /&gt;877mb free and 1.1GB in cache.  &lt;BR /&gt;The cache is dynamic and will give it up if needed. &lt;BR /&gt;so 877mb of free + 1.1GB of cache is currently available for process use. (~2GB available )  &lt;BR /&gt;&lt;BR /&gt;this is a snapshot in time, so right at that moment you were ok.  need to review stats over time with sar, vmstat, etc...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2010 19:11:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621774#M40549</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2010-04-21T19:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Swap space issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621775#M40550</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I do not see paging going on.&lt;BR /&gt;&lt;BR /&gt;The problem is likely from a lack of swap space available for reservation.&lt;BR /&gt;&lt;BR /&gt;On a 16 GB system, I would start out at 50% of RAM as a start point for swap. This is a case where there is no penalty except lost disk space.&lt;BR /&gt;&lt;BR /&gt;I just saw a 20 GB ram system here with 2 GB of swap. But process utilization is so low on that system it is not running into the same issues you are.&lt;BR /&gt;&lt;BR /&gt;For a large memory system to operate at full memory utilization, the minimum amount of swap required is in my opinion 50% of RAM. &lt;BR /&gt;&lt;BR /&gt;Since any process can be swapped to disk, the rule of thumb that might be safe is RAM=swap. This may seem like wasted disk space, but it is necessary.&lt;BR /&gt;&lt;BR /&gt;In this instance I would strongly consider setting system swap space to between 50% and 100% of RAM.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 21 Apr 2010 19:45:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-space-issue/m-p/4621775#M40550</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-04-21T19:45:21Z</dc:date>
    </item>
  </channel>
</rss>

