Emulator stopping during mnesia writes

Scott Lystig Fritchie scott@REDACTED
Thu May 11 20:26:33 CEST 2000


>>>>> "k" == Klacke  <klacke@REDACTED> writes:

k> Well there is always the case with opening and closing
k> filedescriptors.  It is possible (by means of the AF_UNIX socket
k> trick) to send fd's back and forth between unix processes, but a
k> kernel thread sure make it easier.

There's another separate-process hack possible ... inspired by Squid
and the I/O-Lite (?) guys & their speedy Web server(*).  Have an
external process open() the file, immediately close it, then report
back to you.  When you get word back, immediately open it again.
Hopefully the OS will have everything cached for you and you avoid
blocking.  This could be especially useful if you're opening with
O_CREAT.

In off-hours "wouldn't be fun if I hacked on Z" moments, pondering
what Z might be, I've thought that AIO (asynchronous I/O) would be a
nifty thing to add to the VM.  Not enough hours in the day, though.
:-)

-Scott

(*) I _think_ it was the I/O-Lite folks at Rice (?) University.  They
had a recent paper describing a Web server that, at its core, was a
single process with a select() (poll()?) driver loop.  Really busy Web
servers implemented that way have a problem blocking for local disk
I/O, though.  So they use a whole bunch of external processes to read
the file (if it indeed exists), which brings the whole thing into page
cache first.  The main process rarely blocks for local disk I/O.  Sick
and twisted, but apparently a very effective technique.  And portable.



More information about the erlang-questions mailing list