Share via

Cannot disable write-caching on an USB flash device

Anonymous
2010-01-06T11:09:34+00:00

Hello.

Brief intro:

I have a problem with my Windows 7. It exists since the Windows 7 RC (7100) and it's also on my Windows 7 Home Premium (7600). It also appears to be in both the X86 and X64 version of the system, regardless of the computer I use.

Problem:

Whenever I start writing files onto my USB drive, it starts filling up my RAM and also completely slows down Windows 7 as the harddrive is being read from at its maximum speed. It usually fills about 500-600 MB of my RAM. Until the file is completely written onto the device, the RAM is being occupied. As the file manager I use to copy files with (be it Windows Explorer or Total Commander) reports the copy process is at 99%, the amount of occupied RAM gradually starts to decrease until all of it is written onto the device, at which point the process of copying finally finishes.

I'd rather completely disable the write-caching to this device, as it would not affect the speed of the copy process and it wouldn't prevent me from using Windows 7 since the primary harddrive ( the source of the file I am trying to copy ) would not be strained to its maximum capabilities by having to read the file into the RAM write-cache.

I tried setting the USB drive in my device manager for quick removal, but that does not affect anything at all.

I am a very advanced user, so do not be afraid to assume or suggest registry edits or other things.

Used software

OS: Windows 7 RC x64 / Windows 7 RC 32 / Windows 7 Home Premium x64

File Manager for the copy process: Windows Explorer / Total Commander

Used hardware

As I've stated before - this happens with more computers than just one, but I'll just post the details of my main PC here.

MB: Gigabyte EX58-UD5

CPU: Core i7 920

RAM: Kingston HyperX DDR3 6GB (triple channel)

GFX: nVidia GTX295

HDD: Samsung Spinpoint F1, 1TB, Sata II, 32MB Cache (Running in AHCI mode)

USB Flash : Patriot XT 32GB, Filesystem NTFS. Write speed ~9-10MB/s, Read speed 27-31MB/s.

Any help or thoughts on this matter are greatly appreciated.

Thanks.

Windows for home | Previous Windows versions | Windows update

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2010-01-07T13:55:47+00:00

    Hi,

    From what I know is, that NTFS flash devices have always cache enabled. You can't turn it off.

    You can try a workaround.

    Download the tool NtCacheSetter ( http://www.uwe-sieber.de/files/ntcacheset.zip ), extract it and run the following commands from an elevated command prompt:

    SetSystemFileCacheSize off 128

    This limits the FileCache to 128MB, so it can't grow up untill your RAM is out.

    Now start the copy process again. Does it help?

    André


    "A programmer is just a tool which converts caffeine into code" CLIP- Stellvertreter http://www.winvistaside.de/

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-01-07T09:14:07+00:00

    Tee-hee-heh, it seems I was misunderstood.

    My problem lies in the fact that Windows 7 seems to disregard the removal policy settings completely. Regardless of whether it's set to Quick Removal or Better Performance. Whenever I try to copy a large file, the result is always the same, regardless of what kind of setting is currently active for the USB stick. And by "the result", I mean the fact that the source file takes up to 700MB in my RAM memory, severely impairing the overall performance.

    Is there a way to force Windows to completely disable write-caching for my USB device, other than the removal policy, which does not seem to affect anything?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-10-25T22:20:14+00:00

    Formatting the drive with the exFAT filesystem is not an option for me (I intend to use the drive on a device that doesn't support exFAT but does support NTFS).

    Is there still no solution or workaround for this? :(

    Thank you!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-01-07T16:57:51+00:00

    Ah, I see. I was not afare of this fact.

    While the utility I used did nothing at all, I did format the 32GB flash drive in exFAT. I do not intend to use it anywhere else but Windows 7-running computers, so the limited compatibility is not an issue.

    Formatting the drive with the exFAT filesystem did the trick, it is now no longer using any cache and instead writes to the drive at its nominal speed.

    Thank you for your help.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-01-07T05:08:47+00:00

    Hi Vulpix,

    Welcome to Microsoft Answers!

    Write caching in a connected storage device refers to the use of high-speed volatile memory to collect write commands sent to data storage devices and cache them until the slower storage media (either physical hard disks or low cost flash memory) can accommodate them. Most devices that use write caching require that power be supplied continuously.

    If high data transfer performance is your main concern, you should enable both of these settings in OPTION TWO below:

    1. In the Removal Policy section, select the Better Performance option.
    2. In the Write-caching policy section, select Enable write caching on the device (if the system hardware and storage device support these features).
    3. Disable Write Caching for Quick Removal

    This option is usually the best choice for storage devices that you are likely to remove from the system frequently, such as USB flash drives, SD, MMC, Compact Flash, or similar memory cards, and other similar externally attached storage devices. 

    When you select the Quick Removal option, Windows 7 manages commands sent to the device using a method called write-through caching. In write-through caching, the device operates on write commands as if there were no cache. The cache may still provide a small performance benefit, but the emphasis is on treating the data as safely as possible by getting the commands to the storage device. The main benefit is that you can remove the storage device from the system quickly without risking data loss. For example, if a flash drive were to be accidentally pulled out of its port, the data being written to it is much less likely to be lost.

    1. Open the Control Panel (All Items view), and click on the Device Manager icon.
    2. In Device Manger, double click on Disk drives to expand it, then double click on the listed storage device that you want to disable write caching for.
    3. Click on the Polices tab. Under the upper Removal policy section, select (dot) Quick removal and click on OK.
    4. Click on Yes to restart the computer to apply.

    WARNING: This will restart the computer immediately. You should save and close anything else that you are working on first.

    You may also use the Ready Boost feature of Windows 7 Operating system.

    http://windows.microsoft.com/en-US/windows7/products/features/readyboost

    You may follow the steps mentioned in this link and turn on the Ready Boost.

    http://windows.microsoft.com/en-us/windows7/Turn-ReadyBoost-on-or-off-for-a-storage-device

    Also refer the following link for further assistance.

    http://windows.microsoft.com/en-us/windows7/Using-memory-in-your-storage-device-to-speed-up-your-computer

    Regards,

    Divya R – Microsoft Support.

    Visit our Microsoft Answers Feedback Forum and let us know what you think.

    Was this answer helpful?

    0 comments No comments