Project

General

Profile

High CPU load when using tigase-server-7.0.1-b3810

Hamid Alimohammadi
Added almost 4 years ago

Hello,

I have installed the tigase-server-7.0.1-b380-dist-max version, and right after the first user becomes online the CPU usage goes up.

I am testing on a real server (not VM). In my first test I used a kind of full feature init.properties including many components, then to narrow down the problem, I deleted the components in the init.porperties, but still the CPU load becomes high right after first login.

I have installed Oracle JDK in this server because I read in a forum that Oracle JDK is better than open JDK.

The following is my init.properties file:

------------------------------------------------------------------------------------------------
--virt-hosts=x33.lopl.net
--vhost-anonymous-enabled = false
--user-db-uri = jdbc:mysql://10.10.10.33/tigasedb33?user=tigase&password=tigase12
--user-db = mysql
--admins = admin@test.com
config-type = --gen-config-all
--cluster-mode=false
--debug=server,db,xmpp.impl
--monitoring=jmx:9050,http:9080,snmp:9060
--sm-plugins=+message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,-jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+amp,-msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,-zlib,+jabber:iq:last
---------------------------------------------------------------------------------------------------

Top snapshot (with no online user):

Tasks: 175 total,   1 running, 173 sleeping,   1 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  20467020k total,  3864988k used, 16602032k free,   183556k buffers
Swap: 10305532k total,        0k used, 10305532k free,  1493200k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16111 root      20   0 15028 1356  984 R  0.3  0.0   0:00.01 top
    1 root      20   0 19232 1484 1212 S  0.0  0.0   0:01.22 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.04 migration/0
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.66 ksoftirqd/0

Top snapshot with one online user:

Tasks: 176 total,   1 running, 173 sleeping,   1 stopped,   1 zombie
Cpu(s):  0.0%us, 25.0%sy,  0.0%ni, 75.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  20467020k total,  3866664k used, 16600356k free,   183556k buffers
Swap: 10305532k total,        0k used, 10305532k free,  1496564k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
14786 root      20   0 10.4g 1.7g  13m S 145.1  8.6   9:25.20 java
16072 root      20   0 15028 1356  988 R 100.0  0.0   0:00.04 top
    1 root      20   0 19232 1484 1212 S  0.0  0.0   0:01.22 init

Thank you


Replies (3)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Configuration looks OK and from the scarce information it's hard to tell why the problem occurs. It would be best to check the server logs for any potential errors and information as well as check server statistics (e.g. http://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html_chunk/RetrievingStatisticsFromTheServer.html)

Added by Hamid Alimohammadi almost 4 years ago

Hi Wojciech,

Thank you for reply.

I omitted the plugins one by one to see what may cause the CPU high usage and after disabling PEP the CPU usage became normal.

There might be a sort of misconfiguration in my init.properties' plugins which caused the problem.

Actually I don't need PEP in our implementation so I disabled PEP plugin and the server is working fine.

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

This is an issue with PEP plugin implementation relying on PubSub component so without PubSub component and with pep plugin enabled there is possibility of looping packages and high CPU usage. We will look into a way to handle it better.

    (1-3/3)