LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-13-2005, 08:08 AM   #1
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Do I need SWAP on for my Laptop?


Hi all,

My Laptop h/w is:

Celeron-M 1.5 Ghz
1Gb RAM (upto 64Mb shared with graphics card)
60Gb HD.

As the subject says, I want to install Mandriva (probably with all the bells and whistles and eye candy) but I don't know whether I really need a 2Gb SWAP partition (as I understand it the SWAP is generally 2x physical RAM) given that I have 1Gb RAM already. Please advise.

Thanks in advance.
 
Old 08-13-2005, 08:47 AM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
From what I've read it's best to have a swap file. Linux makes maximum use of swap and ram memory to make the system run as smooth as possible. However, (again from what I've read) if you have 1GB of RAM there's no need to do 2xRAM for SWAP. I'd go for 1GB SWAP.
 
Old 08-13-2005, 11:07 AM   #3
ctkroeker
Senior Member
 
Registered: May 2005
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
You actually won't need a SWAP. I have 512MB Ram and it doesn't touch the SWAP.
 
Old 08-13-2005, 11:19 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I would create a small swap partition of about 256MB. Swap doesn't need to be 2xRAM, that's just a rule of thumb that's becoming outdated as RAM becomes more plentiful. The small swap partition will allow the virtual memory manager to run most efficiently.
 
Old 08-13-2005, 12:56 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I'd second Matir's suggestion of a 256Mg swap. For systems with at least 256 or 512 of RAM, it is unlikely that swap would ever see any significant use. -- J.W.
 
Old 08-13-2005, 01:32 PM   #6
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 313

Rep: Reputation: 40
swap

swap file space is necessary for.....

On a box dedicated to being a NAT/firewall, with about 90M of RAM, and 100M of swap, no swap is ever used. On this box an average of 27M of RAM is all that ever used.

On another box with 1G of RAM and 100M of swap, some swap is always in use. This box is used for everything from folding@home (when in season/cold outside) to kernel compiling, music cdburning etc...

It looks like swap depends on your requirements.
 
Old 08-14-2005, 06:32 AM   #7
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
Well as I said, I want KDE with all the graphical bells and whistles but I'd also be looking at have a couple of VM's too.

Would the general concensus be a 256Mb swap?
 
Old 08-14-2005, 07:03 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You said laptop.
If you plan to use Suspend2, I believe it writes the memory image(s) to swap.
Wouldn't pay to scrimp on swap IMHO.
 
Old 08-14-2005, 08:38 AM   #9
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
suspend2? is that the linux equivalent to the hibernation function in xp?

If I wanted to do that I'd need at least 1G swap wouldn't I?
 
Old 08-14-2005, 04:20 PM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Yes, mickyg. Well, you can get away with somewhat less due to compression, but it's hard to determine how well the compression algorithm will run on any given data set.
 
Old 08-15-2005, 12:13 PM   #11
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
if you want to use hibernation, my guess would be to go with more than 1 GB of swap, even if it's a damn waste of space... In case you RAM is "full" you will need 1 GB of swap to hibernate, plus what swap will be in use at the time of hibernation.
 
Old 08-15-2005, 01:57 PM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I would remain with the old adage that "2x RAM" is an appropriate amount of swap space, and that you should have it.

I'm not sure that I would plan to use hibernation ...
 
Old 08-15-2005, 03:39 PM   #13
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
Would you care to elaborate as to why?

I'm not intending to use it all the time, I just don't want to have 256MB swap and find that I can't use it at all.

Also, this might be a really stupid obvious question but, if I have more swap does that mean I can have more programs open and my computer will generally run smoother or will it not make much of a difference given the amount of physical RAM I have?

Last edited by mickyg; 08-15-2005 at 03:51 PM.
 
Old 08-15-2005, 03:54 PM   #14
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Just tried what my machine will do: got 500+ ram and whatever I do, I never get above 200mb swap
 
Old 08-15-2005, 07:11 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
What's a bit of (potentially wasted) disk space these days ???.
Lots of desktop users never see it used.
If you need to swap, and you don't have any active, something (maybe everything) dies a horrible death.
Then there is Suspend2 and its ilk.

Your choice what is acceptable risk.

As an aside I run a Gig plus 5 Gig swap, and I regularly see 2 Gig of the swap actively in use.
Not your typical user, but there are cases where it really gets used.
 
  


Reply

Tags
laptop, memory, swap



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
laptop freezing up, swap disabled? ehawk Linux - Hardware 0 10-04-2004 03:27 PM
Swap-out cd/floppy drive on laptop. acratus Slackware - Installation 4 07-24-2004 02:02 PM
Mandrake 10.0 Laptop Won't Boot Past "Activating Swap Partitions"? Aaron Josephson Linux - Software 0 06-26-2004 08:02 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:34 PM.

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