<---- template headericclude ----->
100% CPU consumption with 3.6.2-4 kernel and Java - Page 2
FedoraForum.org - Fedora Support Forums and Community
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Join Date
    Nov 2012
    Location
    Ottawa
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    @wangmaster: Agreed.

    I'm still seeing this on the latest F16 kernel:

    # uname -a
    Linux edison 3.6.7-4.fc16.x86_64 #1 SMP Tue Nov 20 20:33:31 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

  2. #17
    Join Date
    Nov 2012
    Location
    Ottawa
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    Still happening on 3.6.10:

    Code:
    # uname -a
    Linux edison 3.6.10-2.fc16.x86_64 #1 SMP Tue Dec 11 18:55:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    Does anyone have any links to any upstream bug reports or mailing lists where this issue is being discussed? Here are some links I have found, but neither contains any upstream / root cause info:

    http://structureddata.org/2012/06/18...oop-workloads/
    http://bugs.centos.org/view.php?id=5716
    Last edited by rocketraman; 3rd January 2013 at 06:04 PM.

  3. #18
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    11,362
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    What java process is it that's running? A typical Fedora system doesn't have Java code running very much. The browser will run the plugin for java occasionally.


    Running 'jvisualvm' will let you use VisualVM to examine the java vm.
    Just run "jvisualvm" from a terminal and
    from the Applications page on the left side, pick the entry under the "Local" label that's not VisualVM,
    it's likely the only other one in the list and just below it.
    With it selected, right mouse click it and pick "Open". Now you should have tabs on the right of the tool showing the "Overview", "Monitor", "Threads", "Sampler" and "Profiler".
    Go to the Overview and in the "System properties" the "user.dir" will show you where the java class is running from and "sun.java.command" will be the name of the class.

    Another option is:
    jstack `pgrep java`
    which will show the stack of the process, only do that if `pgrep java` only shows one pid. From the jstack listing, you can frequently see what the "main" is doing (the main function) and what the class is called (bolded here). Here is the main jstack listing for a simple class I wrote that just sleeps in a thread:
    "main" prio=10 tid=0x00007ffabc007800 nid=0x5cc6 waiting on condition [0x00007ffac15f4000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    a Test.main(Test.java:8)
    PS. you'll only have jstack and jvisualvm available on your system if you have the JDK installed
    Last edited by marko; 5th January 2013 at 09:29 PM.

  4. #19
    Join Date
    Jun 2004
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    You are quite right that a typical Fedora system does not have many, if any, Java processes running but this isn't about unknown java processes.

    The problem is that ever since kernel 3.5.x came out, CPU usage on all cores goes to 100% when running javac (but seemingly only when the system has been running for some time). The issue seems to be transparent huge pages since disabling defrag eliminates the problem. This problem was not present with the 3.4.x kernels and since I haven't changed the version of Java that I've been using, the cause would seem to be huge pages, not Java.

    Note that I am intentionally referring to javac and not java since I have only noticed the problem with builds and my IDE, not with running the code. The problem may still be there with java but the build process places more demands on the system.

    Note that I have submitted a bug report on the Redhat bugzilla site: https://bugzilla.redhat.com/show_bug.cgi?id=892212

  5. #20
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    11,362
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    Note that I am intentionally referring to javac
    Okay, apparently this is the first time in the thread that someone specifically said it was only javac that runs 100% on the cpu and not the "java process" as was stated in post #1. So the problem only occurs during the compile of Java code?

    I've not seen this problem but I almost never use the openjdk JDK, I usually compile with the Oracle JDK (currently using 1.7.0u10 and 1.8.0-ea (JDK 8 early access). Is everyone seeing this only using Openjdk? I see post #4 suggests the JDK maker doesn't matter so this would suggest some kind of common memory algorithm is a problem.
    Last edited by marko; 5th January 2013 at 11:13 PM.

  6. #21
    Join Date
    Jun 2004
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    I am also using Oracle's java but I'm using 1.6.

  7. #22
    Join Date
    Nov 2008
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    I've noticed it in both javac and java processes. I'm a developer for a large application server that is generally configured for huge amounts of heap. I tend to run -Xmx2048m for development.

    And yeah, both compilation and the java processes cause it to go out to lunch.

    We've noticed cases where khugepaged actually starts to consume CPU too. From what research I was able to dig up, that does periodic defrag. I've considered disabling that (although the risk there is memory fragmentaiton causing effectively memory "loss") or completely disabling transparent huge pages.

  8. #23
    Join Date
    Mar 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 100% CPU consumption with 3.6.2-4 kernel and Java

    I have high performance highly threaded software all written in c++ which loads and processes imagery. This problem is utterly killing me. What's worse is that one of our software packages can be downloaded and run by end users in demo mode (not requiring root to install).

    So a customer can pull down our linux tarball to test it, drop it in and *poof* spinlock kill their system. And I have to go through a long explanation as to why it's the fault of the kernel developers and distribution maintainers and they have to do all this song and dance to stop huge page defragmentation if they want to run our demo program. This goes over like a lead brick.

    The bad part is the first customer we had who wanted to explore migrating to linux installed like 5 different linux distros (including fedora) and all of them tanked with this problem. Thankfully I figured out "perf top" and was finally able to identify why everything was tanking. But that one customer abandoned looking at linux entirely.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. 64 bit power consumption
    By LinuxHippy in forum Using Fedora
    Replies: 7
    Last Post: 4th November 2005, 06:50 AM
  2. CPU consumption
    By luca in forum Using Fedora
    Replies: 3
    Last Post: 27th August 2004, 12:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]