Re: High Avg. Disk Queue Length - Memory Mapped File
- From: "Pavel Lebedinsky [MSFT]" <pavel@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 6 Sep 2006 00:31:58 -0700
So you're using a memory mapped file as an in-memory
circular buffer. In this case you don't want any disk writes
at all. Ideally everything should fit in memory but the
problem is that even though 2 GB of RAM should be
enough to hold the entire 500 MB file in memory, the
constant mapping and unmapping causes disk writes
which you want to avoid.
Can you map the entire file (in the process that writes
to it) instead of mapping small chunks at a time? You
should be able to get 500 MB of contiguous virtual
address space even on 32 bit.
P.S. The reason why the system is much slower when the
file is on the system partition is because page faults and
other disk activity generated by the OS have to compete
with the modified writer IOs. If the file is on a separate
physical disk both of these processes can happen in parallel.
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
<gsudeesh@xxxxxxxxx> wrote:
Hi Pavel,
I am very thankful for the first answer. I am not aware of this. I
think I am experiencing the above said problem.
I will explain my design again. I have an hardware that transfers
data to a non paged pool. The data is transferred as series of frames.
I shall decide the size of frame and set it to the hardware. The
hardware has a control register for starting and stopping the transfer
of data. When I start the data transfer, hardware transfers the data to
the non paged pool frame by frame. After transferring a frame, the
hardware generates an interrupt. When my application gets the
interrupt, it copies the data from the non-paged pool to a memory
mapped file, the file located in location C:\Temp. This goes on till
stop is set to the hardware.
Besides my application, there are other applications that need the
data from the hardware to do some proccessing. Hence we are using the
memory mapped file for sharing data instead of virtual Alloc.The
applications that need the data shall read from meory mapped file. To
allow all applications to read the data in a unique way, we have
created a library that shall manage the memory mapped file. Using this
library my application shall write to the file and other applications
shall read from the file.
Since the operations take place in real time, wrapping does not have
any significance to other applications and also wrapping is managed by
the library.
The library maps and unmaps the file by 48MB. Hence there shall
11Mapping and Unmapping shall occur to fill the entire file.
I hope I am more clear to You.
Also, I observed one interesting fact. I tested the application on
two machines. One with Serial ATA Hard disk and another with Parallel
ATA Hard disk. In the machine withe Serial ATA Hard disk, the average
disk queue length is mostly 0. But at some durations, it goes high and
comes back to zero after a little time. The system response is fine. In
the case of Parallel ATA Hard disk, the average disk queu length is not
zero it is around .2028( In performance monitor at a scale 100, it is
at 20). After some time, it goes high and comes back to zero after some
time, which is greater than Serial ATA. Do you find anything
interesting here?
Also in the Parallel ATA Hard disk there are two Hard disks. With
Logical Drive C, D and E on one physical disk and F on second hard
disk. When I put my files on F drive(F:\Temp), the average disk queue
length is high. But the system response is fine and ok. This is not
the case, when I put the files in C:\Temp. At this time the average
disk queue length is high and system response is very slow. Infact it
is very difficult to work.
What can be the reason?
.
- Follow-Ups:
- Re: High Avg. Disk Queue Length - Memory Mapped File
- From: anton bassov
- Re: High Avg. Disk Queue Length - Memory Mapped File
- References:
- Re: High Avg. Disk Queue Length - Memory Mapped File
- From: gsudeesh
- Re: High Avg. Disk Queue Length - Memory Mapped File
- From: Pavel Lebedinsky [MSFT]
- Re: High Avg. Disk Queue Length - Memory Mapped File
- From: gsudeesh
- Re: High Avg. Disk Queue Length - Memory Mapped File
- Prev by Date: Re: High Avg. Disk Queue Length - Memory Mapped File
- Next by Date: getting the order of network connections
- Previous by thread: Re: High Avg. Disk Queue Length - Memory Mapped File
- Next by thread: Re: High Avg. Disk Queue Length - Memory Mapped File
- Index(es):
Relevant Pages
|
Loading