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

Re: [OT] Hard Drive Energy Not Worth Conserving drives?



Jochen Schulz put forth on 1/11/2011 12:58 PM:
> Stan Hoeppner:
>> Jochen Schulz put forth on 1/11/2011 3:19 AM:
>>
>>> And those pesky 4k blocks will never take hold. 512 bytes were a good
>>> idea in the 1950s, so what's wrong with it now!?
>>
>> 4KB blocks are great.  Too bad these drives report 512B blocks to the kernel,
>> which is what causes the problem.  "Advanced format" = hybrid, not native.
> 
> My WD10EARS (not the 2TB variant that this thread was about) looks correct:
> 
> # hdparm -I /dev/sdc | grep "Sector size"
>         Logical  Sector size:                   512 bytes
>         Physical Sector size:                  4096 bytes

This is reported by the drive to hdparm.  Only the 512 is used by the kernel.
It has no knowledge of the 4KB physical block size and can't use it because the
drive reports 512 bytes to the kernel as the physical block size.  That's
precisely what causes all the problems.

> Don't we already waste that space with our filesystems? Ext2 cannot use
> blocks smaller than 1024 Bytes, as far as I can see. And by default even
> 4kB are used for small filesystems (<5GB on my /).

This depends on the FS and how it allocates space for files.  XFS for example
uses variable length extents.  Each extent is comprised of one or more blocks.
Each block is 4KB (mkfs.xfs default).  Each block is 8 physical sectors on a
traditional 512 byte/sector disk.  XFS can pack multiple small files into a
single 4KB block extent.  It is able to do this thanks to delayed allocation.
This works fairly well on busy mail servers using maildir storage format as many
small files are written in close succession, allowing delayed allocation to pack
many into a single extent.  XFS on a workstation where there may be many minutes
between each small file write will probably not be packing multiple small files
into a single extent.  But XFS isn't really targeted at general use single use
workstations.  It's designed for highly parallel workloads with multiple
concurrent read/write streams--i.e. servers and supercomputers.  Small file
storage efficiency is not a core feature of XFS but a fairly recent optimization
AFAIK.

-- 
Stan


Reply to: