Ubuntu 10.10 -- A Perfect 10?

Page 7 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

TBSN

Senior member
Nov 12, 2006
925
0
76
That does seem like a lot of space to lose just for the filesystem, but I can't say I've paid a lot of attention myself since I use XFS for most of my filesystems. Part of that space may have been lost to the space reserved for root, which defaults to 5%, to allow root and processes running as root to still have some space even after the filesystem fills up.

I'm having a similar issue, but in my case it may be because I don't understand how linux set itself up (I just let Ubuntu do it's thing). Under "filesystem" it says that it has total of 100GB on a 120GB drive. I assumed that that was the harddrive and not just the main partition. There's a swap partition too I guess, but I assumed that "filesystem" includes the whole drive.

and thanks for the link!
 
Last edited:

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
There is usually a swap partition and a root partition in most Linux installations. Swap is a legacy of 32bit processors where an application bits would need to be swapped to virtual memory when another application had asked to take up its place.

Technically you don't need it on 4g ram puters with 64bit processors but Linux still requires you by default to have it. Technically, you can quite easily manually the swap partition to 512mb - 1Gb and reserve the rest for root or another partition, for example moving your /home to its own partition to make backups easier.

By default some distro's will make the Swap equal to 2x the size of memory which is for compatibilities sake... but its not needed. It is just that HD sizes are so huge, what is 2-4-8g used for swap right?
 

TBSN

Senior member
Nov 12, 2006
925
0
76
I did the automatic install for ubuntu and it has a swap of 4.5GB, the rest is the root partition. I didn't really look at it until now, but I'm surprised they have everything in one partition. If I remember correctly the preferred set up was for the install to be spread out over a couple partitions.

I'm thinking of reinstalling anyway and setting it up differently. Are there any recommendations for partition sizes? I wasn't aware that the swap partition wasn't necessary anymore. It makes sense considering I've never seen it break 2MB on the system monitor, and I only have 2GB of ram (which is fine for this laptop).
 

lxskllr

No Lifer
Nov 30, 2004
57,676
7,900
126
Keeping in mind I'm a noob, I have ~10gb /root, ~1gb swap, and the rest to home.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
I was just reading up on it, and it seems that for hibernation and suspend to work, a swap of at least the size of the RAM is necessary. I'm on a laptop so that's important for me. And like hooflung said HD space is cheap (at least for mechanical drives) so it's not like a few wasted gigs matters much.

I'd be interested to hear more about swap space though. Everything I've read seems to indicate that it's necessary.
 
Last edited:

lxskllr

No Lifer
Nov 30, 2004
57,676
7,900
126
I know it'll sleep fine with swap smaller than ram. I don't know about hibernate. I never use that.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
You must have at the very least a swap file the size of your ram for hibernate.

Sleep will use low power to keep the ram 'working' Hibernate literally stores your ram contents into the swap.

You will also need swap if you do anything that requires more ram then you have and doesn't use /tmp. If you run out of physical memory and do not have swap your system could crash.

You don't have to use a partition for swap. You can use a file as swap (although hibernate will not work). You can also (and this is useful if you are using LVM) have multiple swap partitions. So you can start with a small swap partition and add more as you need them (or grow the existing one).
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
I did the automatic install for ubuntu and it has a swap of 4.5GB, the rest is the root partition. I didn't really look at it until now, but I'm surprised they have everything in one partition. If I remember correctly the preferred set up was for the install to be spread out over a couple partitions.

I'm thinking of reinstalling anyway and setting it up differently. Are there any recommendations for partition sizes? I wasn't aware that the swap partition wasn't necessary anymore. It makes sense considering I've never seen it break 2MB on the system monitor, and I only have 2GB of ram (which is fine for this laptop).

The only real reason to break things out into their own partitions is to prevent some run away process from eating up all your disk space and making trouble. On a desktop, this is almost never a problem. At the very most I would simply partition out /home. This would allow you to keep your /home if you ever needed to format your / partition. My home ubuntu computer has (500 gig drive) 20 gigs for /, 4 gigs for swap, and the rest on /home (with some free space left over for snapshots). I used LVM so if need be I could shuffle that around fairly quickly.

On servers I always put /boot, /tmp, /home, /var, and /usr/local on their own partitions. I used to put /var/log on it's own partition as well.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's been a while since I've paid much attention to the suspend2/toi lists, however I'm pretty sure the in-kernel suspend and hibernation code supports compression and swap-files just fine. Which in most cases means that the swap partitions/files may be smaller than the amount of physical memory.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
The only real reason to break things out into their own partitions is to prevent some run away process from eating up all your disk space and making trouble. On a desktop, this is almost never a problem. At the very most I would simply partition out /home. This would allow you to keep your /home if you ever needed to format your / partition. My home ubuntu computer has (500 gig drive) 20 gigs for /, 4 gigs for swap, and the rest on /home (with some free space left over for snapshots). I used LVM so if need be I could shuffle that around fairly quickly.

On servers I always put /boot, /tmp, /home, /var, and /usr/local on their own partitions. I used to put /var/log on it's own partition as well.

This is helpful. I'm glad I don't need to divide everything on my laptop like is necessary on servers. A question regarding snapshots- are these for backups? I was wondering whether there is support for the Mac OSX feature of rolling back files to earlier states. I'm not sure what the correct term is. Is that only supported in Solaris?
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
This is helpful. I'm glad I don't need to divide everything on my laptop like is necessary on servers. A question regarding snapshots- are these for backups? I was wondering whether there is support for the Mac OSX feature of rolling back files to earlier states. I'm not sure what the correct term is. Is that only supported in Solaris?

I use LVM to make backups. It's not as simple as OSX time machine is. I simply have a script that makes a lvm snapshot, then uses tar to zip it up and stores it on network drive.

In theory you could create a time machineish backup using rsync with our without snapshots, or a tool like flyback, rsnapshot, TimeVault, or Back In Time.

I personally use crashplan on osx and have tried it on linux and it worked great. At some point I'll change my home linux machine to use crashplan.
 

TBSN

Senior member
Nov 12, 2006
925
0
76
Ah alright. I'm checking out crashplan, looks good. The time-machine type function is something that is built into the filesystem right? I remember trying out ZFS, I think, which enabled the ability to roll back to a previous version of a file or directory. I think Windows can do that too, at least partially. I don't really need it, I'm just wondering how it works.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
It is possible to have file systems that have that kind of functionality. Apple's Time machine however does not do that. It is similar to a rysnc type solution with hard links.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Ah alright. I'm checking out crashplan, looks good. The time-machine type function is something that is built into the filesystem right? I remember trying out ZFS, I think, which enabled the ability to roll back to a previous version of a file or directory. I think Windows can do that too, at least partially. I don't really need it, I'm just wondering how it works.

Yea, on OpenSolaris that's accomplished with ZFS snapshots and I believe similar things are being worked on for Linux with BTRFS snapshots, but that filesystem's a way off from being stable.

On Windows the "Previous Versions" stuff is handled by Explorer and Volume Shadow Copy snapshots which are stored in the System Volume Information folder and I don't believe they really rely on anything NTFS specific even though MS will only support them on NTFS.
 

Schadenfroh

Elite Member
Mar 8, 2003
38,416
4
0
Yea, on OpenSolaris that's accomplished with ZFS snapshots and I believe similar things are being worked on for Linux with BTRFS snapshots, but that filesystem's a way off from being stable.

Any chance of Oracle just GPLing ZFS instead since they now own both? Seems kind of redundant for them to do both when they have ZFS ready to go that will accomplish the same goals.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Any chance of Oracle just GPLing ZFS instead since they now own both? Seems kind of redundant for them to do both when they have ZFS ready to go that will accomplish the same goals.

Only if Sun required all contributors to sign over their copyright, otherwise Oracle would need all of their permission. Which seems unlikely to happen to me.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |