Solved

How to disable NETWORK delayed writes in Windows XP ?

Posted on 2004-09-11
8
896 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
8 Comments
 
LVL 41

Expert Comment

by:stevenlewis
ID: 12038375
0
 

Author Comment

by:dlwynne
ID: 12038658
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
ID: 12040683
Have you applied SP2 to the workstations (at least to a test machine) to see if it alleviates the issue
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

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

Dennis
0
 

Author Comment

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

Dennis
0
 

Author Comment

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

Dennis
0
 

Accepted Solution

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

modulo
Community Support Moderator
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

732 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