57

Going to install Ubuntu 10.10 on new intel x25M 80GB SSD. It will be fresh install. I have been googling for past few days and getting overwhelming articles/blogs/Q&As. One particularly very useful being:

How do I optimize the OS for SSDs?

But with so many suggestions and differences of opinions (on different links) this simple OS install process seems to be daunting task to me and I really want to stick with Ubuntu (although have used for very short period of time).

Can someone help me by answering few questions (yes, they are repeated because I couldn't comprehend the answers elsewhere)

  1. Which file system (ext2/3/4 or something else)? (consider SSD life)
  2. Can it be changed after installation?
  3. Should I partition the disk? (as we do in traditional HDD) for now, no plan of dual booting. Only Ubuntu will live on scarce space of 80GB SSD.
  4. I have 2 GB RAM, should i still allocate swap space (if I don't allocate swap space, can I still hibernate the machine)? will swap space impact SSD life?
  5. Should I consider putting additional 1GB RAM to avoid swap space?
  6. What is partition aligning? Is it needed to be done before installing the Ubuntu OS or can be done later?

Intended usage - heavy browsing, programming, regular video/music and some other non-CPU/RAM-intensive programs. Will keep big files in an external hard drive.

laptop config - 3yr old Vaio, Core2 Duo, 2GB RAM

More references:

5 Answers 5

58

I'll start by saying that the answer you linked already summarizes all the optimizations you may need.

Next, to answer your questions:

1. Which file system (ext2/3/4 or something else)? (consider SSD life)

ext4 is a good filesystem even for SSD, so that would be my suggestion. (If you want performance so bad you should try XFS )

2. Can it be changed after installation?

Yes, but it is not trivial, so choose well from the start :)

3. Should I partition the disk? (as we do in traditional HDD) for now, no plan of dual booting. Only Ubuntu will live on scarce space of 80GB SSD.

This is really not a matter of SSD, but your personal choice. If you were to ask me I'll say no; don't partition the disk you will end in loosing useful space. (If you end with a partition with 2GB free and another with 1GB free, you theoretically have 3Gb free but cannot copy a 3GB file... that space is wasted )

4. I have 2 GB RAM, should I still allocate swap space (if I dont allocate swap space, can i still hibernate the machine)? will swap space impact SSD life? I wouldn't worry so much about the SSD life ( modern one can run for decades ), however 2GB of RAM are enough not to need the swap partition. Finally the swap partition is needed in order to hibernation, so if you want to hibernate the machine then you need the swap partition.

5. Should I consider putting additional 1GB RAM to avoid swap space? 1GB more or ram is always useful :) do it if you can.

6. What is partition aligning? is it needed to be done before installing the Ubuntu OS or can be done later?

That is the procedure where you align clusters, blocks and chunks. IMHO it is only needed on servers with a lot of data throughput. A good tool to do partition alignment is GParted. Of course this should be done before installing Ubuntu.

Hope this helps :)

3
  • 1
    Thanks for excellent info. I really appreciate you taking time out to respond such an elaborate answer. So should i use Swap space (can i specify it in some config that OS should utilize swap space rarely like for hibernation and not for anything else)? and i completely agree with you on #3, i will not create any logical partition.
    – kunal
    Dec 31, 2010 at 3:36
  • 2
    Found out at ubuntu documentation(help.ubuntu.com/community/SwapFaq) : # swappiness can have a value of between 0 and 100 # swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible # swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
    – kunal
    Dec 31, 2010 at 3:49
  • 1
    Give that man a hand Quality Answer.
    – Allan
    Jan 5, 2011 at 11:08
6

I will try to answer the questions that I can:

  1. EXT4 Is one of the best filesystems currently available, so I'd suggest going with this.

  2. You can change some linux file systems after installation (ext3->ext4, ext4->btrfs, for example). Here is a link that explains changing ext3 to ext4.

  3. Not the clearest of questions, but Ubuntu will automatically create partitions.

  4. and 5.You will need swap space of equal or greater size (in relation to your RAM), in order to hibernate. So long as you are not doing anything intensive, your system will mostly avoid using swap so long as there is sufficient RAM. Maybe a good consideration would be to add more RAM if possible - give it about 4GB. If you don't allocate swap space, there is another option (not recommended) - hibernating to a file (I will add the links to my answer later).

Best wishes! I will update my answer with relevant links, as well as possibly resources for learning Ubuntu/Linux :).

2
  • Thanks for help Roland. About throwing more RAM, i read at various links that a 32 bit OS would be able to address only upto 3 GB, so the max i could add would be 1 GB. Is that correct?
    – kunal
    Dec 31, 2010 at 3:34
  • A 32bit OS can address up to 4GB (Windows XP was limited to 3GB) - so yes and no. Ubuntu 32bit can use a PAE kernel (with page address extensions) - allowing the 32bit system to use 5GB or more. If you install more than 4GB RAM (unlikely you will), the OS will use the pae kernel (if I remember correctly, automatically). If it doesn't do so automatically you can install it easily from software centre.
    – RolandiXor
    Dec 31, 2010 at 12:56
5

Concerning Swap on SSDs:

I wouldn't care too much about putting a swap-partition on a SSD. The swap is, like said before, only used if there's no RAM left. But then there are "few" sequential writes and "many" random reads. That's exactly a form of usage SSDs excel in. - The same principle is used by microsofts "readyboost" technologie, only with USB-Flashdrives.

1
  • Thats cool, I have now installed ubuntu with default installtaion process, so i assume it has created swap space for itself. Today I'll start tweaking it for SSD.
    – kunal
    Jan 5, 2011 at 14:34
1

Not to throw a monkey wrench in, but checking what the manufacturer of the SSD says about the need for those techniques might pay off.

The folks who made my SDD assert that I don't need to worry about TRIM and optimizations, etc. They claim their firmware makes all of that unnecessary, that the SSD should be used like any other drive. I took them at their word and so far so good.

0

I would recommend against having any swap space on your 80G SSD card. The swap space, as it names implies, is a location where the files are read/written all the time, when your computer is heavily loaded. The SSD-based disks should not be read/written all the time, as each "cell" or allocation unit is meant to be read/written so many times, after which they are no more reliable. You should invest in more RAM, even if it is overkill. Then, monitor your RAM usage over a heavily loaded session (lots of browser, videos, compiler, etc). For the file system, I would stick with what Ubuntu offers. You can: - manually partition your disk, allocating all the remaining space to one or more ext3 partition(s).That would be the recommended one, as you don't waste space. - go with the default partition setup, then delete the swap partition

4
  • OMG i have been using ubuntu in a SSD for quite a long time, with automatic partitioning. I does have a Swap. You guys are making me think of a fresh install without swap.
    – Arkandria
    Dec 30, 2010 at 15:16
  • Thank you so much for ur inputs. As i commented on the answer above, is there any way to tell linux to use swap space occasionaly?
    – kunal
    Dec 31, 2010 at 3:40
  • okay found that out, see another comment above. Any good experience setting the swappiness of ubuntu?
    – kunal
    Dec 31, 2010 at 3:51
  • 4
    Modern SSD controllers spread writes across the physical cells regardless of partition layout. Partition layout does not reflect physical layout. If a system needs swap, the next best thing to RAM is an SSD.
    – tyblu
    Dec 10, 2011 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .