 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

24th October 2012, 10:14 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 3

|
|
100% CPU consumption with 3.6.2-4 kernel and Java
After updating my kernel to 3.6.2-4 a Java process frequently consumes 100% sys time of all CPU cores for 30 seconds to several minutes. Everything works normally in between. I've tried using different JVM's but that makes no difference. Reverting back to my previous kernel 3.5.6-1 makes the problem go away.
Has anyone else seen this?
|

5th November 2012, 06:15 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: Ottawa
Posts: 7

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Quote:
Originally Posted by thhal
After updating my kernel to 3.6.2-4 a Java process frequently consumes 100% sys time of all CPU cores for 30 seconds to several minutes. Everything works normally in between. I've tried using different JVM's but that makes no difference. Reverting back to my previous kernel 3.5.6-1 makes the problem go away.
Has anyone else seen this?
|
Yup, I am seeing the same thing with a Maven build using JDK 1.7.0_07 on kernel 3.6.2-1. I used the Kernel ftrace mechanism, and it seems to have something to do with migrating pages... here are some results from the ftrace:
http://pastebin.com/DDfqgWm0
Last edited by rocketraman; 5th November 2012 at 06:18 AM.
|

5th November 2012, 08:18 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Quote:
|
Yup, I am seeing the same thing with a Maven build using JDK 1.7.0_07 on kernel 3.6.2-1
|
You can try JDK 1.7.0_09 , it's recently come out
http://www.oracle.com/technetwork/ja...ads/index.html
|

5th November 2012, 09:00 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 3

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Switching JDK doesn't help much I'm afraid. I'm now testing Kernel 3.6.3-1 and JDK 1.7.0_09-idedtea and I'm still seeing this. I've even tested with JDK 1.6 to no avail.
At first I thought it was the infamous leap-second bug but the remedy for that (stopping ntpd, setting date, starting ntpd again) doesn't help.
|

5th November 2012, 02:11 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: Ottawa
Posts: 7

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Yup, I confirm that here as well -- JDK 1.7.0_09 doesn't help.
Something that *does* help (but only temporarily) is:
$ sudo sh -c 'sync ; echo 3 >/proc/sys/vm/drop_caches ; sync'
This stops the CPU going to 100% for a while, but the problem eventually comes back again.
|

5th November 2012, 02:54 PM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 1,158

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
There have been numerous reports of high CPU use with kernel 3.6.x. Its killing notebook battery life. This is the first report I've read regarding Java.
__________________
Fedora 18 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)
|

6th November 2012, 07:08 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: Ottawa
Posts: 7

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Upgraded to kernel 3.6.5 on F16 today, and so far this problem seems to be fixed.
|

7th November 2012, 04:49 PM
|
 |
Registered User
|
|
Join Date: Oct 2012
Location: Fort Wayne, IN
Posts: 1,109

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Try to give the process a very low priority. That's really all I can think of at the minute.
|

7th November 2012, 05:40 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: Ottawa
Posts: 7

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Quote:
Originally Posted by Ihatewindows
Try to give the process a very low priority. That's really all I can think of at the minute.
|
FYI -- nice had no effect on this issue.
|

7th November 2012, 05:53 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 88

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Quote:
Originally Posted by rocketraman
FYI -- nice had no effect on this issue.
|
I thought it might have fixed the problem as well but it seems that the problem doesn't manifest itself until the computer has been running for a while.
A workaround that I have found that seems to work (until the problem gets properly fixed) is to turn transparent hugpage defragging off:
echo never > /sys/kernel/mm/transparent_hugepage/defrag
|

7th November 2012, 09:00 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Location: Ottawa
Posts: 7

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Quote:
Originally Posted by dciarnie
I thought it might have fixed the problem as well but it seems that the problem doesn't manifest itself until the computer has been running for a while.
|
Yup, I am seeing this as well -- ignore my earlier message about kernel 3.6.5 fixing it.
Quote:
Originally Posted by dciarnie
A workaround that I have found that seems to work (until the problem gets properly fixed) is to turn transparent hugpage defragging off:
echo never > /sys/kernel/mm/transparent_hugepage/defrag
|
This does seem to work.
|

7th November 2012, 10:07 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Maybe related maybe not but I've seen Firefox freeze for ~30 seconds at a time on a few occassions w/ the recent kernel. It's not waiting on network. Won't scroll or respond to buttons or anything local.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
|

14th December 2012, 08:05 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 133

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
I've seen reports of this from various co-workers but have not actually run into this problem myself til recently. Just now, I was having the issue, found this post and disabled transparent hugepage defrag and the problem appears to go away.
Is transparent hugepages the same as AnonHugePages?
$ cat /proc/meminfo | grep HugePages
AnonHugePages: 796672 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
|

14th December 2012, 09:40 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
Some of the tools that come with the JDK will show at least some information on what the threads are doing:
pgrep java ---> will show the PID(s) of the Java process(es)
jstack -m <pid> (mixed format)
or
jstack -l <pid> (long format)
passing the PID from pgrep java as the argument where I have "<pid>"
Another good tool would be jvisualvm which comes with the JDK also, you'd just run it and select the offending process from the "Local" list and review what it's doing.
|

14th December 2012, 09:51 PM
|
|
Registered User
|
|
Join Date: Nov 2008
Posts: 133

|
|
|
Re: 100% CPU consumption with 3.6.2-4 kernel and Java
If you look at the java threads, they aren't doing anything abnormal other than what they are normally doing. The fact that the transparent_hugepages/defrag workaround works, really does imply that this is a problem with hugepage defrag algorithm causing things to go out to lunch.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
64 bit power consumption
|
LinuxHippy |
Using Fedora |
7 |
4th November 2005 05:50 AM |
|
CPU consumption
|
luca |
Using Fedora |
3 |
27th August 2004 12:14 PM |
Current GMT-time: 02:40 (Wednesday, 22-05-2013)
|
|
 |
 |
 |
 |
|
|