This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes JBOSS using too much CPU Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBOSS using too much CPU" Watch "JBOSS using too much CPU" New topic
Author

JBOSS using too much CPU

Dan Grindstaff
Ranch Hand

Joined: Sep 24, 2006
Posts: 138
Hello All, Wondering if anyone has had experience with JBOSS EAP 4.3 using too much CPU and how the issue was resolved. TIA.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

In several instances I had customers complain that AS or EAP was using a lot of CPU cycles even when no-one was using any of the apps. In all of those cases I had them take thread dumps and look for infinite loops in their code. They found them (one customer swore up and down that there were none, it must be a AS/EAP issue, until they located the loop in their code), fixed them, and the problem went away.

Does that help solve the problem? If not, then a little more information would be helpful: tellthedetails

JBoss In Action
Dan Grindstaff
Ranch Hand

Joined: Sep 24, 2006
Posts: 138
Hi Peter! and thanks for the reply! I have the boot, server and log4j logs and reviewing them. I am working on the JBOSS admin side but I also am a developer so I will have to make a special request to look at the code but I will. What boggles me is that I set up the server fresh on my localhost (Winblows) and no problems and when I set it up on the remote host (linux) I started seeing these problems. I am really not sure what additional ino to provide to help but I have a ticket open with JBOSS support so maybe there is some light to be shed there. I will come back to the post later after I have reviewed the code. Thanks again! Dan.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I am really not sure what additional ino to provide to help

I have no idea which JVM you are using.
I have idea of what types of applications you have deployed to JBoss AS. (WAR? EAR? MDBs? EJBs)
I have no idea of what kinds of frameworks, Java EE components, or third party libraries the apps use. (Spring? JSF? JPA? EJB 2.x or 3? Grails? Seam?)
I now know that you are seeing the problem on Linux (I didn't know that before), but I still don't know which distro.
I have no idea of what type of load you are placing on the apps.
I have no idea of what you mean by "too much CPU". (Is it 100%, 50%, 25%???)
I have no idea of whether you are using a database or which one.
I have no idea of whether the "too much CPU" usage is sporadic (such as "when we deploy/redeploy", "when we have over 100 users logged in", etc.) or constant.

Now, providing all of the above information does not guarantee that I will have a solution. In fact I will probably ask things like:
Are you noticing poor response times?
What JVM arguments are you setting (heap size, etc)?
But by providing the above information I will at least have some idea of the things that you know and you assume as background information for any discussion. It is sort of like "session information" for this post.
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Dan,

About thread dumps: here is a short intro into how to get started with those. Basically, use jstack and a lot of common sense.

http://java-monitor.com/forum/showthread.php?t=317
http://java-monitor.com/forum/showthread.php?t=616

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Dan Grindstaff
Ranch Hand

Joined: Sep 24, 2006
Posts: 138
Thank you!
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Dan,

No problem. Please let us know what you find.

Kees Jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBOSS using too much CPU
 
Similar Threads
jboss 4.2.3 takes 3 mintues!! to come up, the cpu usage is 100%
Reducing CPU Utilization using jboss-cache 1.2.4
J2EE performance tool (free/to WebLogic Server?)
About javaw
making multiple threads sleep and waking them up