LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 11-17-2003, 10:56 AM   #1
mindcry
Member
 
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118

Rep: Reputation: 15
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.
 
Old 11-17-2003, 12:02 PM   #2
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
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.
 
Old 11-17-2003, 12:10 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 11-17-2003, 01:03 PM   #4
mindcry
Member
 
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118

Original Poster
Rep: Reputation: 15
So what would you suggest for a server with 8gb of ram? 2GB isnt close to the general 2x the amount of RAM rule.
 
Old 11-17-2003, 01:20 PM   #5
tmillard
Member
 
Registered: Sep 2003
Distribution: Gentoo
Posts: 74

Rep: Reputation: 15
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.
 
Old 11-17-2003, 01:22 PM   #6
tmillard
Member
 
Registered: Sep 2003
Distribution: Gentoo
Posts: 74

Rep: Reputation: 15
Correction, _One_ of my boxs!
 
Old 11-17-2003, 01:35 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 11-17-2003, 01:53 PM   #8
mindcry
Member
 
Registered: Nov 2002
Distribution: Libranet 2.8 Debian Solaris 9
Posts: 118

Original Poster
Rep: Reputation: 15
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.
 
  


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 Partition Size Murdock1979 Slackware 11 07-27-2005 01:09 AM
swap partition size alaios Linux - General 4 09-27-2004 01:21 PM
RHAS2.1 Itainium - Max swap size? Atak Kat Red Hat 3 10-20-2003 05:26 PM
swap partition size? Toker Linux - Newbie 16 10-12-2003 11:19 AM
change swap partition size? jamaso Linux - General 4 07-03-2002 09:46 AM


All times are GMT -5. The time now is 09:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration