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:

Optimize for SSD (I could not post other links as i dont have enough credits)

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 as 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?

Linux experience - absolute novice

intended usage - heavy browsing, programming, regular video/music and some other non-CPU/RAM-intensive programs. will backup big files to an external hard drive.

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

Please pardon the repetition and I really appreciate anyone helping me getting started with Ubuntu.

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

EDIT#2:
More references (As I can post more links as i have now earned some credits to do so):

http://opentechnow.blogspot.com/2010/02/linux-ssd-optimization-guide.html

Is a 40GB SSD practical to use for ' / '

http://ubuntuforums.org/archive/index.php/t-1145332.html

https://help.ubuntu.com/community/SwapFaq

http://ubuntuforums.org/showthread.php?t=1242740 (resizing/creating does not seem a simple process after look this)

http://en.dogeno.us/2010/01/karmic-with-solid-state-disk-how-to-optimize-ubuntu-for-ssd/

How to enable TRIM?

link|improve this question

feedback

6 Answers

up vote 20 down vote accepted

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 :)

link|improve this answer
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 '10 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 '10 at 3:49
Give that man a hand Quality Answer. – Allan Jan 5 '11 at 11:08
feedback

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 :).

link|improve this answer
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 '10 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. – Roland Taylor Dec 31 '10 at 12:56
feedback

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.

link|improve this answer
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 '11 at 14:34
feedback

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

link|improve this answer
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 '10 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 '10 at 3:40
okay found that out, see another comment above. Any good experience setting the swappiness of ubuntu? – kunal Dec 31 '10 at 3:51
1  
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 '11 at 0:13
feedback

is there any way to tell linux to use swap space occasionally?

Swap space(s), if any, is/are defined on the disk as a "linux swap" partition, but you can easily tell the system not to use it/them anymore by using the "sudo /sbin/swapoff" command, and if you happen to need it for some time, activate it by "sudo /sbin/swapon" (in both cases followed by the swap "partition" name, for instance /dev/sda6).

The "free" command tells you how much RAM and swap space (if any) is used, so if you feel like automating things, you could have fun writing a script activating swap space if and only if RAM is used over 90%, for instance. Please note that even if you use your RAM only at 30% at a given time, some data swapped out at a time and not used since may stick in the swap space, though not doing any harm; you could tell however instruct your script to execute a swapoff whenever RAM is used under 80% as well : data would then be sent automatically back into RAM. But honestly, I doubt it is worth it, except for fun in writing the script.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.