Beam process taking all resources

Hello,
I have recently installed ejabberd-2.0.0 to my linux box running Suse 10.3. The first thing I have tried after configuring the sever was a stress test.
For the test I used a simple NET::XMPP based jabber client written in perl. To simulate load I login 50 users, each user is sending a message (about 1000bytes) to a randomly selected opponent once in a second. Suddenly I found that my server is using all available CPU and near all the memory is used. According to the ‘top’ report the source of the load is a process ‘beam’.
1 minute after stress test start:
11283 admin 18 0 404m 335m 1376 R 66.3 67.6 0:54.94 beam
5 minutes after stress test start:
11283 admin 18 0 560m 419m 804 D 42.0 84.6 3:16.70 beam
10 minutes after stress test start:
11283 admin 18 0 628m 358m 784 R 47.3 72.4 4:54.13 beam

The CPU and Memory usage are not stable they increase and decrease all the time.

Finally this process died within about 20 minutes after starting the test.
Could anyone please let me know if this is a known issue or a possible miss configuration?
Can this server work correctly under heavy message load generated by 200-400 clients?

I’m using nearly default config that was shipped with the installer, the only option I have changed is the authentication method, it was changed from internal to mysql.

Send messages to local existing accounts

VasilyP wrote:

For the test I used a simple NET::XMPP based jabber client written in perl. To simulate load I login 50 users, each user is sending a message (about 1000bytes) to a randomly selected opponent once in a second.

Suddenly I found that my server is using all available CPU and near all the memory is used.

The destinations of messages are existing account in the same Jabber server, non-existing accounts in the same server, or purely random?

If your Jabber server is "jabber.localhost" for testing purposes, a realistic test would be to create accounts test1 up to test50, and send messages to a random destination selected in the group: test1@jabber.localhost .. test50@jabber.localhost

If your current script sends messages to purely random JIDs like aaaa01 instead of testXX@jabber.localhost or aaaa01@jabber.localhost, then your clients are sending messages to remote servers like aaaa01, and this forces ejabberd to try to establish connections with remote servers, that in fact do not exist. This isn't a realistic test.

VasilyP wrote:

According to the ‘top’ report the source of the load is a process ‘beam’.

Yes, 'beam' is the erlang machine where ejabberd runs.

50 users sending each one 1 message every second to another local user should consume very few resources.

You can check the tools I used some years ago to stress test ejabberd: Benchmarking Jabber/XMPP Servers with Jabsimul.

Syndicate content