From owner-freebsd-questions Sun Dec 16 10:25:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mustard.heime.net (mustard.heime.net [194.234.65.222]) by hub.freebsd.org (Postfix) with ESMTP id 889A937B417 for ; Sun, 16 Dec 2001 10:25:21 -0800 (PST) Received: from localhost (roy@localhost) by mustard.heime.net (8.11.6/8.9.3) with ESMTP id fBGIOoZ05739; Sun, 16 Dec 2001 19:24:50 +0100 Date: Sun, 16 Dec 2001 19:24:50 +0100 (CET) From: Roy Sigurd Karlsbakk X-Sender: To: Dominic Marks Cc: Subject: Re: in-kernel web server??? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I've been trying to setup a pretty weird system with Linux and the > > in-kernel web server Tux. This gives me quite good I/O, and with > > zero-copy memory operation, this is FAST! > > How fast? on a athlon 1133mhz w/ 1GB ram and two drives in RAID-0, I can do ~50 megs per sec from disk to nic, reading 200 files simultanous with a pervers readahead and 4 megs stripe/chunk size, maxing out the PCI bus by reading from disk to memory, and then to the nic... > > Problem: Linux caching/buffering sucks, and by reading lots of > > large files at once (some 200 files, each 3-4GB), the system slows > > down to a mere 1MB/sec after 30-40 seconds. > > > > Are there any Tux/khttpd-like (in-kernel) web servers for FreeBSD? > > Services should be in the userland, putting them in the kernel is > just stupid. It depends. I can NOT use apache, as it doesn't have any zero-copy operation. That means, data is read from disk, put into kernel-space memory, copied to user-space memory, and then handled by Apache. Tux/khttpd just reads it from disk and copies it to the nic using the sendfile() call. Similar results have been shown with mmap() on Linux. I really don't know the BSD world, but I'm thinking seriously about converting. roy -- Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA Computers are like air conditioners. They stop working when you open Windows. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message