Sign in to follow this  
Followers 0
continuation

How to align SSD in Linux?

6 posts in this topic

In all the SSD benchmarks it's always stated that the IO's are "aligned". Does alignment make a big impact on performance? How do you align an SSD in Linux?

Share this post


Link to post
Share on other sites

Alignment can help with performance.

What distro are you using? Newer versions of the distro might have already taken care of alignment during instalation

If you need to check, use fdisk command in the terminal( or gparted) and some division. If you need to align it, gparted should be able to help.

Share this post


Link to post
Share on other sites

Alignment can help with performance.

What distro are you using? Newer versions of the distro might have already taken care of alignment during instalation

If you need to check, use fdisk command in the terminal( or gparted) and some division. If you need to align it, gparted should be able to help.

I'm running Ubuntu 13.04

How do I check for alignment with fdisk?

Share this post


Link to post
Share on other sites

'Sudo fdisk -lu /dev/sda'(if ssd is primary) in terminal or open gparted('sudo gparted' in terminal) and look for some driver information.

Look at the start sector. It should be divisible by 512 to an integer(without fraction).

Share this post


Link to post
Share on other sites

I got this output:

   
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    15437823     7717888   83  Linux
/dev/sda2        15439870    58626047    21593089    5  Extended
/dev/sda5        15439872    17358847      959488   82  Linux swap / Solaris
/dev/sda6        17360896    58626047    20632576   83  Linux

So the "Start" of sda1, sda5, sda6 are divisible by 512, but that of sda2 is not. But sda2 is an extended partition so is it OK that it's not aligned?

Share this post


Link to post
Share on other sites

AFAIK, it should be okay.

This example shows a system with an Ubuntu 10.04 installation. In this case, the Ubuntu 10.04 installer has aligned both the primary and the logical partitions at the one-megabyte boundary. This is indicated by the fact that the start sector number for the partition can be divided by 2,048 (2,048 sectors * 512 bytes per sector equals 1,048,576 or one megabyte). The extended partition (in this example, /dev/sda2) has not been aligned at the one-megabyte boundary. However, this is not required, since that partition merely serves as a container for the logical partitions and the logical partitions themselves are aligned at the one-megabyte boundaries.

http://www.thomas-krenn.com/en/wiki/Partition_Alignment

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0