Re: Benefits of in-kernel services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 16, 2002 at 10:38:48PM +0100, Sapan Bhatia wrote:
> Can anyone give me an idea of how significant the benifits are of
> implementing network applications in the kernel as opposed to doing
> so in userspace?

> Judging by initial reviews of the in-kernel Tux webserver, which
> supposedly outperformed Apache by upto 3 times fetching a mixture of
> static and dynamic content, it really _does_ make a difference to do
> implement things in the kernel. If this is true, then what kind of
> overheads really make the differnce?

I believe it was Ingo Molnar who wrote the x10 web server; entirely
userspace but performance numbers equalling that of Tux. x10 would
probably more popular except its license is a little funny.. That,
and static web pages are just not interesting. The real difficulty is
serving up dynamic web pages, and apache's flexibility is a real win here.

Implementing services in the kernel is really only a performance win
if you can avoid significant protection-boundary crossings. As you
mentioned, the sendfile interface is pretty nice, and avoids most of
the protection-boundary work involved in serving webpages.

A kernel-based nfs daemon makes sense because it has more direct access to
pages dirtied on the local machine. A kernel-based ipsec implementation
makes sense because copying data from kernel buffers out to a process
for decrypting and back across the kernel again for eventual delivery
to another process is a lot of copies. But webservers have the keen
sendfile interface to remove the largest amount of hassle.

-- 
http://www.wirex.com/

Attachment: pgp00213.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux