LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 04-21-2011, 05:54 AM   #1
slickrcbd
Member
 
Registered: Jan 2003
Posts: 45

Rep: Reputation: 1
Question on swap partitions


I have a laptop that I aquired some months ago. I wound up being too busy to install Linux on it, and installed XP instead.

Now I'm going to try installing Linux so I can learn some basic skills dealing with wireless networks and Windows authentication.

I haven't decided on Fedora or Ubuntu. I'm going to night school, and they are starting to use both. Heck, there's a mix between Fedora 12, Fedora 14, and Ubuntu something (I can't recall and am too lazy to look it up).

Anyways, when examining my hard drive, I noticed that there is 1.89gb of unused space that I can allocate between the old Vista and the XP partition. I have roughly 30gb for Linux. The computer only has 1gb of RAM.

Does the swap need to be a full 2GB, or can I use that 1.89GB of space for the swap partition? Ten years ago I was told to make the swap partition equal to the RAM, but these days I'm told to double it.

I need answers for both Fedora 14 and Ubuntu (whatever the latest stable build is). What amount of that 1.89GB should I allocate to swap? 1.0GB, 1.5, or all of it?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-21-2011, 06:04 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
You need as much swap space as you need and no heuristic (such as "double the RAM") can predict how much that will be. Best bet, especially if short of HDD space, is to swap to a file (on a file system!) instead of to a dedicated partition. That way, if you do decide you want to use a swap partition after all, you will know how much swap space your system has actually used. Further considerations if you want to hibernate.

Last edited by catkin; 04-21-2011 at 06:04 AM. Reason: speeling
 
2 members found this post helpful.
Old 04-21-2011, 06:27 AM   #3
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,968

Rep: Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546
Since you have a laptop. If you plan on using hibernation I would say at least give the swap partition a bit more than the RAM you have. I'd give it all of the 1.89G.
 
1 members found this post helpful.
Old 04-21-2011, 01:12 PM   #4
slickrcbd
Member
 
Registered: Jan 2003
Posts: 45

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by catkin View Post
You need as much swap space as you need and no heuristic (such as "double the RAM") can predict how much that will be. Best bet, especially if short of HDD space, is to swap to a file (on a file system!) instead of to a dedicated partition. That way, if you do decide you want to use a swap partition after all, you will know how much swap space your system has actually used. Further considerations if you want to hibernate.
How do I figure out if I need more swap space or not? I'm going on what I was taught back in either 2000 or 2001 (I can't recall) when I needed to learn Unix commands and installed Yellow Dog Linux on my PowerMac to do so. Back then, everything I read said to allocate as much swap space as your computer has memory.

Today, I see three things: Same as the RAM, 1.5*RAM, and 2*RAM.

Quote:
Originally Posted by chrisretusn View Post
Since you have a laptop. If you plan on using hibernation I would say at least give the swap partition a bit more than the RAM you have. I'd give it all of the 1.89G.
That was my first instinct, then I thought maybe I should only allocate 1GB. I know that I don't know enough about modern swap space to know what to do, so I made this post. I wasn't sure if I needed to keep it divisible by the amount of RAM, or if being at that odd number wouldn't matter.

P.S. Since the primary reason I'm installing Linux is educational, would it be a dumb thing to choose Ubuntu over Fedora solely because I know Fedora much better and could use the practice with Ubuntu, and no other reason?

Last edited by slickrcbd; 04-21-2011 at 01:18 PM.
 
Old 04-21-2011, 03:04 PM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
My experience is that on a machine like your's Linux will hardly use more than a few MB of the swapspace. 256MB should be sufficient.

If you want to hibernat (as been said above), you'll need at least as much as the RAM.

Otherwise, since you can't use the space of 1.89GB for anything else, it makes sense to use it as swapspace.

Use the command
Code:
free -m
in order to examine the usage of memory and swapspace.

Markus
 
Old 04-22-2011, 04:18 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by slickrcbd View Post
P.S. Since the primary reason I'm installing Linux is educational, would it be a dumb thing to choose Ubuntu over Fedora solely because I know Fedora much better and could use the practice with Ubuntu, and no other reason?
What are you trying to achieve when choosing a distro? Is it dominantly to learn about Linux? If so, are there secondary objectives? Which constraints apply to the distro choice? Does it have to be Fedora or Ubuntu?
 
Old 04-22-2011, 05:05 AM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,968

Rep: Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546Reputation: 1546
Quote:
Originally Posted by slickrcbd View Post
How do I figure out if I need more swap space or not?
The only real method is to observe your usage. With your system, allocating that 1.89G free space to swap should be enough.

With a system that has 1G of RAM; in your situation; with partitions already set for Windows and Linux, and with 1.89GB free space; I'd just use it all. Your not really losing a lot of hard drive space doing so. You will need at least 1GB+ for hibernation anyway.

All of the math calculations to figure swap size have always been pretty much a guesstimate (bullony in my language ). It really depends on what you are going to be running, how much memory those applications need, how many programs are run at the same time. Usage is a big factor on figuring swap size.

Quote:
P.S. Since the primary reason I'm installing Linux is educational, would it be a dumb thing to choose Ubuntu over Fedora solely because I know Fedora much better and could use the practice with Ubuntu, and no other reason?
If you know Fedora better than Ubuntu, then stick with Fedora and and learn it well. What every you decide, stick with it and learn it.
 
Old 04-22-2011, 05:46 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Use (all) the space for a single swap partition. If you need more (your system will crash - you will know when), simply add more - a file as swap space is fine.
With a Gig, you can probably get by without swap at all, but I wouldn't recommend it.
The same swap partition can be used for multiple distros if you're careful.

Just do it - if it all goes to hell, it'll be educational to fix it ...
 
Old 04-24-2011, 08:50 AM   #9
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Fedora vs. Ubuntu: I use both. Be aware that standard Fedora and Ubuntu have, up through F14 and U10.10, used the standard GNOME2 desktop. Starting with U11.04 (due out April 28), Ubuntu will default to the Unity desktop. Starting with F15, Fedora will offer the Gnome3 desktop. Whichever distro you choose, I recommend sticking with the current version (F14 or U10.10) until you're comfortable with different desktop environments. I use LXDE on both Fedora and Ubuntu, so the above changes don't greatly affect me. Avoid Fedora 12; it's well beyond end-of-life and is no longer receiving updates.

Swap: Like everyone else, I recommend using the whole 1.89 GB.
 
  


Reply



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
FC6 drive/partitions reconfig question sda sdb swap CaptainInsane Fedora 6 02-02-2007 03:00 PM
Stupid question about swap partitions zahadumy Linux - Newbie 6 11-14-2005 12:35 PM
eight swap partitions? linuxtesting2 Linux - General 7 07-20-2004 06:15 AM
swap partitions chappy011 Linux - Newbie 2 03-18-2002 01:44 PM
swap partitions rakemup Linux - Software 5 12-10-2001 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 05:56 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