Solved

How to disable NETWORK delayed writes in Windows XP ?

Posted on 2004-09-11
8
888 Views
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.

Thanks,
Dennis
0
Comment
Question by:dlwynne
  • 4
  • 2
8 Comments
 
LVL 41

Expert Comment

by:stevenlewis
Comment Utility
0
 

Author Comment

by:dlwynne
Comment Utility
I had found this Tangent page on my search:

http://www.tangent-systems.com/support/delayedwrite.html

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.

Dennis
0
 
LVL 41

Expert Comment

by:stevenlewis
Comment Utility
Have you applied SP2 to the workstations (at least to a test machine) to see if it alleviates the issue
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:dlwynne
Comment Utility
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 :-)

Dennis
0
 

Author Comment

by:dlwynne
Comment Utility
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.

Dennis
0
 

Author Comment

by:dlwynne
Comment Utility
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 :-(

Dennis
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 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

9 Experts available now in Live!

Get 1:1 Help Now