Date: Tue, 10 Jul 2001 19:30:01 -0700 (PDT) From: Leo Bicknell <bicknell@ufp.org> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/28882: Network defaults are absurdly low. Message-ID: <200107110230.f6B2U1178280@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/28882; it has been noted by GNATS. From: Leo Bicknell <bicknell@ufp.org> To: "Richard A. Steenbergen" <ras@e-gerbil.net> Cc: Leo Bicknell <bicknell@ufp.org>, FreeBSD-gnats-submit@freebsd.org, billf@elvis.mu.org Subject: Re: conf/28882: Network defaults are absurdly low. Date: Tue, 10 Jul 2001 22:27:32 -0400 Ah ha, I believe the reason I had no MBUF problems is because I had raised a number of other defaults, which may be a good idea anyway. Currently the number of MBUF's is dependant on the number of users, which really makes no sense as the max number needed can be calculated by the socket size. It also shows a minor misunderstanding in my original suggestion. So I will revise it. Rather than: kern.ipc.maxsockbuf=16777216 net.inet.tcp.sendspace=4194304 net.inet.tcp.recvspace=4194304 I now suggest _defaults_ of: kern.ipc.maxsockbuf=8388608 net.inet.tcp.sendspace=419430 net.inet.tcp.recvspace=419430 There was no reason to let the max get that big. Doing calculations on the normal defaults (as those who write programs to exceed them are on their own) we get a worst case need of 419430 / 256 or 1638 MBUF's per connection. Considering a "busy" server is unlikely to exceed 100 connections open simultaneously (and the few news servers and irc servers that exceed that are special cases, very few web servers or general purpose boxes get to that number) 163800 MBUF's maximum would be enough. Of course, if they were all allocated for some reason that default would allow about 40 Meg of memory to be allocated to the network, but then I think it's reasonable to assume that a machine servicing 100 simultaneous connections has 40 Meg around to spare, in the worst cases. The defaults now are based on: #define NMBCLUSTERS (512 + MAXUSERS * 16) TUNABLE_INT_DECL("kern.ipc.nmbclusters", NMBCLUSTERS, nmbclusters); TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 4, nmbufs); So you get 32768 MBUF's today with maxusers at 512. So I'm suggesting that number needs to be about 5x higher to make everything work right. In reality, I'm betting about 3x-4x would be the right number for real world situations. So, MBUF's need to be evaluated as well. As this is quickly getting more complicated, I'll suggest that this pr might need to split. I still believe the defaults need to be higher to help the end users installing the system who don't know how to tune this stuff. I also think perhaps a new section of the handbook or something needs to address these issues in more detail with all the related gook that needs to be changed. -- Leo Bicknell - bicknell@ufp.org Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107110230.f6B2U1178280>