- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Swap space for Linux
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
Forums
Discussions
Discussions
Discussions
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
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
06-09-2009 10:24 PM
06-09-2009 10:24 PM
Swap space for Linux
I am going to install RHEL5 for the DL580 server. It has 8GB RAM. But I don't know most suitable swap space for the 8GB RAM Space. Please help me to solve this out.
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2009 11:54 PM
06-09-2009 11:54 PM
Re: Swap space for Linux
The reality is the amount of swap space a system needs is not really a function of the amount of RAM it has but rather the memory workload that is running on that system. A Red Hat Enterprise Linux 5 system will run just fine with no swap space at all as long as the sum of anonymous memory and system V shared memory is less than about 3/4 the amount of RAM. In this case the system will simply lock the anonymous and system V shared memory into RAM and use the remaining RAM for caching file system data so when memory is exhausted the kernel only reclaims pagecache memory.
Considering that 1) At installation time when configuring the swap space there is no easy way to predetermine the memory a workload will require, and 2) The more RAM a system has the less swap space it typically needs, a better swap space
Swap space == Equal RAM size (if RAM < 2GB)
Swap space == 2GB size (if RAM > 2GB)
Swap space == Equal RAM size (if RAM < 8GB)
Swap space == 0.50 times the size of RAM (if RAM > 8GB)
thanks and regards
Sajjad Sahir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 12:44 AM
06-10-2009 12:44 AM
Re: Swap space for Linux
As per the customer requested, I kept 32GB SWAP sapce for 16GB memory. My HDD is 146GB and created 8GB x 4 SWAP sapce instead of creating 32GB swap sapce. So let me know that any thing wrong with this config.
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 02:32 AM
06-10-2009 02:32 AM
Re: Swap space for Linux
i think the SWAP space should be contignues if its on one HDD, if each SWAP is on separated physical HDD them your option will be the best to the performance.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 03:49 AM
06-10-2009 03:49 AM
Re: Swap space for Linux
I have created these all swaps on a one disk.So may I able to get all 4 swaps into one swap now? Or else , if i use this as it is, will it be issue for the perfomance?
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 03:56 AM
06-10-2009 03:56 AM
Re: Swap space for Linux
check fdisk -l /dev/your_disk
and if the swaps are together it could be ok,
but if there are some partitions between the disk wiil be slower as if you are use one SWAP.
mikap
PS : in my opinion is to use better one swap instead of many on the same disk !!!.
the swap shhould be always contigues, if isn;t the head on the HDD will spin betveen 2-4 swap areas, and of course the speed will be decreesed !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 07:31 PM
06-10-2009 07:31 PM
Re: Swap space for Linux
What is the possibility of deleting all 4 existing swaps and create one 32GB swap?
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 10:39 PM
06-10-2009 10:39 PM
Re: Swap space for Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 10:50 PM
06-10-2009 10:50 PM
Re: Swap space for Linux
Can you please point out the commands?
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2009 03:18 AM
06-11-2009 03:18 AM
Re: Swap space for Linux
Just my humble opinion but 32Gb of disk space for swap is wasteful.
Official guidance from Red Hat is a minimum of 16Gb of swap for 32Gb of RAM. http://kbase.redhat.com/faq/docs/DOC-15252
Personally I would stick to the 16Gb minimum - in my experience once a server has used more than around 4Gb of swap performance of the whole server will be significantly affected.
32G of physical RAM should be ample for most applications, but the rules for swap are different for some applications, for example Oracle has specific guidlines for their own software. What are you planning to run on this server?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2009 03:36 AM
06-11-2009 03:36 AM
Re: Swap space for Linux
This is going to be installed Oracle. Oracle Vender asked us to keep the swap space as 32GB because applications may take lot of memory.Accordingly we kept 32 GB and 32GB was devided in to 4 and kept 4 x 8GB swap space in the same disk.
Regards
Nirukshitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2009 03:53 AM
06-11-2009 03:53 AM
Re: Swap space for Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2009 09:51 AM
06-11-2009 09:51 AM
Re: Swap space for Linux
http://www.cyberciti.biz/tips/linux-swap-space.html
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 07:19 AM
06-15-2009 07:19 AM
Re: Swap space for Linux
Splitting swap into 4 partitions on the same disk doesn't gain you anything. Better to keep it as one area.
Same thing goes for contiguous swap partitions. Swap files are just as fast as raw partitions now on 2.6, and are not contiguous. In fact a default Redhat install will create an LVM Logical Volume for swap, and that is definitely not contiguous by default. The default allocation policy for an LV is "inherit" which copies the default "normal" allocation policy from the Volume Group. You can change an LV's allocation policy to contiguous if you want with lvchange, and the allocation policy changes accordingly as seen in lvdisplay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2009 07:47 AM
06-15-2009 07:47 AM
Re: Swap space for Linux
The old rule that swap needs to be twice RAM simply does not apply on large ram systems.
You need swap to be at least 50% ram to have adequate swap reservation space for processes.
I find a 1 to 1 ratio works on big systems.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com