Re: Performance problem with UnmapViewOfFile() in Vista and XP x64



Generally, inactive pages backed by regular files are
flushed even sooner than pagefile backed pages
(because they are assumed to contain persistent data
that needs to be preserved in the event of power failure).
Pagefile backed pages are flushed only to free up memory.

As far as I can tell, FILE_ATTRIBUTE_TEMPORARY
affects only writes through the cache manager, so it
shouldn't make any difference in this scenario. (Even if it
did, the temporary attribute is not a guarantee that no
data will be written to disk - the memory manager can
still write it out to obtain more free pages, just like it does
for pagefile backed pages).

--
This posting is provided "AS IS" with no warranties, and confers no
rights.

"chaboud" wrote:

It turns out that this is a larger problem than I previously thought.

CreateFile() with the FILE_ATTRIBUTE_TEMPORARY and
FILE_FLAG_DELETE_ON_CLOSE
flags should make what Larry Osterman called a "temporary" temporary file,
a
file that is never written to disk.

http://blogs.msdn.com/larryosterman/archive/2004/04/19/116084.aspx

You can find a new version of the earlier code that makes use of a file
made
this way here:
http://matthew.chaboud.com/junkdump/Temporary%20Temporary%20Hit.cpp

To accentuate the problem, crank the buffer count up to something like 30.
It still shows up for me with a buffer count of 5 (total file size of 50MB
because of lazy doubling) on a machine with 4GB of RAM and only Visual
Studio, Firefox, and Outlook running (i.e. very little memory pressure).


.



Relevant Pages

  • Re: Discovering variable types...
    ... >memory it points to is on the heap. ... sequentially reading data, if one is randomly reading records, then a ... >project is what's prompting me to improve disk access. ... from a memory buffer I can do it in about a second. ...
    (comp.lang.pascal.delphi.misc)
  • Re: High-performance IO
    ... In my previous post I answered some of your questions, but somehow ... update the position of the head, i.e. you have to search the disk all ... buffer exceeds the amount of memory that is available to your process - ... you will make sure that your buffer is always resident in RAM. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: is there a user mode way to flush disk cache
    ... > arrived on the disk. ... Cache contains data that is already present on ... For that you have the bdflush controls on buffer ... I suspect there is a text on memory tuning in the ...
    (comp.os.linux.development.system)
  • Re: Out of memory
    ... It flushes the buffer and write data directly.. ... I call the close method and It failed with out of memory. ... it will write the data to disk. ... I am thinking of compressing ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Time difference between MCE and a normal TV
    ... you are always playing from the "time shift buffer" which is on disk ... when watching Live TV however if the OS has not yet reused the memory space ... >> I have my MCE pc in a room next to the living room where my wife watches ...
    (microsoft.public.windows.mediacenter)

Loading