Ubuntu 11 on Kingston SV100S2/256G SSD

Submitted by abb on Sat, 10/08/2011 - 13:40

Here are some notes about my attempt to install Ubuntu 11 on Kingston SV100S2/256G SSD (on Dell Latitude E6510 laptop). Just in case somebody else finds it useful.

I have Googled around for information about SSD disk optimization for Linux and found that there are two main things to consider: partition alignment and filesystem options.

It appears to be important to (try to) align disk writes by the boundaries of SDD erase block size. This [1] article talks about LVM volumes alignment.

Most tutorials out there seems to blindly assume SSD erase block size is 128KB, unclear on what ground. This post [3] suggest the kind of disk I have features 1MB erase block size. I decided to take use this value.

Finally, I have ended up with the following partition layout, with alignment by 1MB:

$ sudo fdisk -S 64 -H 32 /dev/sdb
Command (m for help): p

Disk /dev/sdb: 256.1 GB, 256060514304 bytes
32 heads, 63 sectors/track, 248074 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfeb3c9c1

Device Boot Start End Blocks Id System
/dev/sdb1 1 103 103792+ 83 Linux
/dev/sdb2 104 248074 249954768 8e Linux LVM

Creating LVM physical volume, with its meta-data size set to align start offset of its extents to with 1MB boundary.

$ sudo pvcreate --metadatasize 994k /dev/sdb2
Physical volume "/dev/sdb2" successfully created
$ sudo pvs /dev/sdb2 -o+pe_start
PV VG Fmt Attr PSize PFree 1st PE
/dev/sdb2 lvm2 -- 238.38g 238.38g 1.00m

Create physical volume group and logical volume.

$ sudo vgcreate e6510-ssd1 /dev/sdb2
Volume group "e6510-ssd1" successfully created
$ sudo lvcreate --size 32G --name root e6510-ssd1
Logical volume "root" created

Finally, create a file system, with stripe width set to 1MB (256 x 4K blocks). "Resize" parameter limits the maximum size your filesystem can grow live, it is optional parameter, just saves a few megabytes.

$ sudo mke2fs -t ext4 -E stripe-width=256,resize=250G /dev/e6510-ssd1/root

To make use the instructions above, you will need to use alternative installer CD which lets you interfere with partitioning/filesystem creation process.

[1] http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-… (also available at http://web.archive.org/web/20101130200444/http://thunk.org/tytso/blog/2…)
[2] http://williamscott.me/blog/2010/12/ssd-tweaks-linux-align-partitions/
[3] http://forum.notebookreview.com/notebook-news-reviews/395398-kingston-s…


+32 (0) 2 215 53 58

Gremwell BVBA
Sint-Katherinastraat 24
1742 Ternat
VAT: BE 0821.897.133.