Obtaining 75k (active) concurrent tcp sessions..
silby at silby.com
Thu Feb 12 20:48:16 PST 2004
On Thu, 12 Feb 2004, Bill wrote:
> I read a post that was sent to freebsd-hackers, which mentioned an
> individual was able to obtain 1.6 million concurrent tcp sessions, so I
> assume it's possible.
That was with a heavily modified version of FreeBSD, you wouldn't be able
to hit 1.6 million out of the box.
> My goal is to setup a server, which is capable of accepting at least 75k tcp
> connections to perform some firewall stress tests at work. Given that
> information on this subject is quite scarce, I thought I'd post this
> question and see what type of response I get back.
> Any assistance or suggestions would be greatly appreciated,
> Thanks in advance,
I've run tests up to a few thousand connections, I believe that 75000
should be doable, but it will take tuning. Start with 5000 and keep
increasing in increments of 5000 from there, upping values for various
resource limits as you hit them. I think that maxsockets, mbuf clusters,
and maxfiles will be your main limitations... they should all scale to
75000, but I'm not sure how many people have done so.
Now, if you want good performance... that could be another story.
However, if all you're doing is having a sample app which accepts
connections and holds them open until the client hangs up, then you should
be able to do it. (If you were sending real data, then the amount of
memory being used for socket buffers might become a problem.)
Note that for the client side of those connections, you may need more than
one machine; with only ~65535 possible ephemeral ports available per IP
(and it being tough to use the same ephemeral port on different IPs with
the BSD network stack), it'd be best to just do two client machines with
75000/2 connections each. (There is no such limit for the server side, of
Post to this list if you run into any problems, or find any specific
issues that prevent you from reaching the goal.
Mike "Silby" Silbersack
More information about the freebsd-hackers