FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-04-2012, 09:07 PM
Alan McKinnon
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Sun, 4 Mar 2012 13:56:23 -0800
Grant <emailgrant@gmail.com> wrote:

> >> [snip]
> >>>> 1. fdisk won't let me specify a start block before 2048 even
> >>>> though I deleted all partitions.
> >>>>
> >>>
> >>> That's normal. It's a long story, but Windows Vista and Windows 7
> >>> expects the first partition to start at sector 2048.
> >>>
> >>> You can force a lower number by toggling "DOS compatibility";
> >>> this should let you start the first partition as low as sector 63.
> >>>
> >>> HOWEVER, make sure that all partitions begin at multiples of 8
> >>> (e.g., 64, 72, 80, and so on); this will save you a lot of grief
> >>> if it happens that the hard disk you're using has 4KiB-sectors.
> >>
> >> I just looked up the start block for my other systems and they're
> >> all on 63. *Is performance impacted on all of these systems since
> >> they aren't started on 64?
> >>
> >> - Grant
> >>
> >
> > The performance is only impacted if the sector size is something
> > other than 512 bytes. The newer 4K sector size used by some higher
> > density drives requires that you start partitions on a sector
> > boundary or they will perform badly. There isn't an actually
> > performance need to actually start on 2048 but the fdisk-type
> > developer folks are doing that to be more compatible with newer
> > Windows installations.
>
> All my drives says this from fdisk:
>
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
>
> So it doesn't matter where the first partition starts?

Correct. Those drives are all the same style as you've
been using for years. If partitions start at 63, that's just an msdos
convention. For reasons I've never understood, Windows liked to reserve
the first 32k for some purpose or other.


--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 03-04-2012, 09:36 PM
Grant
 
Default Gentoo on a Dell XPS 13 Ultrabook

>> >> [snip]
>> >>>> 1. fdisk won't let me specify a start block before 2048 even
>> >>>> though I deleted all partitions.
>> >>>>
>> >>>
>> >>> That's normal. It's a long story, but Windows Vista and Windows 7
>> >>> expects the first partition to start at sector 2048.
>> >>>
>> >>> You can force a lower number by toggling "DOS compatibility";
>> >>> this should let you start the first partition as low as sector 63.
>> >>>
>> >>> HOWEVER, make sure that all partitions begin at multiples of 8
>> >>> (e.g., 64, 72, 80, and so on); this will save you a lot of grief
>> >>> if it happens that the hard disk you're using has 4KiB-sectors.
>> >>
>> >> I just looked up the start block for my other systems and they're
>> >> all on 63. *Is performance impacted on all of these systems since
>> >> they aren't started on 64?
>> >>
>> >> - Grant
>> >>
>> >
>> > The performance is only impacted if the sector size is something
>> > other than 512 bytes. The newer 4K sector size used by some higher
>> > density drives requires that you start partitions on a sector
>> > boundary or they will perform badly. There isn't an actually
>> > performance need to actually start on 2048 but the fdisk-type
>> > developer folks are doing that to be more compatible with newer
>> > Windows installations.
>>
>> All my drives says this from fdisk:
>>
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>
>> So it doesn't matter where the first partition starts?
>
> Correct. Those drives are all the same style as you've
> been using for years. If partitions start at 63, that's just an msdos
> convention. For reasons I've never understood, Windows liked to reserve
> the first 32k for some purpose or other.

So fdisk used to enforce a block 63 start point and now it enforces a
2048 start point? fdisk is the one doing this?

- Grant
 
Old 03-05-2012, 12:53 AM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 3:37 AM, "Alex Schuster" <wonko@wonkology.org> wrote:

>

> Grant writes:

>

> > Just to confirm, starting at block 2048 is OK?

>

> Yes, if it's divisible by 8, it's okay. That's because 512 * 8 = 4096, so

> every 8th 512-byte block starts on a 4096 block boundary.

>

> Now I have a related question: My new seagate Barracuda

> Green 2TB ST2000DL003-9VT166 drive has 4096 bytes per sector, but uses

> something that is called SmartAlign(TM)[*]. Seagate says that there are

> no performance impacts even when the partitions are misaligned. This

> would be good, because I completely forgot about this when creating

> partitions, and I would like to keep it as it is now. Has anyone heard

> about this? Can I trust Seagate that what they say is correct?

>

>[*] www.seagate.com/docs/pdf/de.../mb6101_smartalign_technology_faq.pdf

>

> * * * *Wonko

>


Your URL got munged there, I can't download the pdf.


Rgds,
 
Old 03-05-2012, 12:58 AM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 3:15 AM, "Grant" <emailgrant@gmail.com> wrote:

>

> [snip]

> >> HOWEVER, make sure that all partitions begin at multiples of 8 (e.g., 64,

> >> 72, 80, and so on); this will save you a lot of grief if it happens that the

> >> hard disk you're using has 4KiB-sectors. [1]

> >

> > <snip the rest>

> >

> > From what I recall of looking at that toy's specs, it's running on an

> > SSD, so it becomes even more important, performance-wise, to have

> > things aligned properly so any one write doesn't cause two full erase

> > blocks to be cycled. The 1MB alignment is, if I recall, a balance

> > Microsoft struck as the midpoint between multiple hardware vendors to

> > work well on any of them... raid arrays, SSDs, advanced format hard

> > drives with 4k sectors on-disk, etc.

>

> Just to confirm, starting at block 2048 is OK?

>


No problem. You'll just be shortchanged of almost 1MiB. Nothing to lose sleep over, IMO.


The most important thing is to make sure that *all* partitions begin on sectors divisible by 8. So, if you're going to set up multiple partitions, eyeball their start sectors carefully.


Rgds,
 
Old 03-05-2012, 01:06 AM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 4:59 AM, "Grant" <emailgrant@gmail.com> wrote:

>

>

> All my drives says this from fdisk:

>

> Units = sectors of 1 * 512 = 512 bytes

> Sector size (logical/physical): 512 bytes / 512 bytes

> I/O size (minimum/optimal): 512 bytes / 512 bytes

>

> So it doesn't matter where the first partition starts?

>


Older BIOSes don't understand that hard disks now can have 4KiB sectors, so some of the "advanced format" hard disks report a sector size of 512B. But behind the scenes, the hard disk maps the logical sector to a subsector of the physical sector.



The only sure fire way to find out if your hard disk uses 4KiB sectors is to open your computer and eyeball the hard disk. All 4KiB hard disks that I know of have statements on their surface that tell me so.


Rgds,
 
Old 03-05-2012, 01:12 AM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 5:10 AM, "Alan McKinnon" <alan.mckinnon@gmail.com> wrote:

>

>

> Correct. Those drives are all the same style as you've

> been using for years. If partitions start at 63, that's just an msdos

> convention. For reasons I've never understood, Windows liked to reserve

> the first 32k for some purpose or other.

>


Partitions start at sector 63 because traditionally that's the first sector of the second cylinder. If the partition starts at a lower sector, then the metadata of the filesystem might get split between two cylinders, causing a performance impact due to drive head repositioning (older -- like, *really old* drives -- have slow and inaccurate actuators; repositioning heads takes time because after moving the heads, the location needs some fine tuning by reading some calibration data embedded in every cylinder).



Rgds,

*
 
Old 03-05-2012, 01:19 AM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 5:39 AM, "Grant" <emailgrant@gmail.com> wrote:

>

>

> So fdisk used to enforce a block 63 start point and now it enforces a

> 2048 start point? *fdisk is the one doing this?

>

> - Grant

>


Yes. Like I posted before (and explained in the article I linked), if you turn off the compatibility mode, you can push it down to 63.


Not recommended, though. Not only will you lose compatibility with Windows, but also you'll only gain slightly less than 1MiB. And who knows in the future something absofuckinlutely requires the first partition to begin at sector 2048.



So, IMO, disabling the DOS compatibility gives one too small a gain that's worth the (possible) headache in the future.


Rgds,
 
Old 03-05-2012, 12:40 PM
Alex Schuster
 
Default Gentoo on a Dell XPS 13 Ultrabook

Pandu Poluan writes:

> On Mar 5, 2012 3:37 AM, "Alex Schuster" <wonko@wonkology.org> wrote:

> > Now I have a related question: My new seagate Barracuda
> > Green 2TB ST2000DL003-9VT166 drive has 4096 bytes per sector, but uses
> > something that is called SmartAlign(TM)[*]. Seagate says that there
> > are no performance impacts even when the partitions are misaligned.
> > This would be good, because I completely forgot about this when
> > creating partitions, and I would like to keep it as it is now. Has
> > anyone heard about this? Can I trust Seagate that what they say is
> > correct?
> >
> >[*]
> > www.seagate.com/docs/pdf/de.../mb6101_smartalign_technology_faq.pdf

> Your URL got munged there, I can't download the pdf.

Argh, how did that happen? I just copied from Firefox' address bar. And it
was in German anyway. Sorry. But somehow interesting, seems I sometimes
don't even notice which language a text is written in.

Here is the English version:
http://www.seagate.com/docs/pdf/whitepaper/tp615_smartalign_for_af_4k.pdf

This link also has some information, and the other one explains what the
problem with a 4K sector size is. But beware, this may well be Seagate
propaganda.

http://consumer.media.seagate.com/2010/06/the-digital-den/advanced-format-drives-with-smartalign/
http://consumer.media.seagate.com/2010/03/the-digital-den/4k-sector-hard-drive-primer/

Wonko
 
Old 03-05-2012, 03:00 PM
Alex Schuster
 
Default Gentoo on a Dell XPS 13 Ultrabook

Grant writes:

> > The performance is only impacted if the sector size is something other
> > *than 512 bytes. The newer 4K sector size used by some higher density
> > drives requires that you start partitions on a sector boundary or they
> > will perform badly. There isn't an actually performance need to
> > actually start on 2048 but the fdisk-type developer folks are doing
> > that to be more compatible with newer Windows installations.
>
> All my drives says this from fdisk:
>
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes

Neither fdisk nor hdparm seem to get the correct sector size, at least
not always. That's what I read somewhere (and not only once), and it's
true for my own 2TB drive which I know to have a 4K sector size. I'd say
you have to look up the specs on the vendor's web size to be sure.

> So it doesn't matter where the first partition starts?

If you have 4K sectors (and not a Seagate drive with SmartAlign[*]), it
does.

BTW, here's some benchmarks I just stumbled upon:
http://hothardware.com/Articles/WDs-1TB-Caviar-Green-w-Advanced-Format-Windows-XP-Users-Pay-Attention/?page=2
[*] I don't want to sound like I'm advertising for Seagate here, but at
least it seems that with SmartAlign the performance impact will be
much less, so it might not be worth the trouble of re-partitioning drives
that are already being used.

Wonko
 
Old 03-05-2012, 03:33 PM
Pandu Poluan
 
Default Gentoo on a Dell XPS 13 Ultrabook

On Mar 5, 2012 11:04 PM, "Alex Schuster" <wonko@wonkology.org> wrote:

>

> Grant writes:

>

> > > The performance is only impacted if the sector size is something other

> > > *than 512 bytes. The newer 4K sector size used by some higher density

> > > drives requires that you start partitions on a sector boundary or they

> > > will perform badly. There isn't an actually performance need to

> > > actually start on 2048 but the fdisk-type developer folks are doing

> > > that to be more compatible with newer Windows installations.

> >

> > All my drives says this from fdisk:

> >

> > Units = sectors of 1 * 512 = 512 bytes

> > Sector size (logical/physical): 512 bytes / 512 bytes

> > I/O size (minimum/optimal): 512 bytes / 512 bytes

>

> Neither fdisk nor hdparm seem to get the correct sector size, at least

> not always. That's what I read somewhere (and not only once), and it's

> true for my own 2TB drive which I know to have a 4K sector size. I'd say

> you have to look up the specs on the vendor's web size to be sure.

>

> > So it doesn't matter where the first partition starts?

>

> If you have 4K sectors (and not a Seagate drive with SmartAlign[*]), it

> does.

>

> BTW, here's some benchmarks I just stumbled upon:

> http://hothardware.com/Articles/WDs-1TB-Caviar-Green-w-Advanced-Format-Windows-XP-Users-Pay-Attention/?page=2


>

>[*] I don't want to sound like I'm advertising for Seagate here, but at

> least it seems that with SmartAlign the performance impact will be

> much less, so it might not be worth the trouble of re-partitioning drives

> that are already being used.

>

> * * * *Wonko

>


The problem with SmartAlign is that... it's magic... once you run out of mana, you can kiss your data goodbye.


In other words, I tried to find how it works, but Seagate seems to be mum; and that is ungood. Without knowing how exactly the technology works, how can we be sure that it won't blow up when encountering edge/corner cases?



So, albeit nice (in the sense that one does not have to experience the headache in ensuring that partitions are properly aligned), I personally will stay away from magical things.


Rgds,
 

Thread Tools




All times are GMT. The time now is 10:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org