How to disable NETWORK delayed writes in Windows XP ?

Posted on 2004-09-11
Last Modified: 2012-08-14
As software developer we have new problems with every OS release from Microsoft :-)

To be sure that the 24/7 apps we develop can recover from ANY problems - network loss, power loss, reboot, lock ups, etc we depend on Windows telling us the "truth". If we write 2k to a file on a network location and the OS says "OK, done" then we have to be sure that it really did the write properly.

So the main thing we do is make sure our customers all turned off delayed network writing. Runs a little be slower, but we can count on the data.

Under NT, you added:

UseWriteBehind REG_DWORD 0 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Rdr\Parameters

As normal for Microsoft, under Win2k they change the way you disable delayed network writes to adding:

UtilizeNTCaching REG_DWORD 0 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanworkstation\Parameters

So in testing apps under XP Pro, it I introduce a network loss on a machine we are writing to (by pulling the network plug) XP  DOES a pop up to tell me data is lost and makes entries in the system event log - but it tells our apps that at least for a while the writes all were OK.  On network reconnection we seek back to our last known good location and continue writing - but we either have garbage or nulls in the file where the OS never wrote (but told us it did).

How do you turn off delayed NETWORK writes under XP ?  The NT and Win2k registry entries do not work. The MS Knowledge base (and here at EE) tell how to turn it off for the local drive - or to change opportunistic locking or disable the security signature. None of that stuff works to disable delayed writing to the network locations like you can under the older OS versions.

Question by:dlwynne
  • 4
  • 2
LVL 41

Expert Comment

ID: 12038375

Author Comment

ID: 12038658
I had found this Tangent page on my search:

and turned off SMB signing in the registry using the key supplied there (and the MS Knowledgebase) and it did not help.

In my case, there really is a network loss - in the Tangent example they are getting errors when the network is fine.

The best part of the page you referenced is this: "The big question for Microsoft is why it imposes delayed writes on server disks at all. An enterprise's priority is to get transactional data committed—without fail. Delayed writes, an old disk-cache trick, are a luxury that should be trumped by reliability. Any transient gain isn't worth your pain."

We agree with this 100% and MS should include a way to disable cached network writes if you prefer accuracy over speed - which we do. In the prior OS versions there had always been a way, and I am hoping there is a way in XP - I just have not found it yet.  It would be a hard sell to our customers to tell them that they have to use NT or Win2k on their workstations if they want 100% accurate date to be written.

If we don't find the answer soon, I guess we will have to pay and open a case with MS. We have done this in the past in order to get acess to hotfixes (and they never refund our money even though the hotfix solves our customer's problem) - that may be the way to pry the information out of them, or get them to admit there is no way to turn off cached network writes.

LVL 41

Expert Comment

ID: 12040683
Have you applied SP2 to the workstations (at least to a test machine) to see if it alleviates the issue
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Author Comment

ID: 12049645
Guess what?

I set up a clean install of Win2k Pro on a test PC - a fresh install with Win2k SP4 + all other updates from MS.  I set the registry entries (as shown in my first message) and IT DOES NOT WORK!

What the heck?  I though back when Win2k came out we tested this to make sure - but I get popup messages on Win2k now for this app. I made sure all the registry entries were properly made and even disabled to signature, but network caching is STILL on.

So now my question is how do I diable network caching in Win2k AND XP ?  

Man, this is so depressing. NT is EOL now and I KNOW it works :-)


Author Comment

ID: 12243643
I never have had a chance to open a trouble ticket with MS, but we did "solve" the problem by using the WinAPI call flushfilebuffers(handle) after every write. We check to make sure this works (returns true) before we move on.

We still might get a pop up message telling us cached writes were lost - but we know in the program now that the write did NOT work so we know when the network is reconnected that we have to go back to the last known good location and rewrite the data.


Author Comment

ID: 13168221
Thanks!  The "answer" that I wanted could not be found - never could find a way get get the OS in this case to not cache the writes. Flushing the file buffers fixed but, but (of course) slows things down :-(


Accepted Solution

modulo earned 0 total points
ID: 13190527
PAQed with points refunded (500)

Community Support Moderator

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Resolve DNS query failed errors for Exchange
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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