- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- swap space recommendation on 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
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
тАО11-01-2007 07:26 AM
тАО11-01-2007 07:26 AM
Red Hat Linux Advanced Server release 2.1AS (Pensacola)
# uname -a
Linux hostname 2.4.9-e.71smp #1 SMP Thu Nov 23 11:51:48 EST 2006 i686 unknown
i have 4GB RAM and 4GB swap currently. often the swap goes beyond 85%.
What would be the ideal RAM/SWAP ratio?what are the recommendations when we add the swap online?I would like to add additinal swap space from an existing disk /dev/sdb. I dont have LVM.My plan is to create one 2GB partion on /dev/sdb
# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 2097136 1548124 -1
/dev/sdb1 partition 2097136 1268328 -2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2007 08:09 AM
тАО11-01-2007 08:09 AM
SolutionSwap should equal 2x physical RAM for up to 2 GB of physical RAM, and then 1x physical RAM for any amount above 2 GB, but never less than 32 MB.
Using this formula, a system with 2 GB of physical RAM would have 4 GB of swap, while one with 3 GB of physical RAM would have 5 GB of swap. Creating a large swap space partition can be especially helpful if you plan to upgrade your RAM at a later time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2007 08:20 AM
тАО11-01-2007 08:20 AM
Re: swap space recommendation on linux
I'd be suggesting you invest in more memory!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2007 08:31 PM
тАО11-01-2007 08:31 PM
Re: swap space recommendation on linux
all our linux servers share the same install, but you'll find different swap utilization on all of them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2007 10:02 PM
тАО11-01-2007 10:02 PM
Re: swap space recommendation on linux
Normally swap file is set to 1.5 - 2.0x the physical memory. However, as the memory increases, the rule need not be adhered to.
There is also a parameter called swappiness (/proc/sys/vm/swappiness), if you are sure that the physical memory is sufficient for the operations and that swap file need not be used much you can reduce the swappiness.
It goes from 0 - 100, higher the number, greater the tendency to use the swap file. You can read more about swappiness at:
http://kerneltrap.org/node/3000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2007 12:47 AM
тАО11-04-2007 12:47 AM
Re: swap space recommendation on linux
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 12:49 PM
тАО11-06-2007 12:49 PM
Re: swap space recommendation on linux
"How do I add a swap partition to my system in Red Hat Enterprise Linux? Resolution:To add a swap partition (assuming /dev/hdb2 is the swap partition you want to add): The hard drive can not be in use (partitions can not be mounted, and swap space can not be enabled). The partition table should not be modified while in use because the kernel may not properly recognize the changes. Data could be overwitten by writing to the wrong partition because the partition table and partitions mounted do not match. The easiest way to achieve this is to boot your system in rescue mode. When prompted to mount the file system, select Skip.
Alternately, if the drive does not contain any partitions in use, you can unmount them and turn off all the swap space on the hard drive with the swapoff command."
is there anyway i can achieve adding another swap partition from same disk w/o taking down time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2007 04:00 PM
тАО11-06-2007 04:00 PM
Re: swap space recommendation on linux
If you've got no available space (unpartitioned space), but available space in a filesystem, then you can create 'swap files', and use them as swap space instead to get you past a temporary issue.
The details on how to do that are in the 'mkswap' man page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2007 07:40 AM
тАО11-07-2007 07:40 AM
Re: swap space recommendation on linux
But the recommendation/warning posted in "quote" (from parted)do NOT allow me to go ahead and try this. Also this is a PROD box and dont want to give a chance
i have enough space on this particular disk. But there is an existing swap partition on the same disk.
I started with fdisk ; created a partion with id 82(Linux-swap)
But swapon was failing .
#swapon /dev/sdb2
swapon: /dev/sdb2: No such device or address
Then i started with parted. So what i posted in quote earlier are the recommendations from parted.
"mkpart PART-TYPE [FS-TYPE] START END make a partition"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2007 12:55 AM
тАО11-09-2007 12:55 AM
Re: swap space recommendation on linux
the ansers to "swap space recommendation on linux" were pretty help full.
but adding swap online from an existing disk(swap enabled with one partion) is not possible with 2.1 kernel.
other choice to add file swap whihc i dont prefer for this scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2007 10:43 PM
тАО11-11-2007 10:43 PM