The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Hitachi 7K500: Disk Write Cache Settings for Performance

    Discussion in 'Hardware Components and Aftermarket Upgrades' started by tilleroftheearth, Dec 26, 2009.

  1. tilleroftheearth

    tilleroftheearth Wisdom listens quietly...

    Reputations:
    5,398
    Messages:
    12,692
    Likes Received:
    2,717
    Trophy Points:
    631
    In this post in the SSD thread:

    See:
    http://forum.notebookreview.com/showpost.php?p=5659530&postcount=2274

    I posted what the new Intel Rapid Storage Technology drivers 9.5.4.1001 did for my benchmarks using an elevated command prompt and 'winsat disk' run.

    Got me thinking that I should now play with the drive's Cache settings in Win 7 to see if these scores could be improved upon. They could!

    Alright. Free performance! One checkbox clicked and an over 18 times improvement is noted in one of the 'winsat disk' runs:

    Code:
    With 'Enable Write Caching on the Device' [B]checked (on)[/B]: 
    Latency: Maximum                            449.781 ms          4.2
    
    With 'Enable Write Caching on the Device' [B]unchecked (off)[/B]:
    Latency: Maximum                             24.337 ms          7.9

    This is exciting! Keep in mind that this 24.337 ms result is even better than some SSD's.

    Now, reality sets in... :p

    Note:
    Although the no disk cache setting lowered the real world performance overall of my mechanical HD, I wonder how this setting would affect an SSD in real world use?


    Notice how the Total Run Time's compare:

    Code:
    With 'Enable Write Caching on the Device' [B]checked (on)[/B]: 
    Total Run Time 00:01:52.43
    
    With 'Enable Write Caching on the Device' [B]unchecked (off)[/B]:
    Total Run Time 00:02:48.75

    Yeah, almost a minute longer to run the same test, but 18 times faster latency scores; which do I rely on and/or use? I needed a 'real' benchmark to see which is the best combination for my system.


    This is what I compared:
    1). The Write Caching on the Device 'enabled/checked' for my Hitachi 7K500.
    2). The Write Caching on the Device 'disabled/unchecked' for my Hitachi 7K500.
    3). The Write Caching on the Device 'enabled/checked' and Turn off Windows write cache buffer flushing on the device 'enabled/checked' for my Hitachi 7K500.

    How do you change these settings?
    Right click on Computer, Manage, Device Manger, Disk Drives, Double click on the disk you want to change the settings for and select the Policies tab.


    I n each of the above scenarios, I opened/closed (only) 13 programs and timed each one individually. I ran these tests 3 times each and took the average time for each program. I won't bore you with the scores because they were essentially the same for the different scenarios I tested them in. This in itself was still interesting to me though: i.e. no correlation to the winsat benchmarks.

    Although opening/closing programs performed nearly identically (unless a stopwatch was used), there were differences in how the computer performed in other common tasks. These are outlined below.

    First: All three scenarios produced identical WEI scores. Changing the cache settings and/or the cache flush settings did not reflect on the WEI of the computer at all.

    Second: The time it took to run the WEI assessment (by deleting the contents of the 'C:\Windows\Performance\WinSAT\DataStore' folder and running the WEI assessment again) hinted at the performance difference to expect in actual use. Although it didn't hint at the disparity that actually existed in PD10 defragging, Shutdown and Boot up times.

    The numbers?
    Code:
                    No Cache      WriteCache       WriteCacheNoFlush
      MM:SS           5:57.16         5:14.78              5:14.56
    
    [I]How could I measure the decimal seconds so accurately?  I didn't - WEI does.
    
    Look in the last line of the 'Formal.Assessment (Initial).WinSAT.xml' file
    (preceded by the date/time of when the WEI was run) in the folder noted above.[/I]
    So, it takes 'only' 42.6 seconds longer (13.5% longer) to run the WEI assessment with the disk cache off - but that 42.6 second longer WEI time is indicative of much longer times elsewhere (where they count to a user more).

    Here is the additional raw data for the three scenarios:

    Code:
                    No Cache      WriteCache       WriteCacheNoFlush
    Shutdown        28 secs        13 secs             14 secs
    Startup:
    ShowDeskTop     42 secs        38 secs             41 secs
    Usable          80 secs        72 secs             67 secs
    PD10 Defrag     40 min          7 min               7 min
    
    Note: [I]'Usable' is when the wireless connection shows 'connected'[/I].

    Shutdown was an eye-opener! Double the time to simply have the system 'stop' with no disk cache enabled! This time would go up to over two minutes if I had used the computer heavily for my normal RAW image editing use (which I didn't time/compare because it was obviously, much slower too).

    Starting up the computer was not as dramatic, but still significant. The important parameter was to the 'usable' state and disabling the flush buffer command helped the computer boot to a usable state 5 seconds faster than the Windows 7 default and also 13 seconds (or almost 20%) faster than no disk cache at all.

    Running PD 10 was the clincher though! - Because it is easier to use as a disk intensive test (it keeps track of how long each run takes). With no cache enabled the PD10 runs were 571% longer than with both the Cache and the Cache and Flush disabled settings for the Hitachi.

    40 minutes vs. 7 minutes!

    How can I be sure of something so nebulous as a defragging run? Well, for one, I ran PD over a dozen times right after rebooting and got a good 'base' score of 7 minutes (some were 5 some were 8 minutes). Simply disabling the disk cache and rebooting gave PD the fits with 38 to 45 minute runs. This is obviously the disk cache setting affecting the performance of the HD, imho.

    What I decided to use after all these tests is the Disk Cache on and Cache Flushing disabled settings for my Hitachi and have been using them for the last couple of days with no problems.

    Why this one step off from the MS defaults? Because the computer 'feels' faster. More snap, more directly connected feel and almost no downside ( almost means not even in the WEI benchmarks).

    I started off with the huge latency improvements that turning the disk cache off had in one of the benchmarks and completely ignored the rest of the numbers that indicated 'Hey! Maybe this isn't the best setting 'overall''. This was on purpose as this is how I actually proceeded to use this setting based simply on the one benchmark - but the system felt so sluggish in actual use that it left me scratching my head (and prompted this thread).

    I hope that this little exercise shows that simply chasing benchmarks may be rather futile and even counterproductive, if we ignore the real reason we use our computers for - getting work done as fast as possible, or, making the system 'disappear' when we enter our virtual reality games and leave the 'real world' for awhile.

    How do I make sure my testing/benchmarking is not 'futile'? By comparing my actual use of the computer directly to what performance numbers I was getting immediately before any 'tweaks' or hardware upgrades got introduced to the system.

    If I get a 1% or 10% or 100% improvement in actual use (and not simply in benchmarks) then it is up to me to see if the cost/price of the tweak or hardware upgrade is worth it, or do I simply return/exchange the H/W (or undo the tweak) and try again in a few weeks or months when something potentially better comes along.

    Please note that changing the settings as I have for my system comes with a warning that should power be suddenly interrupted, there is a significant potential for data loss or even system instability to occur. I do not care as the notebook computer's battery is acting as a UPS for me.

    Please consider how important system availability and/or data loss is for you before changing these settings to eek out a little (or a lot, depending on your HD and system configuration) extra performance and/or 'snap' in the UI.

    Please share any additional info that these settings have had on your particular system setup and use. I'll try to answer any questions to the best of my abilities. I will also thank you in advance for any info you do give.

    I would also be most interested to learn if these settings affect SSD's in a similar way or do we have more learning to do in that area?

    SSD owners, please contribute too! :)



    Below are the complete 'winsat disk' runs in Windows 7 x64 with 8GB RAM in a VAIO with a P8400 and a Hitachi 7K500 500GB 7200 RPM HD:

    IRST drivers 9.5.4.1001 installed with Write Caching enabled:
    (Copied from the link at the top of this post)

    Code:
    C:\Windows\system32>winsat disk
    Windows System Assessment Tool
    > Running: Feature Enumeration ''
    > Run Time 00:00:00.00
    > Running: Storage Assessment '-seq -read -n 0'
    > Run Time 00:00:10.08
    > Running: Storage Assessment '-ran -read -n 0'
    > Run Time 00:00:15.15
    > Running: Storage Assessment '-scen 2009 -drive C:'
    > Run Time 00:01:00.65
    > Running: Storage Assessment '-seq -write -drive C:'
    > Run Time 00:00:08.39
    > Running: Storage Assessment '-flush -drive C: -seq'
    > Run Time 00:00:05.51
    > Running: Storage Assessment '-flush -drive C: -ran'
    > Run Time 00:00:11.76
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 4096'
    NV Cache not present.
    > Run Time 00:00:00.00
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 16384'
    NV Cache not present.
    > Run Time 00:00:00.00
    > Disk  Sequential 64.0 Read                   85.62 MB/s          6.3
    > Disk  Random 16.0 Read                       1.08 MB/s          3.2
    > Responsiveness: Average IO Rate              2.38 ms/IO          6.8
    > Responsiveness: Grouped IOs                  10.39 units          7.1
    > Responsiveness: Long IOs                     7.50 units          7.6
    > Responsiveness: Overall                      77.96 units          6.9
    > Responsiveness: PenaltyFactor                0.0
    > Disk  Sequential 64.0 Write                  100.99 MB/s          6.6
    > Average Read Time with Sequential Writes     7.986 ms          5.0
    > Latency: 95th Percentile                     37.829 ms          2.3
    > Latency: Maximum                             449.781 ms          4.2
    > Average Read Time with Random Writes         18.561 ms          2.7
    > Total Run Time 00:01:52.43


    IRST drivers 9.5.4.1001 installed with Write Caching enabled and Buffer Flushing disabled:

    Code:
    C:\Windows\system32>winsat disk
    Windows System Assessment Tool
    > Running: Feature Enumeration ''
    > Run Time 00:00:00.00
    > Running: Storage Assessment '-seq -read -n 0'
    > Run Time 00:00:10.05
    > Running: Storage Assessment '-ran -read -n 0'
    > Run Time 00:00:15.04
    > Running: Storage Assessment '-scen 2009 -drive C:'
    > Run Time 00:01:00.56
    > Running: Storage Assessment '-seq -write -drive C:'
    > Run Time 00:00:08.44
    > Running: Storage Assessment '-flush -drive C: -seq'
    > Run Time 00:00:05.27
    > Running: Storage Assessment '-flush -drive C: -ran'
    > Run Time 00:00:11.36
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 4096'
    NV Cache not present.
    > Run Time 00:00:00.02
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 16384'
    NV Cache not present.
    > Run Time 00:00:00.01
    > Disk  Sequential 64.0 Read                   85.64 MB/s          6.3
    > Disk  Random 16.0 Read                       1.10 MB/s          3.2
    > Responsiveness: Average IO Rate              2.34 ms/IO          6.8
    > Responsiveness: Grouped IOs                  10.27 units          7.1
    > Responsiveness: Long IOs                     6.93 units          7.6
    > Responsiveness: Overall                      71.16 units          6.9
    > Responsiveness: PenaltyFactor                0.0
    > Disk  Sequential 64.0 Write                  101.61 MB/s          6.6
    > Average Read Time with Sequential Writes     7.758 ms          5.1
    > Latency: 95th Percentile                     27.696 ms          3.9
    > Latency: Maximum                             445.787 ms          4.2
    > Average Read Time with Random Writes         17.729 ms          2.9
    > Total Run Time 00:01:51.64



    IRST drivers 9.5.4.1001 installed with Write Caching disabled:

    Code:
    C:\Windows\system32>winsat disk
    Windows System Assessment Tool
    > Running: Feature Enumeration ''
    > Run Time 00:00:00.00
    > Running: Storage Assessment '-seq -read -n 0'
    > Run Time 00:00:11.20
    > Running: Storage Assessment '-ran -read -n 0'
    > Run Time 00:00:15.09
    > Running: Storage Assessment '-scen 2009 -drive C:'
    > Run Time 00:01:30.18
    > Running: Storage Assessment '-seq -write -drive C:'
    > Run Time 00:00:08.95
    > Running: Storage Assessment '-flush -drive C: -seq'
    > Run Time 00:00:20.67
    > Running: Storage Assessment '-flush -drive C: -ran'
    > Run Time 00:00:20.44
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 4096'
    NV Cache not present.
    > Run Time 00:00:00.03
    > Running: Storage Assessment '-hybrid -ran -read -n 0 -ransize 16384'
    NV Cache not present.
    > Run Time 00:00:00.02
    > Disk  Sequential 64.0 Read                   85.49 MB/s          6.3
    > Disk  Random 16.0 Read                       1.14 MB/s          3.3
    > Responsiveness: Average IO Rate              7.10 ms/IO          4.5
    > Responsiveness: Grouped IOs                  10.68 units          7.1
    > Responsiveness: Long IOs                     8.75 units          7.5
    > Responsiveness: Overall                      93.47 units          6.8
    > Responsiveness: PenaltyFactor                0.0
    > Disk  Sequential 64.0 Write                  99.21 MB/s          6.5
    > Average Read Time with Sequential Writes     8.669 ms          4.8
    > Latency: 95th Percentile                     15.375 ms          4.9
    > Latency: Maximum                             24.337 ms          7.9
    > Average Read Time with Random Writes         8.352 ms          4.9
    > Total Run Time 00:02:48.75
    Wishing everyone a Merry Christmas, Happy Holidays and All the Best in 2010!

    Cheers!