• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

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.
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:
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?
 
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).
 
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:
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).
 
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.
 
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.
 
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?
 
I have ~10gb /root, ~1gb swap, and the rest to home.
Me too!

And, as you can see (in Conky sidebar) the 1 GB swap gets used...


vindsl-desktop-21a-oct-2010.png
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
Back
Top