LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-31-2009, 07:41 PM   #1
darsunt
Member
 
Registered: Jan 2007
Location: Huntington Beach, CA
Distribution: Red Hat
Posts: 51

Rep: Reputation: 15
Is it feasible to use an entire disk as swap space?


Has anyone configured a linux installation using an entire disk as swap space? I'm thinking about doing this with one or two 250G hard drives. We are experimenting with very large swap space.

I would think that would be feasible, and actually faster with more disks. But I've never tried it.
 
Old 08-31-2009, 08:03 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,782

Rep: Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573Reputation: 3573
I doubt it - kswapd uses the block level device drivers. I think it checks the partition table as part of mkswap, but it's been a while since I looked at the code. A partition covering the whole disk would probably be o.k.
Multiple disks on separate controllers would be best - if the swap were all at the same priority; kswapd will stripe across them.
 
Old 09-01-2009, 07:23 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
See here:
http://tldp.org/HOWTO/Partition/requirements.html

Quote:
4.4.2. How large can my swap space be?

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. For linux kernels 2.1 and earlier, the limit is 128Mb. The partition may be larger than 128 MB, but excess space is never used. If you want more than 128 MB of swap for a 2.1 and earlier kernel, you have to create multiple swap partitions (8 max). After 2.4, 32 swap areas are "officially" possible. See setting up swap for details.

footnote: "official" max swap size: With kernel 2.4, the limit is 64 swap spaces at a maximum of 64Gb each, although this is not reflected in the man page for mkswap. With the 64 bit opteron on the 2.6 kernel, 128 swap areas are permitted, each a whopping 16 Tb! (thanks to Peter Chubb for the calculation)
It depends a lot on your system ... kernel version, architecture, etc.

I very much doubt you could improve performance in this way, at least not significantly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap disk or space in a quad BOOT Bobymc Linux - Software 1 05-28-2006 11:21 AM
Linux uses up Disk 2 for swap space jwcooley Linux - Software 2 03-14-2006 09:05 PM
Finding Used / Free Space for the Entire Hard Disk Jayaraghavendran Programming 1 03-03-2006 05:33 AM
Add Hard disk for swap space with problems in boot sector rkes7 Linux - Hardware 1 01-25-2004 02:41 AM
/root/.xsession-errors is taking up the entire free space on disk! Freeek Linux - General 5 10-06-2003 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration