Re: High Avg. Disk Queue Length - Memory Mapped File



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.

.



Relevant Pages

  • Re: External USB2 HDD affects speed hda
    ... >> Because EHCI hardware continuously watches some memory area to ... and so the EHCI controller will be polling more or less eight ... even if no other USB transfers are active. ... need for DMA most of the time. ...
    (Linux-Kernel)
  • Re: External USB2 HDD affects speed hda
    ... it's based on a mis-understanding of the hardware. ... like a disk or network controller. ... > are transfers, it's got to read them and maybe perform them. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [SLE] Fwd: OpenSUSE 10.0 hangs at boot (from time to time - not always)
    ... you almost got me to start thinking about hardware. ... > I thought it also locked up when you attempted disk to disk large file ... >transfers. ... NFS tried to import the remote filesystems from fstab... ...
    (SuSE)
  • Re: safelt remove hardware icon
    ... >beeping noise to tell me to remove my hardware (I believe ... The point of it is that while you can pull the plug on the hardware ... make sure transfers are shut down first. ... The thing to do is right click in unoccupied taskbar space (and if Lock ...
    (microsoft.public.windowsxp.general)