Re: Performance problem on shared memory over 2GB on XP x64
- From: Yusuke Inoue <YusukeInoue@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 May 2007 07:45:00 -0700
Thank you for your answer. That's exactly what I want to know.
I didn't run kernrate.exe because I couldn't find it for x64, but I think
you are right. When I tested the code on Vista, it ran with no problems.
Finally, I understood that we can't create process using shared memory over
2GB on XP x64 SP2 or Ws03 x64 SP2 for our perpose because we can't use large
pages for its problems.
Do you have some patches for this issue already or will you provides the
patch?
Or there is no way to avoid this problem?
"Pavel Lebedinsky [MSFT]" wrote:
Somehow I missed this reply when you first sent it..
I think I saw this issue before. If you run kernrate.exe you'll probably
see most of the time is spent in MiInsertWsleHash or something similar.
Some improvements were made in Ws03 SP2 but it sounds like you
already have it.
The code has been completely changed post-WS03 and I believe
your test shoud work much faster on Vista/Longhorn.
For WS03 I'm not sure if anything can be done to improve
performance of the second memset. If you have lots of RAM you
might be able to use SEC_LARGE_PAGES to allocate shared
memory. Large pages are not part of working set so they should
not have this problem, but because of fragmentation it's very
difficult to obtain them except right after boot, and a failure to
allocate a large page can stress the system so much it can
become unresponsive for a short period of time (this is also
fixed in Vista).
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Yusuke Inoue" wrote:
I can smoothly read and write over 6GB memory allocated by MapViewOfFile()
in just one process.
I measured time of each Win32API function with performance counter. The
result is below. Memset() is very slow.
It seems that this problem occurs if you touch the memory over 2GB with
the
address retrieved by MapViewOfFile() in the second process.
first process:
CreateFileMapping: 10 ms
MapViewOfFile: 0.068 ms
memset: 3350 ms
UnmapViewOfFile: 508 ms
CloseHandle : 350 ms
second process:
OpenFileMapping: 0.026 ms
MapViewOfFile: 0.055 ms
memset: 471 sec = 7min 51sec
UnmapViewOfFile: 591 ms
CloseHandle: 0.005 ms
This problem occurs before calling CloseHandle() and UnmapViewOfFile(), so
no change occurs if I call CloseHandle() before UnmapViewOfFile().
- Follow-Ups:
- Re: Performance problem on shared memory over 2GB on XP x64
- From: Pavel Lebedinsky [MSFT]
- Re: Performance problem on shared memory over 2GB on XP x64
- References:
- Performance problem on shared memory over 2GB on XP x64
- From: Yusuke Inoue
- Re: Performance problem on shared memory over 2GB on XP x64
- From: Pavel Lebedinsky [MSFT]
- Re: Performance problem on shared memory over 2GB on XP x64
- From: Yusuke Inoue
- Re: Performance problem on shared memory over 2GB on XP x64
- From: Pavel Lebedinsky [MSFT]
- Performance problem on shared memory over 2GB on XP x64
- Prev by Date: Re: Unable to add USB printer through command line
- Next by Date: Re: Serial COM port communication problems
- Previous by thread: Re: Performance problem on shared memory over 2GB on XP x64
- Next by thread: Re: Performance problem on shared memory over 2GB on XP x64
- Index(es):
Relevant Pages
|
Loading