[Info-vax] OpenVMS async I/O, fast vs. slow
Craig A. Berry
craigberry at nospam.mac.com
Sat Nov 4 13:06:49 EDT 2023
On 11/4/23 6:11 AM, Johnny Billquist wrote:
> I'm not sure I have ever understood why people think memory mapped files
> would be faster than a QIO under VMS.
I might've missed it but I haven't seen anyone say that. It's that
global sections are faster than mailboxes. The I/O API may be a
consideration but is secondary to the nature of the device.
> With memory mapped I/O, what you essentially get is that I/O transfers
> go directly from/to disk to user memory with a single operation. There
> are no intermediate buffers, no additional copying. Which is what you
> pretty much always have otherwise on Unix systems.
>
> However, a QIO under VMS is already a direct communication between the
> physical memory and the device with no intermediate buffers, additional
> copying or whatever, unless I'm confused (and VMS changed compared to
> RSX here...).
>
> So how would memory mapped I/O be any faster? You basically cannot be
> any faster than one DMA transfer. In fact, with memory mapped I/O, you
> might be also hitting the page fault handling, and a reading in of a
> full page, which might be more than you needed, causing some overhead as
> well.
I doubt that QIO with most device drivers is a simple as you make it out
to be. Last I heard they use Intermediate Request Packets (IRPs) and
other system resources in addition to the buffer space in the user
program. And in any case, QIO is limited to transfer sizes that these
days are considered pretty small.
> Also, what do $IO_PERFORM do, that could possibly make it faster than QIO?
>
> I'm really curious about this topic...
There's a pretty good explanation in the manual:
https://docs.vmssoftware.com/vsi-openvms-programming-concepts-manual-volume-ii/#FAST_IO_PATH
More information about the Info-vax
mailing list