# Java spikes CPU to 100%

**URL:** <https://forums.suse.com/t/java-spikes-cpu-to-100/22766>\
**Category:** SLES Configure-Administer\
**Created:** [June 20, 2012, 7:44pm UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766 "2012-06-20T19:44:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert\_leroy](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@robert\_leroy](https://forums.suse.com/u/robert_leroy)\
**Post date:** [June 20, 2012, 7:44pm UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/1 "2012-06-20T19:44:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 20, 2012, 8:17pm UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/2 "2012-06-20T20:17:23Z")

</div>

> [@robert leroy](#):
>
> Hi -
> 
> I’m new to configuring SLES. I have SP2:
> 
> ## -SUSE Linux Enterprise Server 11 (x86\_64) VERSION = 11 PATCHLEVEL = 2
> 
> 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.
> 
> - 
> 
> 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-
> 
> 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://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](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

---

<div class="post-metadata">

**Author:** ![robert\_leroy](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@robert\_leroy](https://forums.suse.com/u/robert_leroy)\
**Post date:** [June 20, 2012, 10:30pm UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/3 "2012-06-20T22:30:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 21, 2012, 12:34am UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/4 "2012-06-21T00:34:59Z")

</div>

> [@robert leroy](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![robert\_leroy](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@robert\_leroy](https://forums.suse.com/u/robert_leroy)\
**Post date:** [June 21, 2012, 4:50am UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/5 "2012-06-21T04:50:24Z")

</div>

[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.

---

<div class="post-metadata">

**Author:** ![enovaklbank](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@enovaklbank](https://forums.suse.com/u/enovaklbank)\
**Post date:** [June 22, 2012, 3:12pm UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/6 "2012-06-22T15:12:09Z")

</div>

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://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html) , [http://www.oracle.com/technetwork/java/gc-tuning-5-138395.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.

---

<div class="post-metadata">

**Author:** ![robert\_leroy](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@robert\_leroy](https://forums.suse.com/u/robert_leroy)\
**Post date:** [July 3, 2012, 5:00am UTC](https://forums.suse.com/t/java-spikes-cpu-to-100/22766/7 "2012-07-03T05:00:59Z")

</div>

[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://docs.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html) , [http://www.oracle.com/technetwork/java/gc-tuning-5-138395.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.
