Date: Sun, 17 Feb 2002 14:47:24 -0800 From: Alfred Perlstein <bright@mu.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: Miguel Mendez <flynn@energyhq.homeip.net>, hiten@uk.FreeBSD.org, hackers@FreeBSD.org, freebsd-questions@FreeBSD.org Subject: Re: in-kernel HTTP Server for FreeBSD? Message-ID: <20020217224724.GL12136@elvis.mu.org> In-Reply-To: <3C703154.91ED7FB4@mindspring.com> References: <20020217143343.41758.qmail@web21104.mail.yahoo.com> <20020217173609.A25030@energyhq.homeip.net> <3C703154.91ED7FB4@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Terry Lambert <tlambert2@mindspring.com> [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 [alfred@freebsd.org] '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 majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020217224724.GL12136>