Re: how not to initialize HD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/06/2010 11:24 PM, Michael Hennebry wrote:
> On Fri, 6 Aug 2010, Gregory Hosler wrote:
> 
>> may, in fact, not be reclaimable -- in Linux, partitioning is usually done on
>> cyl boundaries).
> 
> Would you expound on that a bit?

The default behaviour of fdisk is to allocate partitions on cyl boundaries.

> I've often seen *fdisk complain that a partition
> did not end on a cyl boundary.
> I've also read that cyl boundaries are not all that meaningful anymore.

In the early days, drivers were written to know about cylinder position of the
read/write operation, and would group i/o requests together to avoid unnecessary
seek. (this is still done, but the functionality has been moved into the block
i/o elevator algorithm.).

Modern disks have much more tracks on the outer cyls than on the inner cyls, so
the geometry displayed by fdisk (sectors per track, tracks per cyl, and # of
cyls) is not accurate. Be that as it may, it is still a reasonable
representation of the disk, and the upper layers will pretend that it is
correct, at least to the extent of ordering i/o to/from the disk.

> In particular, I've read that (cyl, head, sector)
> indexing is especially useless lately.

incorrect.

cyl,head,sector mapping/indexing is inaccurate, but far far from "useless".

Run the zcav tool from bonnie. It is absolutely demonstrate-able that the data
transfer rates to the outer cyls (low #) is *MUCH* faster then the inner cyls
(high #).

Using fdisk, one can control the location of the partition (by specifying the
start/end cyl). By controlling the placement of partition to the "high speed"
cyls (the outer rings) the i/o transfers *WILL* be faster that the same data
placed on partitions that are assigned cyls in the inner rings (high cyl #'s).

Saying that (cyl, head, sector) is useless (or especially useless) would not be
true.

> I expect that is at least partly because not all cylinders
> are the same size even on the same drive.

correct.

> What is *fdisk actually complaining about when
> it complains about a cylinder boundary?

In fdisk's limited view of the world, 1 cyl equals tracks times sectors, and all
tracks are the same size (which we know not to be true).

When fdisk is complaining, it is complaining that the # sectors times # tracks
does not align with it's view of a cyl.

> Why does it care?

If filesystems are on cyl aligned partitions, then there is likely to be less
wastage (due to multiple block alignments), as compared to cyls that start on
randomly selected sectors, and end on randomly selected sectors. This is also
true with lvm and extents.


Take as a trivial example, a partition with 15 sectors total, and an extent of 8
sectors (4 blocks). In this case, there are only 1 usable extent. The remaining
7 sectors are unusable, wasted.

Of course with today's multi-gigabyte disks, divided into at most 15 partitions,
the actual amount of wasted space is trivial.

- -Greg

- -- 
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler@xxxxxxxxxx    |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkxc2T0ACgkQ404fl/0CV/Q6fQCfcCG9JECrzvVWQ3sZ2lRvf0J/
xI8AniT+ZSilO6b4wfIlcpbz8Ojj1WcR
=NB7Q
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux