Project

General

Profile

Limitation of user logins per second.

Oleg Shestakov
Added about 2 years ago

Hi Guys

I’ve got stuck with the user login throttling on tigase server

Actually, I can’t get more than 240 user logins into chat on port 5222 per second.

I already have in etc/init.properties

--cm-traffic-throttling = xmpp:0:0:disc,bin:0:0:disc
--cm-ht-traffic-throttling = xmpp:0:0:disc,bin:0:0:disc
--new-connections-throttling = 5222:1500,5223:1500,5269:1500,5280:1500
--sm-threads-pool = custom:200
c2s/watchdog_delay[L]=10000
c2s/watchdog_timeout[L]=1000
c2s/watchdog_ping_type[S]=WHITESPACE
ws2s/net-buffer-limit[I]=4194304
c2s/net-buffer-limit[I]=4194304
bosh/net-buffer-limit[I]=4194304
s2s/net-buffer-limit[I]=4194304
c2s/max-inactivity-time[L]=10
c2s/max-queue-size[I]=635140

But this does not help, I still can’t get more than 240 new logins per second.

Tigase is running on a 8 core machine and load averages are around 1.5 so CPU is not a bottleneck. Also no high load observed on mysql server.

I have generated 1M users in database before the testing and try to login them concurrently in 1000 threads from single ip.

Guys, could you please help me to figure out where the bottleneck is.

I appreciate any help. Thanks in advance


Replies (2)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 2 years ago

There can be many reasons for poor performance like this. Here are some ideas i suggest you to check first:

  1. Make sure debug logs are off, in fact log level should be set to minimum - WARNING. Otherwise the server slows down due to high IO caused by heavy logging

  2. 240 logins per second mean something about 1,000 queries to the database. Make sure the DB can handle this. Now do you measure load on the MySQL Server? CPU can be still low but the response time may be slow due to high IO disk or network.

  3. Most commonly during our load tests we actually experience performance problems on the load simulation software or machine. Maybe the Tigase server performs OK but you simply cannot generate more load?

  4. Another possibility can be of course network bottleneck, do you have a router, firewall or some sort of proxy between your load generator and Tigase?

  5. Of course there is possibility of misconfigured Tigase server but for this we would need to look at the Tigase statistics at least

Added by Oleg Shestakov about 2 years ago

Thank you.

    (1-2/2)