Project

General

Profile

Facing issues during load testing with tigase v 5.2.0

Nauman Bashir
Added over 4 years ago

Hi,

we are trying to run a load test on Tigase server (v5.2.0) on amazon m3.medium instance, with 2GB heap memory centos, oracle jdk1.7 , We've created a test client application using smack api. We are facing following problems during clients connections(without any real message exchange):

  • Connection rate is very slow ~6 seconds per connection

  • Upon reaching 600 connections, CPU usage goes to 100%.

  • Network I/O is also very high

We are connecting sequentially, i.e. in a loop (one connection at a time).

We are unable to figure out the reason for slow connection rates, and high CPU usage. Even when there is no activity on server. I.e after connecting we are not sending any packets.

Any help would be appreciated.


Replies (1)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

What database do you use? Do you run everything (Tigase, Smack application and DB) on a single machine? If so, you can check what is using the CPU, I mean which process.

we are trying to run a load test on Tigase server (v5.2.0) on amazon m3.medium instance, with 2GB heap memory centos, oracle jdk1.7 , We've created a test client application using smack api. We are facing following problems during clients connections(without any real message exchange):

  • Connection rate is very slow ~6 seconds per connection

How do you know that the connection rate is very slow? Is it slow because of your client or because of the server? In any case, you should be aware that establishing each connection takes a significant time as there is lots of handshaking between the server and the client (stream open, TLS start, SASL authentication, roster get, ...), so it does take time and maybe 100ms is not such a bad time. However, it probably takes 100ms regardless you connect a single client or 100 clients at the same time concurrently. Therefore, my suggestion is to modify your client to allow for concurrent calls or use a different tool for generating a load. My recommendation is to try Tsung. This is what we use for our load tests.

  • Upon reaching 600 connections, CPU usage goes to 100%.

Which process uses the CPU? Is it Tigase? I suggest you dump the Tigase statistics so you can know more details of what is going on inside the Tigase server.

  • Network I/O is also very high

This is strange and definitely requires some investigation.

We are connecting sequentially, i.e. in a loop (one connection at a time).

Yes, this is not suitable for real load tests. It would take you too much time to connect 100k or so users. And also working on own tool for load tests is a huge work. Try Tsung instead.

We are unable to figure out the reason for slow connection rates, and high CPU usage. Even when there is no activity on server. I.e after connecting we are not sending any packets.

With so little details it is difficult to say what is going on. Make sure you have debug logging switched off. However, it does not matter at the load you generate right now and it should be not the cause of the poor performance. How big is the contact list of your users? How much memory is assigned to Java (Tigase) process?

    (1-1/1)