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



I tried this with the LH Feb '07 CTP, and that did not correct the problem.
If this is roughly the state that the kernel will be in for Vista SP1, we'll
have to find a workaround, feature limitation for Vista, or, at the very
least, warn our users about the issue.

In the context in which we use this technique (an HD video editor) we can
see a significant performance loss, from 20fps playback in XP 32 to 5fps in
Vista 32 on the same hardware. Because of virtual-address-space size-limits
and fragmentation, it is not possible to avoid unmapping without severely
limiting the amount of usable memory for these buffers. Limiting this cache
size would lead to a performance/usability limitation, so any such change
would have to be restricted to Vista.

We'd very much like to find a clean resolution to this if at all possible.

Thanks again for your help,
Matt

"Pavel Lebedinsky [MSFT]" wrote:

There have been some changes in Longhorn Server and Vista SP1
to reduce flushing of modified pages in cases such as the one you
describe. If you have access to LH beta builds you can try the
latest (February 2007) CTP available from http://connect.microsoft.com
to see if it makes a difference.

I will also try your program here. How much RAM does your system
have?

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

"chaboud" wrote:

I've been working on a performance problem that has shown up in Vista and
XP
x64.

When using CreateFileMapping() and MapViewOfFile() with an
INVALID_FILE_HANDLE to use a pagefile-backed mapping, XP 32 does not write
heavily to the disk to sync the modified pages to the backing store
(pagefile.sys) when UnmapViewOfFile() is called.

If the backing file is an *actual* file (i.e. not the pagefile), the data
is
written back to the file asynchronously, and a disk can get hit pretty
hard
(desired behavior).

In XP x64 and Vista, the system nails the pagefile-disk in the
INVALID_FILE_HANDLE case, which can be a serious performance issue when
moving roughly 256MB of data through file mappings per second. This will
lead to a sluggish system for quite some time after unmaps have ceased.

The following code demonstrates the problem. Run on XP 32, this code will
merely peg a core with near-nothing-work. Run on XP x64 or Vista(32 or
x64),
it will peg a core and a disk.



.



Relevant Pages

  • Re: Performance problem with UnmapViewOfFile() in Vista and XP x64...
    ... There have been some changes in Longhorn Server and Vista SP1 ... If the backing file is an *actual* file (i.e. not the pagefile), ... written back to the file asynchronously, and a disk can get hit pretty ... In XP x64 and Vista, the system nails the pagefile-disk in the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Vista Ultimate Came Pre-Installed on Laptop.
    ... Your laptop came with Vista pre installed. ... bottom of your laptop will work with any x64 Vista disk. ... You could download a copy of Vista x64, burn it to a DVD and install ...
    (microsoft.public.windows.vista.general)
  • Re: Activation question
    ... The x64 installation DVD is a separate disk from the 32-bit version and will ... versions of Vista on it. ... would be one of those "extra work" required to install x64. ...
    (microsoft.public.windows.vista.installation_setup)
  • Re: can i change x32bit vista back to x64
    ... There are Vista DVD's available with both the x86 and x64 version on the ... same disk. ...
    (microsoft.public.windows.vista.general)
  • Re: freakin frustrated
    ... And it also works on x64. ... If you have a 64-bit capable system, I would just wait for Vista. ... Particularly on multiple monitors. ... non-SCSI drives. ...
    (misc.fitness.weights)

Loading