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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-17-2003, 10:56 AM
|
#1
|
Member
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118
Rep:
|
Max swap partition size
I was wondering if anyone had an answer of what the maximum allowed swap partition was. Someone mentioned to me that the max swap partition size that is allowed is ony 2GB.
|
|
|
11-17-2003, 12:02 PM
|
#2
|
Member
Registered: Oct 2003
Distribution: Slackware
Posts: 388
Rep:
|
Sounds about right, I'd guess 2GB of ram +2Gb of swap fills the whole address space in a 32bit machine.
Old kernels only used swap partitions up to 128MB but you could have more than one. A quick search didn't find any definative documentation on what the maximum is or which kernel versions can use large swap files.
The swapfile mini-HOWTO seems to be out of date.
Unless you are trying to do somthing unusuall like a memory intensive calculation you probably don't need 2GB of swap. The old "twice the amount of ram" rule is a anacronism from back when people used xwindow on 16MB machines.
The only time I noticed all my swap being used was when netscape leaked all the available memory, with a lot of swap the machine used to take minutes of harddrive thrashing to recover after netscape finally segfaulted.
Harddrives are much faster these days but I would not expect a machine making use of 2GB of swap to be very responsive.
|
|
|
11-17-2003, 12:10 PM
|
#3
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
That's correct for the 2.4 kernel ... there
was an ongoing discussion to change that
for newer kernels on the developers list,
though.
Cheers,
Tink
|
|
|
11-17-2003, 01:03 PM
|
#4
|
Member
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118
Original Poster
Rep:
|
So what would you suggest for a server with 8gb of ram? 2GB isnt close to the general 2x the amount of RAM rule.
|
|
|
11-17-2003, 01:20 PM
|
#5
|
Member
Registered: Sep 2003
Distribution: Gentoo
Posts: 74
Rep:
|
Wow,
2 Gigs! My box has 8 Megs of Ram and a 32 MB Swap partition.
I guess some people just want to fell like they have a *LOT* of memory.
|
|
|
11-17-2003, 01:22 PM
|
#6
|
Member
Registered: Sep 2003
Distribution: Gentoo
Posts: 74
Rep:
|
Correction, _One_ of my boxs!
|
|
|
11-17-2003, 01:35 PM
|
#7
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
You could look at
/usr/src/<your kernel mumble>/include/linux/swap.h
and see whether you can locate the bit that does
the limitation.... fix and recompile :}
As for the 2x rule ... I don't know how closely one
has to stick to it these days, but then I've never
run a server that well equipped (or heavily used)
I'd suggest having a try with 2GB and see what
kind of usage is made of it in the first place... leave
a spare 14GB behind your swapper so you can
resize it if you decided to patch the kernel.
Cheers,
Tink
|
|
|
11-17-2003, 01:53 PM
|
#8
|
Member
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118
Original Poster
Rep:
|
yeah it seems that the server has completly used all of the swap except for about maybe 50MB to 100MB. Also, it seems to have used most of the ram as well. It is pretty much pushed to the bone.
|
|
|
All times are GMT -5. The time now is 10:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|