- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Swap space issue
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 08:51 AM
тАО04-21-2010 08:51 AM
Here is the output of the free command:
# free
total used free shared buffers cached
Mem: 16436856 16349104 87752 0 1912 1105768
-/+ buffers/cache: 15241424 1195432
Swap: 16779884 8389580 8390304
#
and output of fdisk -l is:
# fdisk -l /dev/sda
Disk /dev/sda: 146.6 GB, 146694733824 bytes
255 heads, 63 sectors/track, 17834 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2102 16779892+ 82 Linux swap / Solaris
/dev/sda3 2103 4713 20972857+ 83 Linux
/dev/sda4 4714 17834 105394432+ 5 Extended
/dev/sda5 4714 6018 10482381 83 Linux
/dev/sda6 6019 7323 10482381 83 Linux
/dev/sda7 7324 8106 6289416 83 Linux
/dev/sda8 8107 8367 2096451 83 Linux
/dev/sda9 8368 8628 2096451 83 Linux
#
We can add some space space in the extended partition here.
My questions here are:
1- Does adding swap space solve the performance issue?
2- If yes, what will be steps involved in adding the swap space to this system?
3- Any other recommendations or thoughts?
Any help is highly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 09:48 AM
тАО04-21-2010 09:48 AM
Solution1- Does adding swap space solve the performance issue?
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.
2- If yes, what will be steps involved in adding the swap space to this system?
Add disk for swap, carve it up with fdisk
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-swap-adding.html
3- Any other recommendations or thoughts?
More memory.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 10:46 AM
тАО04-21-2010 10:46 AM
Re: Swap space issue
Need your suggestion.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 10:48 AM
тАО04-21-2010 10:48 AM
Re: Swap space issue
# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 2254512 10682404 30412 146744 2 17 2 19 0 0 1 1 98 0 0
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 12:06 PM
тАО04-21-2010 12:06 PM
Re: Swap space issue
Your current stats do not show an issue but I will key off of the swap space comment.
If you run out of swap space then new processes cannot fork and will not run.
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.
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.
Adding swap will NOT solve your performance issue. Once you start swapping ( aka running out of physical ram) performance will be poor.
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 12:11 PM
тАО04-21-2010 12:11 PM
Re: Swap space issue
from this:
# free
total used free shared buffers cached
Mem: 16436856 16349104 87752 0 1912 1105768
-/+ buffers/cache: 15241424 1195432
Swap: 16779884 8389580 8390304
I see 16GB physical total.
877mb free and 1.1GB in cache.
The cache is dynamic and will give it up if needed.
so 877mb of free + 1.1GB of cache is currently available for process use. (~2GB available )
this is a snapshot in time, so right at that moment you were ok. need to review stats over time with sar, vmstat, etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2010 12:45 PM
тАО04-21-2010 12:45 PM
Re: Swap space issue
I do not see paging going on.
The problem is likely from a lack of swap space available for reservation.
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.
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.
For a large memory system to operate at full memory utilization, the minimum amount of swap required is in my opinion 50% of RAM.
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.
In this instance I would strongly consider setting system swap space to between 50% and 100% of RAM.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com