Re: Re:What's the longest time before Windows flushes data to disk?



"MB" <bla@xxxxxxx> wrote in message
news:e5xiUhAZGHA.3848@xxxxxxxxxxxxxxxxxxxxxxx

[...]

If some application continuously reads the hard disk, how is writing to
disk prioritised when another application that is writing is not asking
for any special treatment, e.g. it is not making it's files "write
through" nor flushing the cache. As long as there is enough memory, does
reading from disk always take precedence?

Roughly, there are three different processes.

1. Lazy writer. It is a thread that periodically flushes parts of the cache.
I do not remember the frequency.

2. Balance set manager. It is a thread that tries to balance the utilisation
of RAM between the cache and individual processes. As far as the cache is
concerned, the balance set manager will periodically try to shrink it,
purging or flushing some pages. Same remark about frequency.

3. Replacement strategy. When there is a need to cache a page but no more
free pages are available to the cache, some pages will be purged or flushed.

The first two are regular threads and their schedules may fluctuate wildly.
In extreme cases, when the system is used to run a real-time application
with 100% CPU utilisation, they may never run. If the cache is used lightly,
then the third case will also never apply, so a file may never be flushed.

If an application continuously reads the hard disk, different files all the
time, then the cache will eventually fill up and the cache manager will have
to free up some pages. Whether it will flush dirty pages or purge unmodified
pages is hard to tell, it will apply some heuristic.

Finally, you should understand that all this stuff has never been
systematically documented by Microsoft and a lot of it is subject to
incessant tweaking and tuning by the OS team.

S


.



Relevant Pages

  • Re: Caching control
    ... |> | invalidate/unmap them in order to discard the data from memory. ... |> writing out to disk. ... | easy to discard as clean disk cache. ... stating that a specific amount of RAM can be used only for I/O ...
    (comp.os.linux.development.system)
  • PROBLEM: sata_sil24 lockups under heavy i/o
    ... a total of 4) and started heavy i/o (extending a software raid5 device) ... system recovers the disk transfer speed is reduced from UDMA/100 to ... Cache Line Size: 32 bytes ... parport_pc: Current parallel port base: 0x378 ...
    (Linux-Kernel)
  • Re: Scheduler: Process priority fed back to parent?
    ... Mac OS X has a special cache ... on disk of things that get loaded on boot. ... >>initial priority is a guess, and isn't set until the priority info has ... This prefetch activity could be turned on/off ...
    (Linux-Kernel)
  • Re: Pull request for FS-Cache, including NFS patches
    ... Would a disk cache on SSD make any sense? ... including NFS patches ... Allow you to reduce the latency of slow network links by diverting ...
    (Linux-Kernel)
  • Re: 2 questions: IWP, and indexing
    ... using GTRR script steps in the web interface. ... I have a portal on the student layout that shows enrollment ... "Flush Cache to Disk performs an immediate flush of the FileMaker Pro ...
    (comp.databases.filemaker)