On Thu, Jul 31, 2008 at 01:33:50PM +0100, Jamie Lokier (jamie@shareable.org) wrote:
It depends... COW can DoS the system: consider attacker who sends a
page, writes there, sends again and so on in lots of threads. Depending
on link capacity eventually COW will eat the whole RAM.
<q>
Benchmark of the 100 1MB files transfer (files are in VFS already) using
sync sendfile() against aio_sendfile_path() shows about 10MB/sec
performance win (78 MB/s vs 66-72 MB/s over 1 Gb network, sendfile
sending server is one-way AMD Athlong 64 3500+) for aio_sendfile_path().
</q>
So, it was really better that sync sendfile :)
That's how all AIO should work of course. We are getting into a bit of
offtopic, but aio_sendfile() worked that way as long as syslets,
although the former did allocate some structures before trying to send
the data.
Looks scary :)
Thread allocation in userspace is rather costly operations compared to
syslet threads in kernelspace. But depending on IO pattern this may or
may not be a noticeble factor... It requires testing and numbers.
--
Evgeniy Polyakov
--