Java spikes CPU to 100%

Hi -

I’m new to configuring SLES. I have SP2:
[INDENT]SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2
[/INDENT]

It’s running on a VMWare Fusion 3.1.4 (OSX 10.7). The VM is allocated 4 cores and 6GB RAM. It’s running IBM Java.

[INDENT]java version “1.6.0”
Java™ SE Runtime Environment (build pxa6460sr7-20091215_02(SR7))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr7-20091214_49398 (JIT enabled, AOT enabled)
J9VM - 20091214_049398
JIT - r9_20091123_13891
GC - 20091111_AA)
JCL - 20091202_01[/INDENT]

When I run Java programs as a user, the CPU spikes to 100% and stays there. In System Monitor, the task is Sleeping in futex_wait_queue_me. When I run Java programs as root, the CPU is normal and the task is in the same state.

Clearly this is a permissions problem but I can’t figure out where. Any ideas?

Thanks in advance,
Bob

Hi
This should give you some more clues on what to run for more
information
http://stackoverflow.com/questions/9801256/app-hangs-on-futex-wait-queue-me-every-a-couple-of-minutes
http://randomlyrr.blogspot.it/2012/03/java-tuning-in-nutshell-part-1.html


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.31-0.9-default
up 15:13, 2 users, load average: 0.93, 0.95, 0.98
GPU GeForce 8600 GTS Silent - Driver Version: 302.11

Thanks Malcolm. I tried many of those but it doesn’t seem to affect the behavior at all.

Hi
Can you provide some more information (Requested by my SUSE contacts);
1 - Is the java application in the guest?
2 - Does it occur with other java applications?
3 - Have you tried the other java implementations (OpenJDK, Sun)?
4 - Tried with any other virtualization setups, kvm, Xen etc
5 - What is the java application, is it possible to get it for testing?
6 - Is the cpu utilization on the host high as well?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.31-0.9-default
up 19:27, 2 users, load average: 1.21, 1.55, 1.85
GPU GeForce 8600 GTS Silent - Driver Version: 302.11

[QUOTE=malcolmlewis;5201]Hi
Can you provide some more information (Requested by my SUSE contacts);
1 - Is the java application in the guest?
2 - Does it occur with other java applications?
3 - Have you tried the other java implementations (OpenJDK, Sun)?
4 - Tried with any other virtualization setups, kvm, Xen etc
5 - What is the java application, is it possible to get it for testing?
6 - Is the cpu utilization on the host high as well?
[/QUOTE]

  1. Yes.
  2. Yes (Hadoop and Cognos), each on it’s own VM of SLES SP2, same version of Java.
  3. Nope, I guess I can try that.
  4. Nope, will definitely try that.
  5. Hadoop and Cognos
  6. Yes. The fans start up too.

Did you try to look inside the JVM with jconsole?
If you didn’t, try it ( http://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html , http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html are the two docs I dig out of my bookmarks every time I need to refresh my memories with java - but chances are that you have more expertise in this area than me… ) I
'm quite sure that the number of Garbage Collections will be huge, because of the VM’s trashing… if not, you’ll still be able to see what happens.

[QUOTE=enovaklbank;5235]Did you try to look inside the JVM with jconsole?
If you didn’t, try it ( http://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html , http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html are the two docs I dig out of my bookmarks every time I need to refresh my memories with java - but chances are that you have more expertise in this area than me… ) I
'm quite sure that the number of Garbage Collections will be huge, because of the VM’s trashing… if not, you’ll still be able to see what happens.[/QUOTE]

Well after days of struggles, I finally found a solution. As suspeted, it was in fact a permissions problem. I found a file in the /tmp folder called .com_ibm_tools that was owned by root. When I chown’d that to my user, the server stopped thrashing.