Re: High Avg. Disk Queue Length - Memory Mapped File
- From: gsudeesh@xxxxxxxxx
- Date: 4 Sep 2006 19:56:26 -0700
The data transferred by hardware is around 500KB. The file size is
500MB. The file mapping and unmapping size is 48 MB. It takes around 30
seconds to fill the file. My program does not stop on reaching the end
of file. It does not stop until explicitly requested. It starts from
the beginning after reaching the end, that is the file is wrapped. I
am creating the file using the following function:
::CreateFile( wsFilePath.c_str(),
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ |
FILE_SHARE_WRITE,
0, // No security attributes
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
0 ); // No template file
If I use FILE_FLAG_NO_BUFFERING, then I have to do any special
mechanism with mapped pointer ?
Sudeesh G.
Pavel Lebedinsky [MSFT] wrote:
Did you mean 500 MB or 500 KB? You said below that
each chunk was 48 MB. How long does it take to go over
the entire 528 MB file? What happens when you reach
the end of the file - does your program stop, or does it
start over at the beginning? If it stops, how long does it
take for the system performance to recover?
What flags do you pass to CreateFile? Does it help if you
add FILE_FLAG_NO_BUFFERING?
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Sudeesh" wrote:
:
I am using Windows XP. The memory mapped file is backed by user page
file located in the directory C:\Temp. The file size is 528Mb. I have
2GB RAM.
Regarding the map and unmap operations, it depends on the size the data
being transferred by the hardware. The size may be in the range of
500KB.
What OS are you using? Is the memory mapped file backed by
pagefile or a user file? How much RAM do you have and how
many unmap operations happen before you notice the problem?
I need a solution for avoiding high Avg. Disk Queue lenght. I am
programming an hardware that transfers raw data to a non-paged pool.
The size of the non-paged pool is 32Mb. My application moves the data
in the non-paged pool to a buffer in real time. The size of the buffer
is 528Mb.
My application cannot map the entire 528Mb. So, I am mapping and
unmapping the buffer at sizes of 48Mb. The problem is that when I run
my application, the machine becomes slow. It does not occur
immediately. It starts to happen after some time. Using the performance
monitor, I checked the reason for this scenario. I found that when the
Avg. Disk Queue Length becomes high, the system becomes slow.
.
- Follow-Ups:
- Re: High Avg. Disk Queue Length - Memory Mapped File
- From: Pavel Lebedinsky [MSFT]
- Re: High Avg. Disk Queue Length - Memory Mapped File
- Prev by Date: Re: Password protect a folder
- Next by Date: Re: Minifilter Memory mapped files
- Previous by thread: Terminating a worker thread
- Next by thread: Re: High Avg. Disk Queue Length - Memory Mapped File
- Index(es):
Relevant Pages
|