Software disk write cache to combat SSD freezes

Discussion in 'Windows' started by sebbbi, Aug 10, 2008.

  1. sebbbi

    sebbbi

    Joined:
    Aug 6, 2008
    Messages:
    2
    Likes Received:
    0
    I installed XP to my Aspire One one week ago. I followed up all the tips in the "Steps to a happy XP experience", but still my XP was freezing a lot whenever the SSD was accessed. The tips improved the situation nicely, but only because they were actually lowering the SSD usage, not because they were fixing the actual problem.

    Fortunately I had a similar problem on my work high end Dell workstation RAID controller (it was freezing also frequently), so I suspected the issue was caused by lack of proper disk write cache or over conservative write cache locking (the RAID was configured to be very conservative). Without a write cache, whenever a process writes to the drive, all queued reads must be first executed and then the whole disk is locked until the write finishes. This causes the thread writing the data to stall and all other threads that read the disk while the write operation is waiting or executing to also stall. This explains why the application freezes for a short time period whenever the disk is written to.

    When I first installed Windows XP, I used a optimized tiny XP image without ACPI Multiprocessor PC support (it was optimized for Eee PC), and only one logical CPU core was usable (hyperthreading CPUs have 2 logical cores). Because of this the SSD freezing problem was much more visible, as the whole system froze instead of just the active application. After that I installed XP again from my original SP2 CD. With HT properly enabled (2 logical cores), only one of the cores freeze (wait for the write lock) and the another one is still available (unless it's also accessing the SSD). This makes the system feel a lot more smoother.

    XP doesn't write that much data to the SSD, but it does a lot of small writes. If the writes would be properly cached for a long enough time period (large enough cache), the built in SSD write speed would be enough for completely smooth performance on normal XP use. The driver could flush the cache on background to the SSD without stalling the system at all (cache thread is only active on very short times between the cache flushes and the thread is inactive during the IO operations and consumes no CPU resources).

    I was thinking about writing a cache driver to the hard drive, but then I realized that someone must have done that before, as many high end data servers are frequently using techniques like that (using very large system memory caches for the disk access).

    The best I could find was SuperCache by SuperSpeed corporation. They are mostly doing server solutions for big corporations, and are Microsoft gold certified partners and IBM server proven partners among others. SuperCache is mainly designed for read caching for databases, but it has also (optional) write caching feature, called "deferred-write mode". In deferred write mode all the write requests are cached and written by "lazy-write mechanism" during a longer time period (preventing any lockups).

    I installed SuperCache III to my Aspire One, configured it to use 512 MB of memory as disk cache and enabled the write cache (deferred write mode). I have 1 GB of extra memory installed (total 1.5 GB), so 1 GB was left to the Windows XP. Now the system feels much more smoother and most of the freezes are completely gone. The software was very easy to install and configure, and doesn't need any extra steps, such as partitioning your hard drive or changing your settings whenever you want to install new sotfware. You can use the computer like normal, and the SuperCache is completely invisible. The only negative thing you notice is that the shut down time is slightly longer, as the SuperCache needs to dump unwritten part of the 512 MB cache to the disk on shut down. And if you want to buy a license, it's 130$. With around the same money you can also buy a CF->ZIF adapter + 8GB 300x/350x CF card or a 18" 100/120 GB ZIF hard drive. Installing a hard drive or CF to the computer is not any harder as the memory upgrade, and you really need to have the memory upgrade for SuperCache as well. But it's still a good thing to try, and worked well for me.

    SuperCache web site: http://www.superspeed.com/desktop/supercache.php

    Anyone of you have found different (or more suitable) software for HD/SSD write cache? SuperCache III seems to be focused for read caching, and it seems that the AOne SSD has no problem is disk reading. What I would really like to have is a simple write cache (just queue write commands, and if a overlapping read command is made combine the write memory buffer data to the data read from disk). This way the write cache would not even have to be that large, and could even be used on the 512 MB models.
     
    sebbbi, Aug 10, 2008
    #1
  2. sebbbi

    iDq

    Joined:
    Aug 2, 2008
    Messages:
    33
    Likes Received:
    0
    Location:
    Spain
    Well, you can use either EWF or FBWF as a "disk cache". It's free ;)

    I've made some research about the "ultra-speed" of the A1 and I've found that during Windows logon near of the 70% is due to registry activity.
     
    iDq, Aug 10, 2008
    #2
  3. sebbbi

    Guest Guest

    it's good to hear an argument in favour of the idea that the A1 is slow because of a lack of proper drivers, instead of the theory that the SSDs are simply crap! at least it gives us hope that it's not a long-term problem...and that hopefully acer will be able to produce a driver for the SSD to fix the performance issues.

    the FBWF and EWF fixes are handy to have, but TBH we shouldn't have to go to those lengths to get decent performance out of the A1. i bought the A1 under the assumption that xp would run fine, solely because i haven't come across a computer in the last 5 - 6 years that couldn't run xp well. the fact that the aspire struggles by default was rather disturbing to me..
     
    Guest, Aug 10, 2008
    #3
  4. sebbbi

    sebbbi

    Joined:
    Aug 6, 2008
    Messages:
    2
    Likes Received:
    0
    XP doesn't write that much data to the disk on standard use (when page file is disabled), but the accesses are pretty random and numerous. Even a slow SSD should handle the average bandwidth requirements just fine, and all SSDs have very good access times (compared to hard drives) and basically no seek times at all. Even if the SSD is a very slow model (AOne SSD really is), I see no problem to make the SSD work fast enough on XP with good drivers (with proper data buffering and caching).

    I am waiting to get my 350x CF card and a 1.8" CF->ZIF adapter to do some extra testing. Anyone tried to install a 16GB or 32GB CF card to the device with a ZIF adapter?
     
    sebbbi, Aug 10, 2008
    #4
  5. sebbbi

    techie

    Joined:
    Jul 10, 2008
    Messages:
    55
    Likes Received:
    0
    Seems this issues is going to be fixed in Vista and OSX and possibly XP to differentiate an SSD from a traditional hard drive. In the meantime perhaps CachemanXP might mitigate some of your cache issues.
     
    techie, Aug 10, 2008
    #5
  6. sebbbi

    Guest Guest

    Guest, Aug 10, 2008
    #6
  7. sebbbi

    jeromlenz

    Joined:
    Jul 17, 2008
    Messages:
    82
    Likes Received:
    0
    Any similar solution or software for Linux?
    (Even if the disk 'write' operations are much fewer, but a 1-10MB Cache would indeed help.)

    Same (worst even) problem with the Asus eee 900 16G and slow Phison(Asus) SSD.

    Conclusion: the SSD technology is not ready for prime time and good old HDD still rulez' ! :roll:
     
    jeromlenz, Aug 11, 2008
    #7
  8. sebbbi

    MiniM3

    Joined:
    Aug 8, 2008
    Messages:
    22
    Likes Received:
    0
    How are you configuring the cache from the memory? I have it and only way to configure cache is off the SSD, can you do up a step by step on how you configured 512MB of your RAM for cache, I would really appreciate it. Thank you.

    Damen
     
    MiniM3, Aug 11, 2008
    #8
  9. sebbbi

    M4cr0s

    Joined:
    Aug 12, 2008
    Messages:
    7
    Likes Received:
    0
    Thanks to OP for this tip!

    I had been thinking of something like this myself but never got around to do any research. It works really well here, running an nLited XP SP3 (ISO cut down to 334mb, that with the One's drivers included, clean windows install took about 700mbs, after some serious runs on WinUpdate, installing .net, IE. 7.0, WMP 11 c:\Windows is up to 1.6GB...could be worse I guess) on the Samsung SSD. A 256mb RAM-drive for temp files and an otherwise seriously tweaked XP install. Boot times are about 30-40 seconds now (initally about 25secs before software installs and winupdate). Windows works more or less smoothly and I notice close to none of the previous "wait-I'm-writing" issues. The One is now really a cute little thing and I have the feeling the rest of the hardware gets the chance to perform closer to its potental, not being hanpered all the time by the SSD :)

    What we really need now is a cute litte freeware proggie that can sort out this write cache stuff!
     
    M4cr0s, Aug 12, 2008
    #9
  10. sebbbi

    ronmexico

    Joined:
    Jul 19, 2008
    Messages:
    43
    Likes Received:
    0
    Cachemanxp has a free version but I haven't figured out how to tweak it for the ssd yet.
     
    ronmexico, Aug 12, 2008
    #10
  11. sebbbi

    M4cr0s

    Joined:
    Aug 12, 2008
    Messages:
    7
    Likes Received:
    0
    As far as I know and can see, cacheman is for tweaking the windows page file and how much the OS allocates to certain spesific things such as thumbnail or icon cache. Also, its one of those appz that promises to "free RAM", something thats mostly just mumbo jumbo sales tricks and have always been since way back in the Win 95 days, regardless of marketing ploys. In other words, its got nothing to do with using RAM as disk write/read cache, altho I can understand how the quite tiny difference might be confusing. Besides of that, cacheman definitely gives quick and easy access to a number of deep system-settings and its more or less free so it can be put to some use.
     
    M4cr0s, Aug 12, 2008
    #11
  12. sebbbi

    Nexy

    Joined:
    Aug 21, 2008
    Messages:
    2
    Likes Received:
    0
    Thanks for the info, it's always good when someone thinks ouside the box and draws on real-world experience of dealing with a specialist problem to solve everyone elses more general problems. :D

    What settings would you recommend for Supercache? 4KB Cache Page Size, 512MB Cache Size, MRU Sort Algorithm, 0 Read-ahead and Deferred-write mode one with Lazywrite latency of 15 seconds, which is pretty much default but with Deferred-write on and the cache size ramped up?

    I'm running with 1.5GB RAM (and the Intel SSD :cry:), from the settings above would you suggest I change anything? It's mostly going to be used for surfing and playing media from network shares (wireless + VLC), RDP and possibly a spot of Quake 2.
     
    Nexy, Aug 27, 2008
    #12
  13. sebbbi

    M4cr0s

    Joined:
    Aug 12, 2008
    Messages:
    7
    Likes Received:
    0
    Well, (yes I know I'm not the OP ;p) I've been using supercache consistently for a couple of weeks now. Experimented a lot with different RAM-sizes, but its hard to benchmark the difference. What my gut tells me is that default settings + 512mb RAM works fairly well, with little or no increase in effect by increasing amount of allocated RAM etc. Basically what supercache do is two things, its main feature is just the same as windows vista/later editions of xp prefetching/superfetching feature (preloads programs into memory for faster startup). The more RAM allocated means more programs are preloaded. The MRU and MFU setting just tels if the most frequently used programs should be preloaded, or the most recently used programs.

    Its secondary feature is the "defered write mode" thingy which is what we're after, this is essentially RAM used as hd write cache. So what I've found is that increasing the amount of RAM allocated doesn't seem to help write cache at all above a certain level. Now, I haven't found any info as to how much of the allocated RAM thats actually used by the write cache feature, but its probably just a certain amount, maybe a few tens of mb's at most. Meaning you will experience the slowdown tendencies when it comes to large files regardless (i.e. be patient). In real life usage you are on the other hand spared from like 4 out of 5 of the frequent mini-lockups and the device runs more or less fairly smoothly...as long as you do normal stuff like office/browsing and not very heavy tasks. Program installations and other write-intensive tasks will slow down the device regardless. I havent tried the EWF stuff thats been discussed to lenght on in this forum, but its pretty much the same principle as this supercache programs write cache feature, writing stuff to memory and later dumping it to the harddrive. Its just about when/how.

    The only other setting in this program that might be interesting to play around with is the lazywrite latency, i.e. how long things get kept in the RAM before its written to the drive (at least thats what I'm guessing it means). I've played around with this, namely increasing it from 15 secs to like 30 - 60 without noticing any differnce at all.

    Ok, thats what I had to say. Maybe someone else got more info.
     
    M4cr0s, Aug 27, 2008
    #13
  14. sebbbi

    Nexy

    Joined:
    Aug 21, 2008
    Messages:
    2
    Likes Received:
    0
    Thanks M4cr0s. I'm thinking I may move over to EWF and/or RAID0 with the SDHC, then try mix and match for best performance.
     
    Nexy, Sep 10, 2008
    #14
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.