Sokan állítják, hogy a FreeBSD TCP/IP stackje a legjobb a világon. Azt, hogy az egyik legstabilabb OS, azt mi sem bizonyítja jobban mint, az hogy a Netcraft-on a "longest uptime" kategóriában az első 10 gép közül 7 FreeBSD ( a többi három BSD/OS néven fut), az első helyezett FreeBSD 1399 napos uptime-mal vezet. Az első 50-ben szinte csak BSD-k vannak, néhány Irix, Solaris, három Win2K! viszont egy darab Linux box sem található itt. Az uptime nem minden! mondják sokan, és igazuk van. Viszont itt egy újabb FreeBSD rekord:
Terry Lambert postázott egy érdekes levelet a @freebsd-hackers listára, amelyben azt állítja, hogy több, mint 1.6 millió egyidejű kapcsolatot tud kiszolgálni egy FreeBSD 4.4 box. A bejelentésben egy általa tuningolt FreeBSD-ről beszél, amelyen Ő mérte a fent említett eredményt. A gép 1,603,127 egyidejű kapcsolatot szolgált ki 4GB fizikai memóriával, IPSEC használata nélkül. Ha a mérés hiteles, akkor úgy tűnik, hogy ez egy rekord az x86 kategóriában.
Bejelentés:Date: Sun, 26 Jan 2003 17:36:30 -0800
From: Terry Lambert
To: Sam Tannous
Cc: freebsd-hackers@freebsd.org
Subject: Re: max simultaneous TCP connections
(32,763)?
Sam Tannous wrote:
> I have two freebsd boxes (back to back) and I've
> been playing with a simple server on one machine
> and client on the other machine (this was simply
> an exercise with playing with kqueue). Both the
> server and the client are single processes and the
> client seems to stop at 32,763 connections.
>
> I've modified the port range, tcp keepalive,
> kern.ipc.somaxconn, maxfiles, maxsockets, nmbclusters.
> I even tried net.inet.tcp.tcbhashsize (up to 1024).
>
> Is there some other parameter I'm missing? Or is this
> a known limitation/bug?
You must tune up maxfiles at boot time, not afterwards, or
the number of tcpcb's and inpcb's will be limited to the
value of maxfiles at compile time, no matter what you set
it to later with that !#$%@&*! sysctl that pretends to be
read/write, but should really be read-only after boot time.
The limit on outbound connections is 65535. Technically,
this is per IP, but you will have to read the kernel code
in some detail to use more than one IP, since FreeBSD has a
bug in inpcballoc, in that it treats all outbound sockets as
if they are allocated from the INADDR_ANY range, even if you
are only using a single IP address (technically, you should
be able to bind on the way out before a connect, but there
are some hoops ou have to jup through to avoid certain "if"
tests that should not be there.
Given the 32763 number, it looks like you are just quoting me
back to me, pretending the historical answer is the current
answer, and that has not been accurate since FreeBSD 4.5.
I have *personally* tuned a FreeBSD box with 4G of RAM, and
*personally* achieved a reacord number of connections.
The current record is 1,603,127 simultaneous connections, in
FreeBSD 4.4, without IPSEC.
As far as I know, I hold the single machine connection record
for an x86 box.
-- Terry