USB hard drive write cache: flushed after how many seconds? Ever?

  • Thread starter Thread starter Thomas G. Marshall
  • Start date Start date
T

Thomas G. Marshall

I've asked this question in m.p.windowsxp.general and no one seemed
quite sure.

When there is write caching enabled on a USB hard drive (the default I
think), will the write cache ever timeout and autoflush to the drive?

I'd really be surprised if the cache hangs around forever. Seems to
violate the law of least surprise. Having written a few device
drivers myself (unix) I can remember very very few cases where that
was the "proper" design: the timeout for write behind is often longer
when the device truly needs data in chunks of a certain amount. I
believe the old SCSI-QIC tape drives were the case.
 
AS in a "page-file",the hd needs to be set for one in system
properties/advan-
ced/change page-file button.Set to "let system manage" click set 2X,exit
properties.To "flush" the page-file,one can set for this in regedit,xp
clears the
file at every restart or shutdown,or,one can re-set it in system properties
to
no page file,restart pc,defrag it in xp,reset it in system properties,once
thru,
you'll see a "re new page-file ?" for the hd..Also,thier is a IE utility
that clears
IE cache,its:Clear Cache Feature in Internet Explorer
 
  AS in a "page-file",the hd needs to be set for one in system
properties/advan-
 ced/change page-file button.Set to "let system manage" click set 2X,exit
 properties.To "flush" the page-file,one can set for this in regedit,xp
clears the
 file at every restart or shutdown,or,one can re-set it in system properties
to
 no page file,restart pc,defrag it in xp,reset it in system properties,once
thru,
 you'll see a "re new page-file ?" for the hd..Also,thier is a IE utility
that clears
 IE cache,its:Clear Cache Feature in Internet Explorer


(?????)
What does any of this have to do with the write cache? I'm not asking
about any page file usage, nor about anything about IE.
 
Thomas G. Marshall said:
I've asked this question in m.p.windowsxp.general and no one seemed
quite sure.

When there is write caching enabled on a USB hard drive (the default I
think), will the write cache ever timeout and autoflush to the drive?

I'd really be surprised if the cache hangs around forever. Seems to
violate the law of least surprise. Having written a few device
drivers myself (unix) I can remember very very few cases where that
was the "proper" design: the timeout for write behind is often longer
when the device truly needs data in chunks of a certain amount. I
believe the old SCSI-QIC tape drives were the case.

Yes: the cache is flushed after a period of time. I don't actually know
what that time is but 30 seconds appears to be a safe value. The default
option should be no write cacheing.

I can recall using operating systems where there was no automatic cache
flush and no ability to disable write cacheing. The problems that caused
when users forgot to force a cache flush before ejecting their (8 inch)
floppy disk.
 
Yes: thecacheis flushed after a period of time.  I don't actually know
what that time is but 30 seconds appears to be a safe value.  The default
option should be nowritecacheing.

I can recall using operating systems where there was no automaticcache
flush and no ability to disablewritecacheing.  The problems that caused
when users forgot to force acacheflush before ejecting their (8 inch)
floppy disk.

Hmmmm.....

Well, a couple of data:

1. The write caching that I've always seen for USB *hard drives* is
caching *on* by default. XP seems to make a distincting for what kind
of USB device it is.

2. The write had gone quiet for 45 mintutes to an hour and then I got
the error when pulling the plug.

WinXP Pro SP3.

Any ideas?

Thomas
 
message





Yes: thecacheis flushed after a period of time. I don't actually know
what that time is but 30 seconds appears to be a safe value. The default
option should be nowritecacheing.

I can recall using operating systems where there was no automaticcache
flush and no ability to disablewritecacheing. The problems that caused
when users forgot to force acacheflush before ejecting their (8 inch)
floppy disk.

Hmmmm.....

Well, a couple of data:

1. The write caching that I've always seen for USB *hard drives* is
caching *on* by default. XP seems to make a distincting for what kind
of USB device it is.

2. The write had gone quiet for 45 mintutes to an hour and then I got
the error when pulling the plug.

--------------

Windows XP turns cacheing on by default for fixed drives but off for
removeable. Having said that, I aware that some OEM suppliers alter this
behaviour for some reason.

If the removeable drive is cached then a warning error about removing the
drive is always produced if you disconnect it without stopping it via
'safely remove hardware' first regardless of whether the cache has self
flushed or not. You don't state what the message that you are getting is.
 
Hmmmm.....

Well, a couple of data:

1. Thewritecaching that I've always seen forUSB*hard drives* is
caching *on* by default.  XP seems to make a distincting for what kind
ofUSBdevice it is.

2. Thewritehad gone quiet for 45 mintutes to an hour and then I got
the error when pulling the plug.

--------------

Windows XP turns cacheing on by default for fixed drives but off for
removeable.  Having said that, I aware that some OEM suppliers alter this
behaviour for some reason.

If the removeable drive is cached then a warning error about removing the
drive is always produced if you disconnect it without stopping it via
'safely remove hardware' first regardless of whether thecachehas self
flushed or not.  You don't state what the message that you are getting is.

"cache write delay failure. End of the world, you're a bonehead,
you've lost your data, you should die." Or words to that effect.
 
message



Hmmmm.....

Well, a couple of data:

1. Thewritecaching that I've always seen forUSB*hard drives* is
caching *on* by default. XP seems to make a distincting for what kind
ofUSBdevice it is.

2. Thewritehad gone quiet for 45 mintutes to an hour and then I got
the error when pulling the plug.

--------------

Windows XP turns cacheing on by default for fixed drives but off for
removeable. Having said that, I aware that some OEM suppliers alter this
behaviour for some reason.

If the removeable drive is cached then a warning error about removing the
drive is always produced if you disconnect it without stopping it via
'safely remove hardware' first regardless of whether thecachehas self
flushed or not. You don't state what the message that you are getting is.

"cache write delay failure. End of the world, you're a bonehead,
you've lost your data, you should die." Or words to that effect.
 
"cache write delay failure.  End of the world, you're a bonehead,
you've lost your data, you should die."  Or words to that effect.

----------

I can appreciate the frustration.  Other than changing the device to no
write cacheing (or "Optimise for fast removal" as XP actually describes it),
I can see no other solution at this time.

Yeah. :-/ I would at least like to know the official stance on write-
behind timout flushing. 30 seconds would seem appropriate given the
speed and nature of the device (actually, 2 seconds makes a tad more
sense for HD's) but it sounds like you agree that /forever/ is a silly
amount of time for data to remain in cache.

Crimeny. :)
 
message




"cache write delay failure. End of the world, you're a bonehead,
you've lost your data, you should die." Or words to that effect.

----------

I can appreciate the frustration. Other than changing the device to no
write cacheing (or "Optimise for fast removal" as XP actually describes
it),
I can see no other solution at this time.

Yeah. :-/ I would at least like to know the official stance on write-
behind timout flushing. 30 seconds would seem appropriate given the
speed and nature of the device (actually, 2 seconds makes a tad more
sense for HD's) but it sounds like you agree that /forever/ is a silly
amount of time for data to remain in cache.
 
Thomas said:
Hmmmm.....

Well, a couple of data:

1. The write caching that I've always seen for USB *hard drives* is
caching *on* by default. XP seems to make a distincting for what kind
of USB device it is.

Surprisingly it's by file system. NTFS drives always have a
write cache. The removal policies 'Optimize for speed' and
'Optimize for quick removal' have no effect on the cache's
behaviour in most cases. Only FAT/FAT32 formatted USB harddrives
are affected.

The flush timeouts are not documented, so, safe removal is the
right choice...


Uwe
 
Surprisingly it's by file system. NTFS drives always have a
write cache. The removal policies 'Optimize for speed' and
'Optimize for quick removal' have no effect on the cache's
behaviour in most cases. Only FAT/FAT32 formatted USB harddrives
are affected.

The flush timeouts are not documented, so, safe removal is the
right choice...

Uwe

That would be the first time in my life I've ever heard of such a
thing. What on earth does the filesystem have to do with whether or
not something is cached? That's on the tail end of the transaction.

In fact if I were to guess at such a thing (if anything) it should be
the reverse: NTFS has far fewer corruption concerns with partial
writes of data.
 
That would be the first time in my life I've ever heard of such a
thing.  What on earth does the filesystem have to do with whether or
not something is cached?  That's on the tail end of the transaction.

In fact if I were to guess at such a thing (if anything) it should be
the reverse: NTFS has far fewer corruption concerns with partial
writes of data.

Errrrrr..........strike that last statement, it was an A ergo A
statement. Bit too much caffeine today.... :) First sentence stands.
 
Back
Top