Using parted, I'm trying to create a 16Gb partition at the end of a 3Tb drive with 4K physical sectors -
mkpart primary 5826978696s 5860533127s
Starting position 5826978696s is a multiple of 8, so why is parted complaining:
Warning: The resulting partition is not properly aligned for best performance.
Are there other alignment-rules/hints I need to observe?
Per Jessen wrote:
Using parted, I'm trying to create a 16Gb partition at the end of a 3Tb drive with 4K physical sectors -
mkpart primary 5826978696s 5860533127s
Starting position 5826978696s is a multiple of 8, so why is parted complaining:
Warning: The resulting partition is not properly aligned for best performance.
Are there other alignment-rules/hints I need to observe?
Okay, afaict, parted works with two kinds of alignment - minimal and optimal. I think I'm adhering to the minimal requirement by having my partition starting on a multiple of 8, but I can't tell what the optimal is. The parted sources indicate that it is dependent on disk topology information, which makes sense - nonetheless, how do I go about finding out what the problem/disk topology/optimal config is?
Per Jessen wrote:
Per Jessen wrote:
Using parted, I'm trying to create a 16Gb partition at the end of a 3Tb drive with 4K physical sectors -
mkpart primary 5826978696s 5860533127s
Starting position 5826978696s is a multiple of 8, so why is parted complaining:
Warning: The resulting partition is not properly aligned for best performance.
Are there other alignment-rules/hints I need to observe?
Okay, afaict, parted works with two kinds of alignment - minimal and optimal. I think I'm adhering to the minimal requirement by having my partition starting on a multiple of 8, but I can't tell what the optimal is. The parted sources indicate that it is dependent on disk topology information, which makes sense - nonetheless, how do I go about finding out what the problem/disk topology/optimal config is?
After a bit of trial-and-error and studying the parted source code some more, I arrived at the start and end sectors having to be multiples of 2048. This works, parted doesn't complain - does anyone have an explanation? I'll be checking out the performance numbers to see if it makes a real difference.
Per Jessen wrote:
Per Jessen wrote:
After a bit of trial-and-error and studying the parted source code some more, I arrived at the start and end sectors having to be multiples of 2048. This works, parted doesn't complain - does anyone have an explanation? I'll be checking out the performance numbers to see if it makes a real difference.
On Western Digital 3Tb WD30EZRS, aligning the start sector to a multiple of 2048 gave an increase of 2-2.5MB/s (at the end of the drive).
On Sun, Feb 6, 2011 at 10:15 AM, Per Jessen per@opensuse.org wrote:
Per Jessen wrote:
Per Jessen wrote:
After a bit of trial-and-error and studying the parted source code some more, I arrived at the start and end sectors having to be multiples of 2048. This works, parted doesn't complain - does anyone have an explanation? I'll be checking out the performance numbers to see if it makes a real difference.
On Western Digital 3Tb WD30EZRS, aligning the start sector to a multiple of 2048 gave an increase of 2-2.5MB/s (at the end of the drive).
Per,
I haven't studied the source code, but the alignment preferences should default to 4KB as you said originally, but the values in directory /sys/block/sdb/queue should be read by parted and override the default.
So cd into that directory and start cat'ing out the files that look relevant.
Greg
Greg Freemyer wrote:
On Sun, Feb 6, 2011 at 10:15 AM, Per Jessen per@opensuse.org wrote:
Per Jessen wrote:
Per Jessen wrote:
After a bit of trial-and-error and studying the parted source code some more, I arrived at the start and end sectors having to be multiples of 2048. This works, parted doesn't complain - does anyone have an explanation? I'll be checking out the performance numbers to see if it makes a real difference.
On Western Digital 3Tb WD30EZRS, aligning the start sector to a multiple of 2048 gave an increase of 2-2.5MB/s (at the end of the drive).
Per,
I haven't studied the source code, but the alignment preferences should default to 4KB as you said originally, but the values in directory /sys/block/sdb/queue should be read by parted and override the default.
Hi Greg
thanks, that was a good pointer - now I can at least see what values parted is looking at. The 2048 (=1Mb) optimum alignment seems to be the default, but I haven't studied it closely to see when the default is chosen. OTOH, it might be the optimum choice for the disk topology of the WD drive.
On Mon, Feb 7, 2011 at 2:20 AM, Per Jessen per@opensuse.org wrote:
Greg Freemyer wrote:
On Sun, Feb 6, 2011 at 10:15 AM, Per Jessen per@opensuse.org wrote:
Per Jessen wrote:
Per Jessen wrote:
After a bit of trial-and-error and studying the parted source code some more, I arrived at the start and end sectors having to be multiples of 2048. This works, parted doesn't complain - does anyone have an explanation? I'll be checking out the performance numbers to see if it makes a real difference.
On Western Digital 3Tb WD30EZRS, aligning the start sector to a multiple of 2048 gave an increase of 2-2.5MB/s (at the end of the drive).
Per,
I haven't studied the source code, but the alignment preferences should default to 4KB as you said originally, but the values in directory /sys/block/sdb/queue should be read by parted and override the default.
Hi Greg
thanks, that was a good pointer - now I can at least see what values parted is looking at. The 2048 (=1Mb) optimum alignment seems to be the default, but I haven't studied it closely to see when the default is chosen. OTOH, it might be the optimum choice for the disk topology of the WD drive.
-- Per Jessen, Zürich (2.6°C)
Per,
I'm aware parted moved to 1 MB as the starting point for the first partition. Microsoft started doing that with Vista.
The old head/cylinder aligned partitions has not really been meaningful since the days of 10GB drives. ie. Most modern drives just report C/H/S that is as large as it legally can be and has nothing to do with real geometry, so aligning to it was pointless.
Thus I was happy to see 1MB as the new default starting sector for parted in 11.3.
What I didn't know is that it is also now a parted default to align all partitions to a 1MB boundary.
I guess the benefit is SSDs that may have large Erase Blocks (EBs). I think those are typically 128KB or even 256KB, so a 1 MB default partition alignment works for them as well and hopefully will for years into the future.
So you just need to start making your partitions an even number of MBs long to not lose any inter-partition slack space.
Or trust you know what you're doing and ignore parted's optimum alignment. I seriously doubt it will have any impact on your performance with that drive.
Greg
Greg Freemyer wrote:
Or trust you know what you're doing and ignore parted's optimum alignment. I seriously doubt it will have any impact on your performance with that drive.
At first I tried the 1Mb alignment with an elderly 40Gb Hitachi - made no difference. I was surprised to see up to an extra 2.5Mb/s on the WD 3Tb drive. I'll be trying the same thing with a WD Caviar Black.
On Mon, Feb 7, 2011 at 10:26 AM, Per Jessen per@opensuse.org wrote:
Greg Freemyer wrote:
Or trust you know what you're doing and ignore parted's optimum alignment. I seriously doubt it will have any impact on your performance with that drive.
At first I tried the 1Mb alignment with an elderly 40Gb Hitachi - made no difference. I was surprised to see up to an extra 2.5Mb/s on the WD 3Tb drive. I'll be trying the same thing with a WD Caviar Black.
Per,
Were your performance tests at the same sectors for two different tests?
I ask because modern drives have constant RPM but more or less constant linear density, so when working with sectors on the outer edge of the platter more data is incorporated per revolution.
Thus you get higher read/write speeds on the outer edge of the platter.
Typically drive manufacturers put the low numbered sectors on the outside cylinder. Thus they get max performance and as the sector number increases you get lower and lower performance.
The net result is a 2 or 2.5 MB/sec performance difference could easily just be that you are testing different portions of the physical drive and have nothing to do with alignment.
Greg
Greg Freemyer wrote:
On Mon, Feb 7, 2011 at 10:26 AM, Per Jessen per@opensuse.org wrote:
Greg Freemyer wrote:
Or trust you know what you're doing and ignore parted's optimum alignment. I seriously doubt it will have any impact on your performance with that drive.
At first I tried the 1Mb alignment with an elderly 40Gb Hitachi - made no difference. I was surprised to see up to an extra 2.5Mb/s on the WD 3Tb drive. I'll be trying the same thing with a WD Caviar Black.
Per,
Were your performance tests at the same sectors for two different tests?
Yes, apart from re-aligning the partition to start on a multiple of 2048. For performance testing, I had tried to put a partition at "the end of the drive", which is when parted complained about the location not being optimum. I adjusted the starting sector down, that's all.
I ask because modern drives have constant RPM but more or less constant linear density, so when working with sectors on the outer edge of the platter more data is incorporated per revolution. Thus you get higher read/write speeds on the outer edge of the platter.
Yes, there is quite a difference. On the WD 3Tb from 120Mb/s (outer) to 56Mb/s (inner).
On Mon, Feb 7, 2011 at 10:07, Greg Freemyer greg.freemyer@gmail.com wrote:
The old head/cylinder aligned partitions has not really been meaningful since the days of 10GB drives. ie. Most modern drives just report C/H/S that is as large as it legally can be and has nothing to do with real geometry, so aligning to it was pointless.
I understand this, so why is the Yast partitioner in openSUSE using these obsolete terms instead of just displaying sectors?
Even worse I've yet to find a formula to convert the cylinders that YaST shows to sectors.
On 2011/02/10 15:28 (GMT-0500) Andrew Joakimsen composed:
Even worse I've yet to find a formula to convert the cylinders that YaST shows to sectors.
What about my previous response to you 7 days ago did you not understand? http://lists.opensuse.org/opensuse/2011-02/msg00078.html
On Thu, Feb 10, 2011 at 3:28 PM, Andrew Joakimsen joakimsen@gmail.com wrote:
On Mon, Feb 7, 2011 at 10:07, Greg Freemyer greg.freemyer@gmail.com wrote:
The old head/cylinder aligned partitions has not really been meaningful since the days of 10GB drives. ie. Most modern drives just report C/H/S that is as large as it legally can be and has nothing to do with real geometry, so aligning to it was pointless.
I understand this, so why is the Yast partitioner in openSUSE using these obsolete terms instead of just displaying sectors?
Even worse I've yet to find a formula to convert the cylinders that YaST shows to sectors.
-- Med Vennlig Hilsen,
A. Helge Joakimsen
No idea, its time to stop even talking about them as far as I'm concerned. If you create an openFATE entry to update the Yast Partitioner that way, I'l certainly vote for it.
Greg