written by cail • posted in How-To • 2,641 views 1 comment

Since the release of MacBook Air, I have been tracking the price of SSD - solid state drive. It was ridiculous expensive early this year. But, after the release of Intel's SSD and more tests were performed on the current available SSD in the market, one "bug" of the current available SSD is revealed - the writing speed is not as fast as the traditional 2.5 inch hard drive. It is likely due to a controller design issue, which has been solved in Intel's SSD design. So, the price of current available SSD drops ......
I got one last week - 64G from PATRIOT. Now, I have it and I just migrated my system onto it.

I used ghost to create images of each partition, and copy them one by one to the new disk.
I noticed two things:
1. naming: I created the new partitions in SSD with Partition Manager, and the disk sequence is strange - the first one created is named as sda1, no matter where it is.
2. UUID: The new partition mirrored by ghost has the exact same UUID as the previous - although both the size and naming were changed. I have UUID in both the /etc/fstab and /boot/grub/menu.list file, and I don't even need to change them.

Because the MBR is different, and I have to write the new grub into the SSD. I used a live CD enter into a linux operation system. I pull out the terminal, and typed sudo grub - the following two command will take care all the things left.

root (hd0,0)
setup (hd0)

Reboot, and I have my system running. During the booting, fsck was executed to fix errors. I also need to use the gparted to fix one partition's error. Beyond that, everything is cool.

I made some tweaks to optimize the system for running better with SSD. Here is a very nice post, and I followed these steps.

  • Ubuntu uses the relatime option by default. For your SSD partitions (formatted as ext3), replace relatime with noatime in /etc/fstab. Reboot for the changes to take effect.
  • Add this line to fstab to mount /tmp (temporary files) as tmpfs (temporary file system):
    tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

    Reboot for the changes to take effect. Running df, you should see a new line with /tmp mounted on tmpfs:

    tmpfs 513472 30320 483152 6% /tmp
  • Open about:config in Firefox. Right click in an open area and create a new string value called browser.cache.disk.parent_directory. Set the value to /tmp.
  • Put the following two lines into the script to run every time after the reboot:
    echo deadline > /sys/block/sda/queue/scheduler
    echo 1 > /sys/block/sda/queue/iosched/fifo_batch
  • No longer need the hdaps package (remember to update tp_smapi install as well)
    apt-get remove --purge hdapsd hdpas-utils
  • Disable the hard disk spinning fix by deleting 99-hdd-ugly-fix.sh in /etc/acpi/resume.d/ start.d/ ac.d/ battery.d/

A quick test with hdparm -tT /dev/sda.

 Timing cached reads:   4460 MB in  1.99 seconds = 2235.82 MB/sec
 Timing buffered disk reads:  124 MB in  3.03 seconds =  40.98 MB/sec


 Timing cached reads:   3014 MB in  2.00 seconds = 1509.96 MB/sec
 Timing buffered disk reads:  288 MB in  3.00 seconds =  95.92 MB/sec

The big gain I have by using SSD is that I will not be afraid of any shocking!
The loss is battery time, seems like SSD consumes more power than the traditional hard drive. Anyone has any suggesion?


Leave a Reply

You must be logged in to post a comment.