Install Linux on an SSD: Difference between revisions
Line 7: | Line 7: | ||
fdisk -H 32 -C 32 -c | fdisk -H 32 -C 32 -c | ||
'''Note: | '''Note: Intel SSD's uses smaller blocks so use a different command: | ||
fdisk -H 16 -S 16 -c''' | fdisk -H 16 -S 16 -c''' | ||
=2. Optimize I/O= | |||
To adjust the stripe widht and stride of an EXT4 filesystem, use to create a new filesystem: | |||
mkfs.ext4 -E stride=128,stripe-width=128 /dev/sdaX | |||
where sdaX is of course your ssd partition. | |||
To tune an already existing filesystem, you can use: | |||
tune2fs -E stride=128,stripe-width=128 /dev/sdaX | |||
'''Intel''' users should use the value '''32''' for the stripe width |
Revision as of 16:21, 14 November 2011
When you want to install Linux to an SSD, there are a lot of things to think about. This wiki post will look at all those things.
1. start your partitons on a 4k boundary
Because SSD's use 'blocks' of 4k in size, you must line up the partition boudaries on a block boudary for the best performance.
In fact, it is even better to start your partitons on a 512k block boundary. To do that, start fdisk with the parameters '-H 32 -C 32 -c' and create a completely new partitiontable.
fdisk -H 32 -C 32 -c
Note: Intel SSD's uses smaller blocks so use a different command:
fdisk -H 16 -S 16 -c
2. Optimize I/O
To adjust the stripe widht and stride of an EXT4 filesystem, use to create a new filesystem:
mkfs.ext4 -E stride=128,stripe-width=128 /dev/sdaX
where sdaX is of course your ssd partition.
To tune an already existing filesystem, you can use:
tune2fs -E stride=128,stripe-width=128 /dev/sdaX
Intel users should use the value 32 for the stripe width