default partition sizes on Ubuntu 8.04

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
Marin85
Senior ThinkPadder
Senior ThinkPadder
Posts: 2975
Joined: Sat May 12, 2007 10:54 am
Location: Munich, Germany

default partition sizes on Ubuntu 8.04

#1 Post by Marin85 » Wed Jul 30, 2008 8:37 am

Hi,
just a small question: can someone post the default swap partition sizes on Ubuntu 8.04 both x64 and x86. Does the swap partition size vary depending on machine specs (provided the same OS installed)?

Marin
IBM Lenovo Z61p | 15.4'' WUXGA | Intel Core 2 Duo T7400 2x 2.16GHz | 4 GB Kingston HyperX | Hitachi 7K500 500 GB + WD 1TB (USB) | ATI Mobility FireGL V5200 | ThinkPad Atheros a/b/g | Analog Devices AD1981HD | Win 7 x86 + ArchLinux 2009.08 x64 (number crunching)

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

Re: default partition sizes on Ubuntu 8.04

#2 Post by aaa » Wed Jul 30, 2008 9:06 am

Marin85 wrote:Does the swap partition size vary depending on machine specs (provided the same OS installed)?
Yes.

Marin85
Senior ThinkPadder
Senior ThinkPadder
Posts: 2975
Joined: Sat May 12, 2007 10:54 am
Location: Munich, Germany

#3 Post by Marin85 » Wed Jul 30, 2008 9:11 am

Thanks. I guess this answers both questions :)

Marin
IBM Lenovo Z61p | 15.4'' WUXGA | Intel Core 2 Duo T7400 2x 2.16GHz | 4 GB Kingston HyperX | Hitachi 7K500 500 GB + WD 1TB (USB) | ATI Mobility FireGL V5200 | ThinkPad Atheros a/b/g | Analog Devices AD1981HD | Win 7 x86 + ArchLinux 2009.08 x64 (number crunching)

jglen490
Posts: 25
Joined: Sun Feb 10, 2008 11:51 pm
Location: Montgomery AL

#4 Post by jglen490 » Wed Jul 30, 2008 6:25 pm

To some extent, the answer "Yes" is correct. There is a point beyond which more swap is a waste of space.

The old rule of thumb is 2X RAM. But when modern machines have multi-GB RAM, that thumb needs to go out the window. A new rule might be no less than 512MB, and more only if you are doing extraordinary things such a CAD, photo editing, and the like. ANd for light use with multi-GB RAM, no swap is fine.

So it's not so much machine specs as it is machine utility. 512MB is pretty good target for most mortals.

AT present, my top output looks like this with about 500MB of swap:

Code: Select all

Tasks: 117 total,   3 running, 114 sleeping,   0 stopped,   0 zombie
Cpu(s):  7.2%us,  2.6%sy,  0.0%ni, 90.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    385792k total,   379040k used,     6752k free,    12728k buffers
Swap:   498004k total,    34700k used,   463304k free,   178980k cached
I feel more like I do now than I did when I got here.
Registered Linux User #270832

gongo2k1
Sophomore Member
Posts: 200
Joined: Mon Jun 30, 2008 10:25 pm

#5 Post by gongo2k1 » Wed Jul 30, 2008 6:34 pm

remember, if you want hibernation to work, swap should be at least equal to your ram. in general though, there's not much point since standby is faster and doesn't take a whole lot of power.

Marin85
Senior ThinkPadder
Senior ThinkPadder
Posts: 2975
Joined: Sat May 12, 2007 10:54 am
Location: Munich, Germany

#6 Post by Marin85 » Wed Jul 30, 2008 6:59 pm

Thanks a lot for your replies! Very helpful indeed!

Marin
IBM Lenovo Z61p | 15.4'' WUXGA | Intel Core 2 Duo T7400 2x 2.16GHz | 4 GB Kingston HyperX | Hitachi 7K500 500 GB + WD 1TB (USB) | ATI Mobility FireGL V5200 | ThinkPad Atheros a/b/g | Analog Devices AD1981HD | Win 7 x86 + ArchLinux 2009.08 x64 (number crunching)

mikeh
Freshman Member
Posts: 86
Joined: Fri Jul 25, 2008 12:54 am
Location: Perth, West Australia

#7 Post by mikeh » Wed Aug 06, 2008 7:33 am

gongo2k1 wrote:remember, if you want hibernation to work, swap should be at least equal to your ram. in general though, there's not much point since standby is faster and doesn't take a whole lot of power.
I don't think so. If you have enough RAM, a lot of it is used for buffers and cache, which doesn't need to be saved in hibernation.
Hibernate is useful if you have to dual-boot into windows.

aaa
ThinkPadder
ThinkPadder
Posts: 1062
Joined: Fri Jun 08, 2007 2:36 pm

#8 Post by aaa » Wed Aug 06, 2008 1:15 pm

Actually, what do you think happens when you use so much memory that it spills over into swap? Opening a 3-gig image or something, and you only have 1g ram/3g swap, not enough for the image+rest of OS.

mikeh
Freshman Member
Posts: 86
Joined: Fri Jul 25, 2008 12:54 am
Location: Perth, West Australia

#9 Post by mikeh » Wed Aug 06, 2008 7:49 pm

AFAIK, there is nothing special about having the same swap space as RAM.
Whether it is bigger or smaller, if your memory use (excluding buffers and cache)
is bigger than swap, hibernation will fail. Actual physical RAM size is irrelevant.
So whether you have 1GB or 3GB of RAM, 2GB of swap is probably plenty.
As for your example of opening a 3GB image, thats no a problem. It is either read a bit at a time, or mmap()ed. In the latter case, its just loaded to cache as needed, and never gets written to swap.
(stddisclaim: correct me if wrong)

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: axur-delmeria and 0 guests