* Terry Lambert <[EMAIL PROTECTED]> [020217 14:41] wrote: > Miguel Mendez wrote: > > As others have pointed out, it may have big hacker value, but no one > > would use it for anything serious. AFAIK there's no such thing for > > FreeBSD, but one thing I remember, is that once the Linux kernel incorporated > > the zero copy netowrking code, userland HTTP servicing like Tux saw it's > > performance increase on par with khttpd, so it seems that's not worth to > > run a http server in kernel space. > > First, livelock means that top end load on a khttpd will be > higher than top end load on a user http, where there is so > much interrupt traffic that the user space never gets to run. > > Actually, Alfred claims to be the first person to pre-load > porn into the FreeBSD kernel, and his approach seriously > predates the khttpd work. 8-).
Yes, preloading pron into the kernel does make it serve quite a bit faster. :) I basically made an API that allowed one to load and unload "objects" from the kernel then use a sendfile(2) like syscall to send them. I was servicing 5000 connections a second for 1x1 gifs or several thousand per second (saturating 100mbit) for larger images. I also used kqueue. The real problem is that most of the generic web servers available (as well as most commercial ones) just suck for handling IO and events. A well thought out design can give you quite a perf boost without needing to stick the _entire_ thing into the kernel. -- -Alfred Perlstein [[EMAIL PROTECTED]] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

