I am testing ejabberd performance in a straightforward scenario: Connect/Auth to one ejabberd server with two clients, database is in another machine. Most of the Ejabberd modules are closed. My target for concorrent connections is 500k. When connection count is less than 10k, new created connections per second is 1000+; when connection count is between 100~160k, TPS is 400+; when the count is more than 400k, TPS drops down to 100-. See the chart.
The CPU usage is about 70~95% during the testing.
How can I improve the performance? Including increasing TPS when load is high and reducing CPU usage.
System: CPU: 6 cores, 12 threads Memory: 32GB Network: LAN
Ejabberd:
Version: 14.05
Erlang: R16B03
build configure: ./configure --enable-nif --enable-odbc --enable-mysql --enable-pam --enable-zlib --enable-stun --enable-json --enable-iconv --enable-debug --enable-json --enable-smp-support
MAX_PROCESSESS: 15000000
MAX_PORTS: 5000000
