I've added on my page a patch for hashbins. It should fix some
of the problems you have seen with zillions of sockets, but I'm sure
there are other problems.
To apply, you will likely need all the other patches on my
page, so I recommend to play with 2.5.22 (or wait 2.5.23).
Also, I'm still waiting for your testcase programs...