- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: multiple swap filesystems
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
03-19-2006 02:23 AM
03-19-2006 02:23 AM
1, does 2.6 kernel support more than 2 GB of swap ?
2, If not, then is it possible to have multiple swap filesystems of 2 GB?
3, If multiple swap partitions are supported then how many max swap partitions do we have ?
One more thing, there are two ways to create swap
1a) create partition of type 0x82
1b) mkswap -v1 /dev/hdaX
1c) add entry in /etc/fstab
1d) swapon -a
But there is another way .. Creating a swap File as:
2) dd if=/dev/zero of=swapfile bs=1024 count=X
plz le me know the diff b/w the two. I have never tried the the second(2).
Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 03:13 AM
03-19-2006 03:13 AM
SolutionWhy would you want to create as many swap partitions as possible?
as for choosing between swap file and partition:
always when possible create swap partition.
Swap file should be created only in cases when you can't add partitions...
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 05:21 AM
03-19-2006 05:21 AM
Re: multiple swap filesystems
May I ask how much on a pentium4/xeon system ?
I have search this on google but no success, my search string is :
http://www.google.com/search?hl=en&q=maximum+size+of+swap+2.6+kernel+support+is&meta=
>Why would you want to create as many swap >partitions as possible?
Its an assignment. I have told by the higher authorities to provide these information.
Higher Authorities are looking forward to upgrade their all linux systems from 2.4.* to 2.6 kernel.
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 07:52 PM
03-19-2006 07:52 PM
Re: multiple swap filesystems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2006 11:43 PM
03-19-2006 11:43 PM
Re: multiple swap filesystems
"If your partitioning scheme requires a swap partition that is larger than 2 GB, you should create an additional swap partition. For example, if you need 4 GB of swap, you should create two 2 GB swap partitions. If you have 4 GB of RAM, you should create three 2 GB swap partitions. Red Hat Enterprise Linux supports up to 32 swap files"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2006 12:00 AM
03-20-2006 12:00 AM
Re: multiple swap filesystems
I think Ivan is right.
Although we can have more than 2 gb of swap but 1 partition cant be of more size than 2 gb.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2006 03:50 AM
03-20-2006 03:50 AM
Re: multiple swap filesystems
I don't technically see anything wrong with having more than 1 swap partition (though it does seem strange) as long as the partitions are (1) not on the same physical drive, (2) not on the same interface chain, and (3) not on the same I/O bus. Otherwise, you'll just slow things down.
Ditto for having too much swap space -- the computer has to expend cpu time and real memory space allocating and tracking swap memory addresses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2006 04:33 AM
03-20-2006 04:33 AM
Re: multiple swap filesystems
1a) create say 4 partitions of type 0x82
1b) mkswap -v1 /dev/hda3
1c) mkswap -v1 /dev/hda4
1d) mkswap -v1 /dev/hda5
1e) mkswap -v1 /dev/hda6
1f) add entry in /etc/fstab
1g) swapon -a
Am I right ?
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2006 05:57 AM
03-20-2006 05:57 AM
Re: multiple swap filesystems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 04:52 AM
03-22-2006 04:52 AM
Re: multiple swap filesystems
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 07:02 AM
03-22-2006 07:02 AM
Re: multiple swap filesystems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:11 AM
03-22-2006 09:11 AM
Re: multiple swap filesystems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 09:16 AM
03-22-2006 09:16 AM
Re: multiple swap filesystems
Linux kernels 2.4 and beyond support swap sizes up to 24 GB per partition with an 8 TB theoretical maximum for 32-bit systems. Swap partitions should reside on separate disks.
Anyway, I will use 2 GB partitions for swap until Red Hat Intallation guide confirms this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 10:18 AM
03-22-2006 10:18 AM
Re: multiple swap filesystems
In /usr/include/linux/swap.h, it shows:
#define MAX_SWAPFILES 32
This file does not however state how big the individual swapfiles can be (This is from a 2.6.14-1.1637_FC4 machine).
From TLDP ( http://www.tldp.org/HOWTO/Partition/requirements.html ):
'Currently, the maximum size of a swap partition is architecture-dependent. For i386, m68k, ARM and PowerPC, it is "officially" 2Gb. It is 128Gb on alpha, 1Gb on sparc, and 3Tb on sparc64. An opteron on the 2.6 kernel can write to a 16 Tb swap partition.'
So, safe side. Stick to multiple 2GB partitions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2006 05:29 AM
03-23-2006 05:29 AM
Re: multiple swap filesystems
and Nice help Stuart Browne ;)