"MikkelFJ" <mikkelfj-anti-spam / bigfoot.com> wrote in message news:<3dd6e31a$0$1512$edfadb0f / dread11.news.tele.dk>...
> "MetalOne" <jcb / iteris.com> wrote in message
> news:92c59a2c.0211161530.1c8a8de0 / posting.google.com...
> 
> > Still seek + latency should be around 10ms + 5ms?  Way less than
> > 150ms.
> > Do the Win32 write API's suck?
> 
> Hmm to some extend, not the API, but the NT virtual memory manager can get
> into a bad mood occasionally. Consider a huge data load - you get data from
> disk into memory and back to disk. The from thingy is usually cached in
> memory but sometimes not. In the worst case scenario you are swapping pages
> out exactly before you need them. At the same time you may be dealing with
> disk I/O from source, from virtual memory cache and target file at the same
> time. At the same time IDE disks a blocking CPU operation. Altogether this
> can lead to rather bad performance occasionally.
> 
> If you want to improve performance be sure to load the source date in small
> but sufficiently large buffers. Read a chunk then write a chunk. Total
> memory consumption must be small enough to not stress system memory, but
> large enough to not be seriously affected by seek times. Then get a SCSI
> drive. You can also read and write using memory mapped files but you should
> be aware of the access pattern. Chances are you will get better proformance
> though.
> 
> The RIFF multimedio I/O API for WIN16, WIN32, OS/2 has better I/O buffer
> intelligence that normal file I/O for streaming data (but's fairly old by
> now).
> 
> Mikkel


I am not entirely sure how to interpret your post.
I am only writing to disk, a frame of size 153KB.
I have over 100MB of available physical RAM.
I would presume that the frame buffer is stored in physical RAM and
not virtual ram.  I am not reading anything from disk or pipes or
elsewhere.  At least not in the sample script.

Still, I guess I'll look into trying to lock the buffer in physical
RAM.  I don't know how to do this, but if it is doable I am sure it
won't be hard to figure out.

I'll look into the multimedia I/O library.  I was unaware of this.
This looks like it might be helpful.