Re: InfoWorld web server shootout

Olaf Kirch (okir@monad.swb.de)
Fri, 11 Jul 1997 04:46:00 +0200 (MET DST)


In article <19970708024508Z971258-20479+5732@vger.rutgers.edu> you wrote:
: >socket without any user-mode/kernel-mode transitions (and buffer copying)
: >using the TransmitFile APIs.

: I think that Linux could do with a system call to perform this
: functionality.

Well, the easy way would be to mmap the file to be served and just call
write() on the mmaped memory. The kernel would then copy the fs cache page
into the network buffers right away. The problem for big files may be that
Linux currently does only very limited read-ahead on mmapped files
(i.e. one page), so it might be taking page faults too frequently to
be efficient.

Somewhat off-topic: IMHO a high-end web server should use different
ports/threads for publicly available plain files vs. those that require
special attention (server-side includes, access checking). A http-import
mechanism could distinguish between those varieties and frob hyper links
to refer to port 1234 for fast GET operations (simply throw a file at
the client) vs port 5678 for slow ones that require babysitting. The fast
server personality could speed up things even more by caching open fd's,
mmaps and file attributes for a while to avoid namei().

Cheers
Olaf

--
Olaf Kirch         |  In those days, the future used to be better, too.
okir@monad.swb.de  |                               Karl Valentin