CPU Load

Hi,

I have migrated from jabberd-1.x to Jive Messenger. Everything works great and admin is really easy. One problem however, is the cpu load on my server. Jive have been running for a day or two with 25 online users at this time. Below is the output of the unix ‘‘top’’ command:


 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 5382 jive 18 0 334m 132m 18m S 99.9 26.2 236:23.31 java

The server is equipped with a Intel® Pentium® 4 CPU 2.80GHz CPU.

I’'m using jre1.5.0_04 for Linux, running on a 2.6.11 kernel.

So, my question: Is this normal or is something wrong? Is there anyway to improve this?

Tia,

Mark

Mark,

i don’‘t think it’'s normal. besides JM, do you have other service in your machine?

here i have running in the same machine JM 2.2.0 (with MySQL), Apache2, Resin + JWChat and it’'s CPU share is 30% tops. the machine is an desktop PIII 1.1 with 384 RAM. and there are normally 400 users at the same time. oh yeah, SO is Linux (Slackware 10.1)

regards,

Rodrigo.

I have lots of other stuff running, but without Jive/JM, the cpu load is minimum. Been running the jabberd-1.x on the same box with all the other stuff for many years. I’'m thinking maybe the JRE is wrong or something? Debug is disabled in Jive, but there are some errors and warnings. Could that cause the high load?

Do a thread dump and post it here. kill -3 of JVM.

You should see a lot of threads that are waiting and probably one or two that have long stack traces. That’‘ll give some clues as to what’'s going on.

Noah

I don’'t know how to read the output, but maybe someone else can?

http://www.nellemann.nu/mark/kill-3.txt

Tia,

Mark

Supid question, but was the cpu spiked at this point?

Everything is in a wait state. It doesn’‘t look like anything is processing. You’‘ll typically see a large call stack and the method that is taking time. Also what are the jvm args you’'re using, OS, memory, etc.

Noah

The load was incresing slowly, but the java process was using all available cpu all the time.

I have not specified any jvm args. Didn’'t know this was possible?

So, just to be clear…you start messenger (with messenger.sh) and the cpu spikes to 99%. What happens if you start another java process, do you get the same behavior?

Noah

I start messenger with ‘‘bin/messenger start’’. I have not tried to start other Java apps, as I don’'t have any.

just for the info. i’‘m running JM 2.2.0 at 500MHz 64MB RAM, with ~70 users online, that’'s what my top shows:

top - 12:03:15 up 3 days, 3:39, 1 user, load average: 1.24, 0.63, 0.42

Tasks: 40 total, 1 running, 39 sleeping, 0 stopped, 0 zombie

Cpu(s): 0.0% us, 0.3% sy, 0.0% ni, 99.7% id, 0.0% wa, 0.0% hi, 0.0% si

Mem: 58584k total, 57088k used, 1496k free, 96k buffers

Swap: 979956k total, 118772k used, 861184k free, 6864k cached

the load is something about 1% mostly, hm…

OS: Archlinux 0.7 with only JM running on it.

That’'s how it should look. What Java version are you using? Did you specify any extra aguments?

Tia,

Message was edited by:

CmdrNelle

I restarter Jive a couple of hours ago and added the ‘’-server’’ argument to java. The load is normal (99% idle), but I don’‘t know if it’'s because of the extra argument or if the restart just helped.

Anyway, if it doesn’'t go crazy again my problem is solved

Thanks for all you help and suggestions.

$ java -version

java version “1.5.0_03”

Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)

Java HotSpot™ Client VM (build 1.5.0_03-b07, mixed mode, sharing)

I’‘m still using 1.5.0_03 though i’‘m going to upgrade it today. As you could see it’'s even in Client mode. Dont remember why i didnt set it to Server. And no additional arguments as i remember.