Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th October 2012, 10:14 AM
thhal Offline
Registered User
 
Join Date: Jan 2011
Posts: 3
linuxchrome
Question 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?
Reply With Quote
  #2  
Old 5th November 2012, 06:15 AM
rocketraman Offline
Registered User
 
Join Date: Nov 2012
Location: Ottawa
Posts: 8
linuxchrome
Re: 100% CPU consumption with 3.6.2-4 kernel and Java

Quote:
Originally Posted by thhal View Post
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.
Reply With Quote
  #3  
Old 5th November 2012, 08:18 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,997
linuxfirefox
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
Reply With Quote
  #4  
Old 5th November 2012, 09:00 AM
thhal Offline
Registered User
 
Join Date: Jan 2011
Posts: 3
linuxchrome
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.
Reply With Quote
  #5  
Old 5th November 2012, 02:11 PM
rocketraman Offline
Registered User
 
Join Date: Nov 2012
Location: Ottawa
Posts: 8
linuxchrome
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.
Reply With Quote
  #6  
Old 5th November 2012, 02:54 PM
David Batson Offline
Registered User
 
Join Date: Jul 2009
Posts: 1,234
windows_7opera
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 19 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)
Reply With Quote
  #7  
Old 6th November 2012, 07:08 PM
rocketraman Offline
Registered User
 
Join Date: Nov 2012
Location: Ottawa
Posts: 8
linuxchrome
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.
Reply With Quote
  #8  
Old 7th November 2012, 04:49 PM
Ihatewindows Offline
Banned
 
Join Date: Oct 2012
Location: Fort Wayne, IN
Posts: 1,135
linuxopera
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.
Reply With Quote
  #9  
Old 7th November 2012, 05:40 PM
rocketraman Offline
Registered User
 
Join Date: Nov 2012
Location: Ottawa
Posts: 8
linuxchrome
Re: 100% CPU consumption with 3.6.2-4 kernel and Java

Quote:
Originally Posted by Ihatewindows View Post
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.
Reply With Quote
  #10  
Old 7th November 2012, 05:53 PM
dciarnie Offline
Registered User
 
Join Date: Jun 2004
Posts: 102
linuxfirefox
Re: 100% CPU consumption with 3.6.2-4 kernel and Java

Quote:
Originally Posted by rocketraman View Post
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
Reply With Quote
  #11  
Old 7th November 2012, 09:00 PM
rocketraman Offline
Registered User
 
Join Date: Nov 2012
Location: Ottawa
Posts: 8
linuxchrome
Re: 100% CPU consumption with 3.6.2-4 kernel and Java

Quote:
Originally Posted by dciarnie View Post
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 View Post
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.
Reply With Quote
  #12  
Old 7th November 2012, 10:07 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,696
linuxfirefox
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
Reply With Quote
  #13  
Old 14th December 2012, 08:05 PM
wangmaster Offline
Registered User
 
Join Date: Nov 2008
Posts: 145
linuxchrome
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
Reply With Quote
  #14  
Old 14th December 2012, 09:40 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,997
linuxfirefox
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.
Reply With Quote
  #15  
Old 14th December 2012, 09:51 PM
wangmaster Offline
Registered User
 
Join Date: Nov 2008
Posts: 145
linuxchrome
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.
Reply With Quote
Reply

Tags
100%, consumption, cpu, java, kernel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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:18 (Thursday, 24-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat