Jump to content

HDD performance <-> Allocation unit size


Recommended Posts

I was under the tacit (and maybe naive) impression HDparm was a benchmark, but indeed, it isn't. Although, it can do some HDD performance testing. I think for benchmarking HD Tune Pro is th e most suitable. For getting Disk ID, features, commands, settings of the HDD, HDparm and HDDScan are OK.

j

Link to comment
Share on other sites

  • 2 weeks later...

The contiguous read throughput is essentially independent of the cluster size. Your observations are correct.

Files use to be little fragmented on a disk, and to read a chunk of them, the Udma host tells the disk "send me sectors number xxx to yyy". How the sectors are spread along the clusters makes zero difference there. They only tell where a file shall begin (and sometimes be cut if fragmented), and since mechanical disks have no understandable alignment issues, clusters have no importance.

This would differ a bit on a CF card or an SSD, which have lines and pages of regular size, and there aligning the clusters on line or page boundaries makes a serious difference. Special cluster sizes, related to the line size (or more difficult, with the page size) allow a repeatable alignment. Exception: the X25-E has a 10-way internal Raid-0, so it's insensitive to power-of-two alignment.

So cluster size is not a matter of hardware. Much more of Fat size (important for performance), Mft size (unimportant), and lost space.

In a mechanical disk, you should use clusters ok 4kiB (at least with 512B sectors) to allow the defragmentation of Ntfs volumes.

Link to comment
Share on other sites

Files use to be little fragmented on a disk, and to read a chunk of them, the Udma host tells the disk "send me sectors number xxx to yyy". How the sectors are spread along the clusters makes zero difference there. They only tell where a file shall begin (and sometimes be cut if fragmented), and since mechanical disks have no understandable alignment issues, clusters have no importance.

I've done the same test with a 2TB external SATA-III (6Gbit/Sec) drive in a USB3.0 enclosure, and the results are the same as with my internal 1TB system HDD: that is, the read/write performance of the 2TB HDD (Write=105MB/Sec; Read=145MB/Sec) seems to be independent of AUS under Win7.

So, from your explanation I infer that large chunks of data, linearly scooped up from the HDD (from sector X to sector Y), are being dumped into the RAM area that is foreseen for the DMA on the motherboard!? (Correct my if I'm wrong.) In that view it is understandable that HDD performance should be insensitive to the AUS of the filesystem on the HDD.

However, ... I got (nonetheless) a question about how the HDD performance test is implemented in software. I've been using ATTO Disk Benchmark (v2.47) and there are several options like *Direct I/O*, *I/O Comparison* and *Overlapped I/O*. The option *Direct I/O* is always checked during my tests.

According to the HELP in ATTO Disk Benchmark, *Direct I/O* means that there is no system buffering nor any system caching used during the HDD performance test. I assume with buffering or caching ATTO means the RAM-DMA buffering on the motherboard (I cannot imagine they're talking about the HDDs cache); I tacitly assumed that ATTO Disk Benchmark tested the performance between the motherboard (RAM-DMA) and the HDD, so meaning the performance over the SATA-III link itself. I've done a performance test on my 2TB external HDD (and earlier on my system 1TB HDD too) with *Direct I/O* UNchecked and the results were stunning; the graphical performance reading in ATTO Disk Benchmark went up to 1600 MBytes/Sec, almost 3 times the maximum SATA-III bandwith!!! Hence that I think that with buffering or caching ATTO means the RAM-DMA on the motherboard. Consequently, in order to see any realistic performance output in ATTO I think the option *Direct I/O* needs to be checked, thereby deactivating any RAM-DMA buffering or caching on the motherboard.

As a result, I'm a bit confused here. If the read/write performance of the HDD is insensitive with respect to the HDDs AUS because of the usage of the RAM-DMA on the motherboard, then this argument seems to conflict the assumption that the RAM-DMA is deactivated in ATTO Disk Benchmark by its option *Direct I/O*. I'm sure I got it wrong somehow somewhere, but where exactly did I make a mistake in my assumptions or my reasoning?

regards,

johan

Link to comment
Share on other sites

This would differ a bit on a CF card or an SSD, which have lines and pages of regular size, and there aligning the clusters on line or page boundaries makes a serious difference. Special cluster sizes, related to the line size (or more difficult, with the page size) allow a repeatable alignment. Exception: the X25-E has a 10-way internal Raid-0, so it's insensitive to power-of-two alignment.

I'm not familiar with SSDs, but I'm very much interested in getting deeper into the workings and fine tuning of SSDs, as I may purchase an SSD in the near future. Hence the question, do you know any documents, websites, links, references, or whatever reading, which could give me a deeper insight about how SSDs are designed and work? Especially, I need to acquire a better insight in notions like line size, page size, partition alligmend in SSDs, clusters size (and the difference with Allocation Unit Size in Win7). I would like to get a deeper insight in SSDs and the difference with HHDs, especially in the context of optimizing their performance.

thanks,

johan

Edited by DiracDeBroglie
Link to comment
Share on other sites

Which role (if any) would NCQ (Native Command Queuing) have in the benchmark(s)?

jaclaz

In ATTO Disk Benchmark I tried out Queque Depth (QD)=4 and =10. On my recently purchased Win7 notebook there was no difference in the performance test between QD=4 and =10. However, on my 8 year old WinXP notebook, the difference in the performance test between QD=4 and =10 is clearly visible in the output graph. I am not sure what the exact relation is between QD in ATTO, and NCQ. Furthermore, my HDDs have an NCQ depth of 32, while QD in ATTO goes only to a maximum of 10. On my Win7 notebook, I also don't see the relevance of NCQ or QD if large chunks of data (from sector X to sector Y) from the HDD are being dumped into the RAM-DMA during the performance test with ATTO; there is no need for complicated searching on the HDDs where the read/write heads need to wobble over the platters.

Well, the performance of the HDDs (internal and external) on my Win7 notebook is what it is, there is no way to go beyond it physical limits. To me, the most important is that I can get the maximum out of the HDDs and also understand why and how particular parameters in the hardware (HDDs) related to the performance (optimization).

By the way, some time ago we had discussion about misaligned partitions in advanced format HDDs (4K sector drives), like my 2TB exteranl USB3.0 drive. I now performed an ATTO Disk Benchmark test on a partition (on the 2TB HDD) which was first correctly partition-aligned after being created under Win7, and did the ATTO test again after the partition was deleted and re-created under WinXP (so misaligned). The WinXP-created partition had a slightly lower read performance (1% less, not even that maybe) compared to the Win7-created partition. However, the write performance for the WinXP-created partition was something like 10% less than for the Win7-created partition. I get the impression that partition-misalignment may not be that much of an performance issue in advanced format drives. All performance test (including for the WinXP-created partition) where done on the Win7 notebook.

In the process of doing those test, I ran into trouble with my 2TB HDD, which is also my data backup drive. The first partition is a primary partition, followed by an extended partition containing 4 logical partitions; all partition were created under Win7. Then, on my WinXP notebook, after having deleted and re-created the first (primary) partition, the second, third and fourth logical partitions disappeared; the first logical partition, however, and the extended (shell) partition remained intact (checked that out with PTEdit32 and PartInNT). I tried to retrieve the data from the lost partitions using GPartED but after almost 10 hours of "retrieving", GPartED gave up. So, all my data on those 3 logical partitions is gone. Lesson to be learned: WinXP and Win7 are not quite compatible when it comes to partitioning (which I already knew) and that can have disastrous consequences (that I have now learned the hard way).

johan

Link to comment
Share on other sites

In the process of doing those test, I ran into trouble with my 2TB HDD, which is also my data backup drive. The first partition is a primary partition, followed by an extended partition containing 4 logical partitions; all partition were created under Win7. Then, on my WinXP notebook, after having deleted and re-created the first (primary) partition, the second, third and fourth logical partitions disappeared; the first logical partition, however, and the extended (shell) partition remained intact (checked that out with PTEdit32 and PartInNT). I tried to retrieve the data from the lost partitions using GPartED but after almost 10 hours of "retrieving", GPartED gave up. So, all my data on those 3 logical partitions is gone. Lesson to be learned: WinXP and Win7 are not quite compatible when it comes to partitioning (which I already knew) and that can have disastrous consequences (that I have now learned the hard way).

Yep, that is seemingly "by design" (as the good MS guys would put it) :w00t: .

Sorry for your mishap, but you are not the first one:

http://reboot.pro/9897/

AND you were been already warned :ph34r: about the issue:

BTW the data is normally perfectly recoverable, that is if you use properly a data recovery app that GPARTED is not AFAIK.

jaclaz

Link to comment
Share on other sites

BTW the data is normally perfectly recoverable, that is if you use properly a data recovery app that GPARTED is not AFAIK.

jaclaz

Based on your experience, which recovery apps/soft are worth having at hand when it comes to this sort of partition (table) damage?

johan

PS: In Win7 I deleted the very first (primary and WinXP-created) partition (on my 2TB HDD), and then created a New Simple Volume in the Disk Manager in Win7. After checking the 2TB HDD with GPartED I noticed there was a gap of UNallocated disk space between the newly created primary partition and the next extended partition shell (which has never been damaged) of exactly 1MB. I could only see the 1MB gap in GPartED, but not at all in the Disk Manager in Win7. So, in GPartED I got rid of the 1MB gap by expanding/extending the newly created primary partition.

But also the very last partition (which is primary one following the extended (shell) partition) was followed by an UNallocated area of 2MB!!?? I got rid of that too by extending the last prim partition in GPartED. But also here the 2MB gap was not visible in the Win7 DM.

Edited by DiracDeBroglie
Link to comment
Share on other sites

Based on your experience, which recovery apps/soft are worth having at hand when it comes to this sort of partition (table) damage?

It depends.

For a semi-automated attempt, TESTDISK.

For manual recovery I tend to use Tiny Hexer (with my small viewers/templates for it).

A very good app in my view is dmde (though very powerful, more handy for filesystem recovery)

BUT read this:

(and links within it)

PS: In Win7 I deleted the very first (primary and WinXP-created) partition (on my 2TB HDD), and then created a New Simple Volume in the Disk Manager in Win7. After checking the 2TB HDD with GPartED I noticed there was a gap of UNallocated disk space between the newly created primary partition and the next extended partition shell (which has never been damaged) of exactly 1MB. I could only see the 1MB gap in GPartED, but not at all in the Disk Manager in Win7. So, in GPartED I got rid of the 1MB gap by expanding/extending the newly created primary partition.

But also the very last partition (which is primary one following the extended (shell) partition) was followed by an UNallocated area of 2MB!!?? I got rid of that too by extending the last prim partition in GPartED. But also here the 2MB gap was not visible in the Win7 DM.

Well, the general idea is to STOP fiddling with a disk as soon as you find an issue :ph34r:.

In Windows XP "way of thinking", since everything is Cylinder boundary related, only steps of around 8 Mb are "sensed" by the Disk manager (1x255x63=16065x512=8225280).

Cannot say about 7, but most probably it has similar issues but with the same "pre-sets" that affect diskpart and that can be overridden through the Registry:

http://www.911cd.net/forums//index.php?showtopic=21186

http://www.911cd.net/forums//index.php?showtopic=21186&st=18

http://support.microsoft.com/kb/931760/en-us

The 1 Mb (which i s not a "measure", bytes are units, Megabytes or Mibibytes or whatever can be displayed in several different way by different utilities using different conventions) could be "normal", the 2 Mb less so :unsure:

A typical Vista :ph34r: or 7 first partition is aligned to 1 Mb (2048 sectors), but there may be variations, it is possible that - for any reason - the gap you found around 1 Mb in size is aactually smaller than 1 Mb (and thus results in "a suffusion of yellow") and that the other around 2 Mb gap is not a myltiple of 1 Mb and thus is ignored.

Cannot say.

Here is an example of a partition recovery (to give you an idea of the kind of approach):

and another one:

jaclaz

Link to comment
Share on other sites

...from your explanation I infer that large chunks of data, linearly scooped up from the HDD (from sector X to sector Y), are being dumped into the RAM area that is foreseen for the DMA on the motherboard!?

Bonsoir - Goedenavond Johan! Yes, this is the way I believe to understand it. Until I change my mind, of course.

...with *Direct I/O* UNchecked and the results were stunning; the graphical performance reading in ATTO Disk Benchmark went up to 1600 MBytes/Sec, almost 3 times the maximum SATA-III bandwith!!! Hence that I think that with buffering or caching ATTO means the RAM-DMA on the motherboard...

What Atto could mean with "direct I/O" is that is does NOT use Windows' system cache.

The system cache (since W95 at least) is a brutal feature: every read or write to disk is kept in main Ram as long as no room is requested in this main memory for other puposes. If a data has been read or written once, it stays available in Ram.

Win takes hundreds of megabytes for this purpose, with no absolute size limit. So the "cache" on a hard disk, which is much smaller than the main Ram, cannot serve as a cache with Win, since this OS will never re-ask for recent data. Silicon memory on a disk can only serve as a buffer - which is useful especially with Ncq.

Very clear to observe with a diskette. Reading or writing on it takes many seconds, but re-opening a file already written is immediate.

-----

Cluster size matters little as a result of the Udma command. It specifies a number of sectors to be accessed, independently of cluster size and position. A disk doesn't know what a cluster is. Only the OS knows it to organize its Mft (or Fat or equivalent) and compute the corresponding sector address. The only physical effect on a disk is where files (or file chunks if fragmented) begin; important on Flash storage, less important in a Raid of mechanical disks, zero importance on a single mechanical disk where tracks have varied unpredictable bizarre sizes within one disk.

Edited by pointertovoid
Link to comment
Share on other sites

... I may purchase an SSD in the near future.... do you know any documents, websites, links, references, or whatever reading, which could give me a deeper insight about how SSDs are designed and work?

Yes, get an Ssd at least for the OS, your documents, and small applications. They're hugely better than mechanical disks for any data that fits the limited size. Affordable as used disks on eBay: I got a used Corsair F40 (40GB MLC with Sandforce) delivered for 50€, it's excellent.

Their efficient use is difficult to understand and implement, and little simple reading is available. Wiki?

The buyer-user should understand in advance SLC vs MLC, especially the implications for write delay, and the resulting need for a good cache AND cache strategy, which means a controller and its firmware, all-important with MLC. Older MLC are bad.

Write leveling is also very important to understand but not simple, especially as write performance drops over time with older Win. With Seven (or Vista?) and up, write performance shouldn't drop; with Xp, you can tweak the same effect; with W2k I couldn't let these tweaks run - but my disk is an SLC X25-E anyway :whistle: , nearly insensitive to anything, and so fast that it awaits the Cpu.

Alignment is important for speed; some measurements there on a CF card with Ntfs (easy) and Fat32 (needs tweaking).

Dandu.be made exhaustive measurements but he didn't tweak alignement, alas.

Link to comment
Share on other sites

Which role (if any) would NCQ (Native Command Queuing) have in the benchmark(s)?

NCQ makes a huge difference in real life. When booting W2k (whose disk access isn't as optimized as by Xp with its prefetch) it means for instance 18s instead of 30s, so Ahci should always be used, even if it requires an F6 diskette.

Different disks have different Ncq firmware resulting in seriously different experienced performance, and this cannot be told in advance from the disks' datasheet, nor from benchmarks of access time and contiguous throughput. Anyway, the arm positioning time between near tracks should be more important than random access over the whole disks, which usage never requires.

Few benchmarks make a sensible measurement here. Ncq is meaningful only if a request queue is used, but for instance Atto isn't very relevant here; it seems to request nearly-contiguous accesses, which give unrealistic high performance and show little difference between Ncq strategies; nice tool however to observe quickly if a volume is aligned on a Flash medium. The reference here is IOMeter but it's not easy to use, especially for access alignment. Recent CrystalDiskMark tests with Q=32 which is far too much for a workstation (Q=2 to 4).

Example of IOMeter with Q=1, versus Q=4 of one 600GB Velociraptor, versus Q=4 of four VRaptors in aligned Raid-0, on random 4k reads over 100MB (but 500MB for the Raid) (an SSD would smash N* 10k IO/s in this test):

post-227788-0-74296400-1340060834_thumb.

post-227788-0-73700700-1340060856_thumb.

post-227788-0-25228000-1340061764_thumb.

(log in to see the image, click to magnify)

As a practical consequence, an Ssd should be chosen based on few available tests available only from users... IOMeter, if not then CrystalDiskMark which at least tells the random delay for small writes, or good as well: "practical" comparisons at copying or writing many files. On the disks I own, I check the "find" time of some file names among ~100.000 Pdf in many subdirectories, the write time of many tiny files...

Edited by pointertovoid
Link to comment
Share on other sites

Which role (if any) would NCQ (Native Command Queuing) have in the benchmark(s)?

NCQ makes a huge difference in real life. When booting W2k (whose disk access isn't as optimized as by Xp with its prefetch) it means for instance 18s instead of 30s, so Ahci should always be used, even if it requires an F6 diskette.

Different disks have different Ncq firmware resulting in seriously different experienced performance, and this cannot be told in advance from the disks' datasheet, nor from benchmarks of access time and contiguous throughput. Anyway, the arm positioning time between near tracks should be more important than random access over the whole disks, which usage never requires.

Few benchmarks make a sensible measurement here. Ncq is meaningful only if a request queue is used, but for instance Atto isn't very relevant here; it seems to request nearly-contiguous accesses, which give unrealistic high performance and show little difference between Ncq strategies; nice tool however to observe quickly if a volume is aligned on a Flash medium. The reference here is IOMeter but it's not easy to use, especially for access alignment. Recent CrystalDiskMark tests with Q=32 which is far too much for a workstation (Q=2 to 4).

Really? :unsure:

Guess why I had previously posted this? :whistle:

The whole point is that benchmarks are - generally speaking - benchmarks ;) and they are ONLY useful to compare different settings (or different OS or different hardware), BUT the results need to be verified.

In no way thy are (or can be) representative of "real usage".

In other terms, it is perfectly possible that the result of a benchmark (which is an "absract" set of copying data with a given method) seem "almost the same" but on real usage a BIG difference is actually "felt", or viceversa, it is perfectly possible that in a benchmark a given setting produces an astoundingly "better" result, but then when the setting is applied in "real life" no (or very little difference) is "felt".

and why I asked the qiestion in the form:

Which role (if any) would NCQ (Native Command Queuing) have in the benchmark(s)?

:rolleyes:

jaclaz

Link to comment
Share on other sites

NCQ makes a huge difference in real life. When booting W2k (whose disk access isn't as optimized as by Xp with its prefetch) it means for instance 18s instead of 30s, so Ahci should always be used, even if it requires an F6 diskette.

Different disks have different Ncq firmware resulting in seriously different experienced performance, and this cannot be told in advance from the disks' datasheet, nor from benchmarks of access time and contiguous throughput. Anyway, the arm positioning time between near tracks should be more important than random access over the whole disks, which usage never requires.

Few benchmarks make a sensible measurement here. Ncq is meaningful only if a request queue is used, but for instance Atto isn't very relevant here; it seems to request nearly-contiguous accesses, which give unrealistic high performance and show little difference between Ncq strategies; nice tool however to observe quickly if a volume is aligned on a Flash medium. The reference here is IOMeter but it's not easy to use, especially for access alignment. Recent CrystalDiskMark tests with Q=32 which is far too much for a workstation (Q=2 to 4).

Example of IOMeter with Q=1, versus Q=4 of one 600GB Velociraptor, versus Q=4 of four VRaptors in aligned Raid-0, on random 4k reads over 100MB (but 500MB for the Raid) (an SSD would smash N* 10k IO/s in this test):

What is a F6 diskette?

>>The reference here is IOMeter but it's not easy to use, especially for access alignment.

What is access alignment?

-----------------------------------

I did the IOmeter test too on my 1TB Seagate Barracuda 7200.12 system HDD, with 3 different options in the pane |Disk Targets| -> |# of Oustanding I/O|=1, then =4 and again =32; I suppose that must be the Queue Depth equivalent to (or equal to) the NCQ in the HDD (correct me if I'm wrong). I'm not all to sure how to interpret the options |Maximum Disk Size (in sectors)| and |Starting Disk Sector|; do these need a figure?? I left them at zero during my tests.

In the pane |Access Specifications| I've put the value |4K; 100%Read; 0%Random|. The results from the tests are showns in the screenshots hereafter for #I/O=1, =4 and =32.

IOmeterQD1; IOmeterQD4; IOmeterQD32

The difference in performance between #I/O=1 and =4 seems significant; the difference between #I/O=4 and =32 is less, but still noticable. Anyhow, with #I/O=32 the performance comes pretty close to what I had earlier with ATTO Disk Benchmark.

I also performed a test with #I/O=64 (no screenshot); the performance was better than with #I/O=1, but poorer than with #I/O=4. It looks like offering too many (>32) parallel I/Os chokes the NCQ handling in the HDDs controller.

Still a question about the |Access Specifications| pane where I've put |4K; 100%Read; 0%Random|. All possible options were with 0% Random. I'm not sure what is meant with "Random"; does it mean random sector location of the HDDs platters? If yes, then 0% Random should mean 100% non-Random, right? If yes, 100% non-Random should mean 100% sequential (contiguous), which basically puts us into the same context of ATTO. But if both IOmeter and ATTO perform nearly-contiguous measurements, why does |# of Oustanding I/O| in IOmeter impacts the performance so much, while the Queue Depth in ATTO does not nearly influences the performance? Sticking point is how to interpret "Random" in |4K; 100%Read; 0%Random| for IOmeter?

johan

PS: I couldn't figure out how to introduce the image file inline in the text; they are now attached at the back.

post-340011-0-09651700-1340120400_thumb.

post-340011-0-56616100-1340120605_thumb.

post-340011-0-16652200-1340120628_thumb.

Edited by DiracDeBroglie
Link to comment
Share on other sites

What is a F6 diskette?

The "traditional" method to add a specific driver that is not already included in a NT based system.

See:

Typical is a Mass Storage device driver.

When you start a NT setup you are asked to press F6 to add the driver through a floppy disk.

At least in XP (cannot say in 2k) is possible (on motherboard that provide both Legacy IDE emulation and AHCI) to install "normally" and then install and switch the driver:

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...