Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CPU Usage  RSS feed

 
John Dunn
slicker
Ranch Hand
Posts: 1108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this is not a dumb question, but if an app is never using more than 9 or 10 % CPU Utilization, is that a sign of trouble? My app gets an inquiry (xml), parses, calls db and rebuilds an xml resposne. Does this sound odd? I'm on UNIX and we share the system with many apps. I only notice trouble in my app when OTHER systems are hogging the CPU. Should my app be at 100% as often as it can?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what you've said, I don't think there's any reason to be concerned. Chances are that the DB call is the slowest part of your system, or I/O - and if you're waiting for either of these, you're not using the CPU much during that wait. Which is fine, if there's really nothing else to do until the DB call comes back. Or maybe there is something else you could be doing, and you should start additional threads to take care of other tasks while waiting for the DB call to complete. Hard to say without more analysis. But it's not unusual for applications to come nowhere near 100% CPU utilization. If you're not actively observing a performance problem, you probably shouldn't worry about it. And if you are seeing a problem, you should probably use a profiler to figure out where the problem really is. There are always countless things that could be performance problems in a given program, and usually only one or two that actually are.
 
John Dunn
slicker
Ranch Hand
Posts: 1108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was hoping that was the case. Most of the time is probably spent waiting for data to be retrieved from a secondary system. (via URLConnection.) DB is relatively fast. So I may just add another JVM to each of my hosts and re-think how I handle the wait period from calls to the other system.

Thanks!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!