LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-31-2014, 12:13 PM   #1
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 257

Rep: Reputation: 24
Partition alignment - performance?


Hello.

I've been having a dilemma about aligning the disk partitions when setting up a new linux distro on my laptop. I noticed that a lot of tools nowadays put the first partition onto sector 2048 as opposed to the old 63. I understand this is to improve performance on 4k-sector disks, but is there any other reason for this number? I mean why not use an earlier sector?

I've read it's best when partitions are aligned to a multiple of 4k sector size i.e. 2048. But in theory the sector 64 also fulfills this condition. So if a partition starts there, and ends on another 4-k multiple (exclusive) it should be correctly aligned, right? Then why do I get a warning in parted about the partition not properly aligned for best performance? I'm using a GPT label.


However, if I do choose to start a partition on sector 64 despite the warning...
...how does it affect performance on a HDD with 4096B physical sector size?
...how does this affect performance on a HDD with 512B physical sector size?


Regards!
 
Old 01-31-2014, 01:13 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,429

Rep: Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029Reputation: 2029
On a rotating disk, starting at sector 64 is fine. The 1MB (2048 sector) alignment default also accommodates SSDs, where it is desirable that the erase blocks (256KB is common) not span more than one filesystem.
 
Old 01-31-2014, 03:24 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,022

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
http://rainbow.chard.org/2013/01/30/...-using-parted/
 
Old 02-01-2014, 04:13 AM   #4
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian
Posts: 257

Original Poster
Rep: Reputation: 24
jefro: I've already read that exact article before I made my post. The thing was that...
# cat /sys/block/sda/queue/optimal_io_size
0


I'll settle for sector 64 then.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive / partition alignment error... buccaneere Linux - Hardware 6 11-10-2012 03:46 AM
[SOLVED] there is a disk alignment in my Dell Utility partition nerdinator Linux - Newbie 3 07-06-2012 02:46 AM
swap partition alignment [GOD]Anck Linux - General 1 03-13-2012 03:43 AM
partition layout vs performance? kostian Linux - General 3 11-08-2004 07:34 PM
Partition Table Alignment ripmaster Linux - Newbie 3 07-25-2004 09:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration