[Info-vax] OpenVMS async I/O, fast vs. slow
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Sat Nov 4 21:53:44 EDT 2023
On 2023-11-04 21:44:24 +0000, Arne Vajhøj said:
> $QIO(W) is original. $IO_PERFORM(W) was added much later.
>
> $IO_PERFORM(W) is called fast path IO. The name and the fact that it
> was added later hint at it being faster.
>
> That name has always give me associations to a strategy of doing lots
> of checks upfront and then skip layers and checks when doing the actual
> reads/writes. But I have no idea if that is actually what it does.
Careful with the "fast path IO" names, here.
>From somebody long ago and far away, an overview of Fast Path:
http://h41379.www4.hpe.com/wizard/wiz_2358.html
I wouldn't expect much of a performance benefit to Fast Path on a
uniprocessor configuration. If anything.
Fast I/O may well be useful here, though. Fast I/O is effectively a
version of the $qio read and write paths, reworked for 64-bit support
and for speed.
Quoth the doc: "In total, Fast I/O services eliminate four spinlock
acquisitions per I/O (two for the MMG spinlock and two for the SCHED
spinlock). The reduction in CPU cost per I/O is 20 percent for
uniprocessor systems and 10 percent for multiprocessor systems."
Additionally, use of buffer objects can usually improve somewhat upon
that Fast I/O performance, though how much depends on the details of
local system memory activity.
Fast Path and Fast I/O were, are, and will always remain stupid feature names.
If I really need performance (or often times, if I want simpler app
coding), I'll use memory mapped sections and keep the data in memory.
There are tradeoffs there around locking and interprocess notifications
of course, and as has been mentioned. Conversely, using the file system
manages the memory caches and the interlocking and notifications for
me. TANSTAAFL, etc.
PS: IIRC, there are some discussions around here about potential
benefits of shutting off some of the in-memory caching when using SSDs,
too. ODS-2 and ODS-5 and the I/O stack all well pre-date SSD storage,
and current speeds and feeds, and have different trade-offs.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list