Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBOSS using too much CPU

 
Dan Grindstaff
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dan Grindstaff
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dan Grindstaff
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Dan,

No problem. Please let us know what you find.

Kees Jan
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic