LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-09-2003, 05:14 PM   #1
Toker
Member
 
Registered: Sep 2003
Distribution: Mandrake9.1
Posts: 92

Rep: Reputation: 15
swap partition size?


I've got 1GB 2700 ddram and a crap load of unpartitioned space. I reading alot of things that claim with that much ram, I don't need a swap drive, but could it really hurt? With programs growing in size, I'd feel safer with a "back-up" swap drive, and I'm just wondering how big I should make the partition... half, equal or twice the ram size seems to be the obvious options...

Any opinions?
 
Old 10-09-2003, 05:21 PM   #2
jowid
LQ Newbie
 
Registered: Oct 2003
Posts: 3

Rep: Reputation: 0
Mine swap space has the same size as the ram in my machine. And i have got no problems.

Maybe this helps you.

Greetings,
Jochen
 
Old 10-09-2003, 05:33 PM   #3
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
it used to be 2 x ram, but that really only applies to low mem machines. 250MB-500MB will work fine
 
Old 10-09-2003, 05:35 PM   #4
Gill Bates
Member
 
Registered: Aug 2003
Location: the far side
Distribution: OpenSuSe 10.2, Mac OS X Tiger
Posts: 380

Rep: Reputation: 30
i go about 700mb just in case;
only saw it using 600 once, but that was when one of my apps was running out of control :O
 
Old 10-09-2003, 06:12 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
I tend to make mine from 100mb to 200mb.. Most of the time I'm wasting space with that even as its rarely touched.

Desktop machine with normal apps and you got over 128 megs of ram, go with 100 to 125 mb for swap.

Server with many many users, use double your RAM or no more than a gig or so.. that's if you got the hard drive space, etc.
 
Old 10-09-2003, 10:39 PM   #6
car313
LQ Newbie
 
Registered: Oct 2003
Location: Tirupati, AP State, INDIA
Distribution: Mandrake 9.1 at present but I keep formatting the disk and load different distros.
Posts: 13

Rep: Reputation: 0
1 gb ram seems plenty. so from what i have heard, you dont really need a swap partition unless of course the install procedure is bent on asking for some swap space.

car313
 
Old 10-10-2003, 12:13 AM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by car313
1 gb ram seems plenty. so from what i have heard, you dont really need a swap partition unless of course the install procedure is bent on asking for some swap space.

car313
Its still in the best interest to create a swap partition, even if you have 4 GB of RAM... I would only recommend a 100 meg size swap at a minimum and maximum in all cases.
 
Old 10-11-2003, 01:48 AM   #8
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
I've got 1GB of RAM on my rig with a 256Mg swap file. The swap file hardly ever gets touched, and when it does, it's a very minimal impact. The way I look at it is with the large drives these days, a couple hundred meg won't make much difference one way or the other, but at the same time, why waste space unnecessarily. From what I've seen, and what other posters have noted, is that the "double the RAM" guideline is obsolete, and generally either 256Mg or 512Mg of swap ought to be sufficient no matter how much RAM you've got.

All I can say is that for me, 256Mg has been way more than enough. -- J.W.
 
Old 10-11-2003, 03:23 AM   #9
Gill Bates
Member
 
Registered: Aug 2003
Location: the far side
Distribution: OpenSuSe 10.2, Mac OS X Tiger
Posts: 380

Rep: Reputation: 30
unless u are in development and ur own apps can go wrong ...
 
Old 10-11-2003, 12:41 PM   #10
robotoverflow
LQ Newbie
 
Registered: Oct 2003
Location: Sydney, Australia
Distribution: Slackware 9.1
Posts: 8

Rep: Reputation: 0
Since you have 1GB of RAM I doubt that the swap would even be used that much, no matter what you use that system for. You should be able to set it to around 50MB and not feel any loss of performance. Mind you, that's a safe figure, you could probably go lower. If you find out that you do need a larger swap there are ways to work out how large it has to be.

The amount of swap you need depends on what you're using it for and how much Memory you have. You can usually work out how much you need by estimating how much memory is required in total (physical & virtual) and subtracting the amount of physical Memory you currently have. The remainder is what your Swap size should be. It's good for system performance if you can hit that 'sweet spot', since a swap that's too large will be slower to read & write to at times, and that's a bad thing.

Estimating how much you need in total is the hard bit, since you never really do the exact same thing ALL the time on systems such as workstations or multimedia machines. You have to work out what the worst case scenario is regarding ram requirements and set the swap so it can deal with it if need be. If you have no idea what the amount you require is, your best bet is to over-estimate and set the swap, test it out by running your system under load, and then resizing it to a smaller size if you feel that your system wouldn't lose any performance.

Last edited by robotoverflow; 10-11-2003 at 12:45 PM.
 
Old 10-11-2003, 01:40 PM   #11
Gill Bates
Member
 
Registered: Aug 2003
Location: the far side
Distribution: OpenSuSe 10.2, Mac OS X Tiger
Posts: 380

Rep: Reputation: 30
do large swap sizes slow down performance?
 
Old 10-11-2003, 01:52 PM   #12
robotoverflow
LQ Newbie
 
Registered: Oct 2003
Location: Sydney, Australia
Distribution: Slackware 9.1
Posts: 8

Rep: Reputation: 0
Well it depends on what you're doing I guess. If you're playing games (like Quake 3, etc) or multitasking like crazy, then yeah, going overboard with the size can effect your performance. There's an article at www.adriansrojakpot.com that goes into detail about swap file optimisation. I can't remember if it covers swap files in linux but it should still be very relevent.
 
Old 10-11-2003, 03:27 PM   #13
Gill Bates
Member
 
Registered: Aug 2003
Location: the far side
Distribution: OpenSuSe 10.2, Mac OS X Tiger
Posts: 380

Rep: Reputation: 30
isnt that windows specific though?
 
Old 10-11-2003, 03:54 PM   #14
robotoverflow
LQ Newbie
 
Registered: Oct 2003
Location: Sydney, Australia
Distribution: Slackware 9.1
Posts: 8

Rep: Reputation: 0
Quote:
Originally posted by robotoverflow
I can't remember if it covers swap files in linux but it should still be very relevent.
 
Old 10-12-2003, 08:43 AM   #15
Gill Bates
Member
 
Registered: Aug 2003
Location: the far side
Distribution: OpenSuSe 10.2, Mac OS X Tiger
Posts: 380

Rep: Reputation: 30
well given the drastically different virtual memory management of windows and linux i would not say it is relevant at all

 
  


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 02:09 AM
What size should I make my swap partition? bobotoes Linux - Newbie 7 09-30-2004 11:36 PM
swap partition size alaios Linux - General 4 09-27-2004 02:21 PM
Max swap partition size mindcry Linux - Software 7 11-17-2003 02:53 PM
change swap partition size? jamaso Linux - General 4 07-03-2002 10:46 AM


All times are GMT -5. The time now is 06:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration