Hello!
> So with 180k connections and a 60 second TCP_TIMEWAIT_LEN, the machine
> is limited to a maximum sustained rate of 3,000 connections per second?
Yes. From ip-sysctl.h:
tcp_max_tw_buckets - INTEGER
Maximal number of timewait sockets held by system simultaneously.
If this number is exceeded time-wait socket is immediately destroyed
and warning is printed. This limit exists only to prevent
simple DoS attacks, you _must_ not lower the limit artificially,
but rather increase it (probably, after increasing installed memory),
if network conditions require more than default value.
> A uniprocessor server is handling 3,000 connections per second (probably
> not possible. What is the maximum 2.4 can do?)
I see ~5000 on pretty bad hardware. I have no idea how much
of cps high end machines can make.
> This all sounds pretty bad and suggests that either TCP_TWKILL_SLOTS is
> far too small or I've missed something obvious :)
Yes, it is too small, no doubts.
Unfortunately, this problem was hidden, because I used tcp_tw_recycle
in all the testing and the problem did not exist with this option.
As soon as it is disabled, this code must be reworked.
Alexey
|