From owner-freebsd-questions Tue Dec 8 08:05:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA11121 for freebsd-questions-outgoing; Tue, 8 Dec 1998 08:05:55 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hecate.webcom.com (hecate.webcom.com [209.1.28.39]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA11115 for ; Tue, 8 Dec 1998 08:05:53 -0800 (PST) (envelope-from graeme@echidna.com) Received: from eresh.webcom.com (eresh.webcom.com [209.1.28.49]) by hecate.webcom.com (8.9.1/8.9.1) with SMTP id IAA28518; Tue, 8 Dec 1998 08:05:45 -0800 Received: from [209.122.117.150] by inanna.webcom.com (WebCom SMTP 1.2.1) with SMTP id 15721130; Tue Dec 08 08:03 PST 1998 Message-Id: <366D4E73.BC22DE85@echidna.com> Date: Tue, 08 Dec 1998 11:06:12 -0500 From: Graeme Tait Reply-To: graeme@echidna.com Organization: Echidna X-Mailer: Mozilla 4.02 [en]C-DIAL (Win95; U) Mime-Version: 1.0 To: aron Cc: Rob Miracle , FreeBSD-questions@FreeBSD.ORG Subject: Re: NMBCLUSTERS: Max Sane Values?? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It bothers me here that several posts have occurred on this (Apache TCP/IP tuning, mbuf exhaustion) and related subjects, which are obviously rather technical in nature, and no answers (AFAIK) have been forthcoming. And we're talking people with machines panicking here, even (gulp) threatened by management with abandoning FreeBSD! I didn't learn much from the archives either, although maybe I was looking in the wrong places. Perhaps the FreeBSD group needs a formal mechanism to escalate unresolved critical support issues to a level where they get appropriate attention. Maybe hard to do in a volunteer effort, but maybe better than losing users, or having the OS mis-performing. aron wrote: > > More info on my little mbuf problem after digging through more docs... > > This is a 3.0-RELEASE box with 512MB RAM (soon to be 1GB) running > exclusively as a web server (apache 1.3.2) AFAIK it is running with the > default config using lingering_close()... Would anyone by chance know if > using SO_LINGER instead would be a benefit? > > I'm still digging around to find the appropriate timeouts to tweak to > bring down my massive amounts of sockets in TIME_WAIT > > anyway any hints or pointers appreciated As a raw beginner running his first server, I wanted to learn about some of the performance/tuning issues, so I started digging around. I posted a question about memory requirements here. No answers - actually, one belated (but appreciated) answer. However, although somewhat helpful, that answer was a referral to Sun information, and didn't really answer my questions. I read all the information on the Apache site at http://www.apache.org/docs/misc/perf.html, including that for systems other than (Free)BSD. The link from the Solaris section to http://www.rvs.uni-hannover.de/people/voeckler/tune/EN/tune.html was by far the most illuminating. Digging around from there, I found the value TCPTV_MSL (default 30sec) defined in /usr/src/sys/netinet/tcp_timer.h, which seems to be the controlling parameter for the TIME_WAIT interval (see tcp_input.c). OTOH, it looks like you *really* want to understand what's going on if you shorten this. Any advice? It seems to me that a FreeBSD FAQ on Apache (and other heavy network load) tuning is sorely needed. (E.g., how does cdrom.com do it?). Clearly, the out-of-the-box FreeBSD configuration is not adequate. What is at http://www.apache.org/docs/misc/perf-bsd44.html#detail is OK as far as it goes (although somwhat dated?), but any tuning guide which fails to quantitively relate tuning parameters to load conditions is surely rather meaningless. (E.g, "we crank that value [NMBCLUSTERS = 4096]" - good for how many hits/second, etc.?) I've seen people post that a low end Pentium running FreeBSD/Apache can easily saturate 10Mbps ethernet. From what I've learned so far, in a real world environment (very many slow dial-up connections, transferring relatively small files), this is a non-trivial tuning exercise. My guess is that you would need to be at levels comparable to those corresponding to the quoted data below to be approaching this regime. I also have this silly(?) idea that I want to know how to tune to prevent panics or performance loss in advance, rather than fix problems after a production server starts collapsing once or more a day. Sorry, feeling a bit frustrated and overwhelmed here, but I *do* have this nagging feeling that in researching all this, I'm unnecessarily reinventing the wheel. > detail info follows: > > > netstat -m > 18508/21856 mbufs in use: > 7358 mbufs allocated to data > 11150 mbufs allocated to packet headers > 7049/9094/10240 mbuf clusters in use (current/peak/max) > 20920 Kbytes allocated to network (78% in use) > 0 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > > netstat -Aanf inet | grep TIME_WAIT | wc -l > 7171 > > > netstat -Aanf inet | grep FIN_WAIT_2 | wc -l > 560 > > > ps ax | grep httpd | wc -l > 702 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message