Patrick Ohly wrote:
On Tue, 2006-01-17 at 20:09 +0100, [EMAIL PROTECTED] wrote:
as you
still have to pull a lot of data from disk, you still put quite a
pressure on VM subsystem, so direct I/O can still help,
But how to talk afio, star or mkisofs into that ?
I was thinking that a simple wrapper to open() which adds
O_DIRECT might be sufficient, but it turned out that this
alone is not sufficient: the buffers used by the programs
must have a certain alignment. This is not guaranteed
without modifying the way how those programs allocate
memory.
I played with this a bit, if you are using higher level calls you can
replace fopen() with an open() using O_DIRECT, an fdopen() after that,
and a setbuffer() to get a big alligned buffer in place. I did that just
to see if I could get a gain without doing a bunch of code which might
be non-portable in practice. The main benefit was to have less impact on
the rest of the system, the i/o in the program didn't run that much faster.
--
bill davidsen <[EMAIL PROTECTED]>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]