[strongSwan] Test with lots of concurrent connections
martin at strongswan.org
Mon Mar 31 12:51:06 CEST 2014
> - Are there generally things I should consider from the beginning that
> will limit the amount of connections handled by strongswan?
The number of simultaneous connections is mostly limited by the
available RAM on your system. We did some memory optimizations recently,
depending on your configuration you'll need a few (3-8?) KB of memory
for each IKE_SA+CHILD_SA pair.
The connection rate is mostly limited by public key cryptography, namely
the Diffie-Hellman exchange. You'll need to find a good compromise
between speed and security; ECDH is certainly preferable, see .
> - Did someone build a test scenario that tests such amounts of clients?
> If so, are you willing to share ideas or even code? (I am thinking
> about using linux lxc containers on multiple machines with lots of
> memory.... - any better ideas?)
To perform load-tests, it is not necessarily required to have dedicated
client installations. A single (or a few) clients can create many SAs to
put a tested installation under load. The load-tester  plugin does
so, you certainly should take a look at it. It doesn't generate/test the
data path, but IKE exchanges only. But sounds like this is what you are
looking for anyway.
For some optimization tricks, have a look at , and more advanced
stuff on . Logging  can affect performance significantly as well.
Having the data structures configured properly should allow charon to
scale nicely with SAs and CPU cores.
More information about the Users