Re: Performance problem with UnmapViewOfFile() in Vista and XP x64
- From: "Pavel Lebedinsky [MSFT]" <pavel@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Mar 2007 06:24:05 -0700
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).
.
- Prev by Date: Re: Performance problem with UnmapViewOfFile() in Vista and XP x64
- Next by Date: Re: Shared memory and IOCP
- Previous by thread: Re: Performance problem with UnmapViewOfFile() in Vista and XP x64
- Next by thread: Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- Index(es):
Relevant Pages
|
Loading