Solved

Disable Read/Write Disk Caching

Posted on 1998-09-08
4
5,727 Views
Last Modified: 2013-12-14
How do I disable Read/Write Disk Caching.  I get long pauses when writing large files to disk and it is causing problems.

Thanks,

Karsten Wilson
karsten@behsoftware.com
0
Comment
Question by:sungar
  • 2
4 Comments
 

Expert Comment

by:vacu
ID: 1770848
In NT, you can't change the size of Disk Cache, never to say close it. NT resize the cache according the size of virtual memory automaticaly. Obviously, your problem is no cuased by Cache. You can check your disk performance by Performace Monitor in administrator tools. maybe you should more information about your problem, such as how large you files, capacity of your harddisk, which file system, NTFS or FAT32, how you partition you disk.
0
 

Author Comment

by:sungar
ID: 1770849
I am using visual basic to read/write large (100mb files).  On Windows 95, I get continuous writes, but in NT4, it writes to a memory buffer really fast, then has a huge pause while it gets that data ready to write and then write.  Overall, this method is much slower the Win95 on the same PC setup.  If I could get NT to write continuously without buffering first, I think the performance should be similar.  Any idea how to accomplish this?
0
 
LVL 5

Accepted Solution

by:
carmine earned 20 total points
ID: 1770850
You can disable the rdr caching using the following registry keys:
HKLM\System\CurrentControlSet\Services\rdr\Parameters\
Add or edit the value UseWriteBehind  (REG_DWORD)
0 - Write back caching is not enabled.
1 - Write back caching is enabled, only if UtilizeNTCaching is set to 1.

Edit: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanworkstation\parameters

and edit or Add Value name of UtilizeNTCaching with type REG_DWORD.

0 - Data is written directly to the redirector, bypassing the cache.
1 - Lazy write (default) - Data is written to the cache and subsequently flushed to the Redirector.

Setting this value to 0 will insure that the file data is written to the server immediately.

Consider setting UseWriteBehind to a 1 and UtilizeNTCaching to a 1 first. If this doesn't solve your problem, edit or Add Value name of UseAsyncWriteBehind of type REG_DWORD and setting it to 0 to disable the asynchronous variant of write-behind caching. The default, 1, is to use asynchronous write-behind caching. UseAsyncWriteBehind only works when UseWriteBehind and UtilizeNTCaching are set to 1.

Lastly, if you still have a problem, set UtilizeNTCaching to a 0.

You will need to reboot.

NOTE: Write-behind (write-back) caching is an optimizing technique that does not wait for the lazy writer feature of the Cache Manager to flush it to the Redirector. Write-behind caching makes data available to the Redirector sooner, although it increases disk I/O slightly.

0
 

Author Comment

by:sungar
ID: 1770851
Thanks,

Awesome info!

Karsten
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now