From owner-freebsd-isp Thu Nov 14 18:32:00 1996 Return-Path: owner-isp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA04124 for isp-outgoing; Thu, 14 Nov 1996 18:32:00 -0800 (PST) Received: from scanner.worldgate.com (scanner.worldgate.com [198.161.84.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA04107; Thu, 14 Nov 1996 18:31:09 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.7.5/8.7.3) with UUCP id TAA25922; Thu, 14 Nov 1996 19:30:46 -0700 (MST) Received: from localhost (marcs@localhost) by alive.ampr.ab.ca (8.7.5/8.7.3) with SMTP id TAA01707; Thu, 14 Nov 1996 19:27:43 -0700 (MST) Date: Thu, 14 Nov 1996 19:27:42 -0700 (MST) From: Marc Slemko X-Sender: marcs@alive.ampr.ab.ca To: "S(pork)" cc: questions@FreeBSD.ORG, isp@FreeBSD.ORG Subject: Re: Tuning for WWW performance... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-isp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In -stable, from config.c, MAXUSERS tunes: #define NPROC (20 + 16 * MAXUSERS) int maxproc = NPROC; /* maximum # of processes */ int maxprocperuid = NPROC-1; /* maximum # of processes per user */ int maxfiles = NPROC*2; /* system wide open files limit */ int maxfilesperproc = NPROC*2; /* per-process open files limit */ int ncallout = 16 + NPROC; /* maximum # of timer events */ /* maximum # of mbuf clusters */ #ifndef NMBCLUSTERS int nmbclusters = 512 + MAXUSERS * 16; #else int nmbclusters = NMBCLUSTERS; #endif CHILD_MAX and OPEN_MAX are not affected by MAXUSERS. CHILD_MAX and OPEN_MAX should certainly be set, maxusers around 128 or so would be good (ignore the warning from config), NMBCLUSTERS you probably don't need to set if MAXUSERS is big enough. On Thu, 14 Nov 1996, S(pork) wrote: > Howdy, > > I was just reading through the FAQ's and archives, and I came up with some > conflicting info; some people were replying that the "MAXUSERS" option > will take care of mbuf allocation, max open files per user, and max > processes per user. Then other folks were giving individual options such > as "NMBCLUSTERS=4096", "CHILD_MAX= ", "OPEN_MAX= "... Which is correct? > And if MAXUSERS can do all of this, what is the formula it uses to > generate the other values? > > >From what I can tell, it looks like the following requirements must be met > for a high-performance dedicated web server: > > 1. Being able to have enough processes for all incoming requests Assuming you are using a forking server like apache. > 2. Being able to have enough files open (4-ish/apache process for access, > error, browser, referer) In apache the logs are opened once for all the child processes, so if you have lots of virtual domains with seperate log files then you need lots of file descriptors. > 3. Having enough buffer space for the sockets > > If I can get some good answers on this, I'd love to throw together a page > for the FAQ titled "Optimizing FBSD for high-performance web serving" or > the like... Then next time someone asks, everyone can say "Look at the > FAQ!" There is some BSD advice on the Apache page somewhere under http://www.apache.org/ that isn't bad. > > Thanks, > > Charles > >