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

Java.exe consumes high cpu utilization  RSS feed

 
Ola Agiv
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our application run in Oracle9iAS 1.0.2.2 on Win2000, Apache as proxy, and access Oracle9i databese.
Some times the Java.exe consumes high cpu utilization (50%-60%).
When it happen, the performance is very bad. Clients can't access the site, they have "Bad Gateway" error.
Restart of OC4J released it. But once it was released by itself after 1 hour (it's too mach for live sales site).
Is anybody have some idea?
[ February 05, 2004: Message edited by: Ola Agiv ]
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have memory leaks (i.e. does the java.exe process size grow constantly)? make sure that every ResultSet, Statement and Connection gets closed in a finally block (so if an exception occurs it gets closed anyway). If you don't explicity close Connections they may remain open, consuming valuable resources. Since you have Oracle, are you making use of the Oracle connection pool?
Check what gets stored in session variables, if you are using them. If they are storing tons of information they may be starving your system of memory. You may have to make some comprimises on what gets stored in the session or lower your session time-out.
If the problems aren't that obvious, use a profiler like JProbe or Optimizeit to find out what is consuming resources. They will also help identify processing bottlenecks.
Since you have high CPU utilization, make sure your hardware is up to the task. Enterprise systems require enterprise hardware. A "fast" PC with 256megs of ram just won't cut it if you have more than a few users.
You may want to split your database and application server onto two seperate machines. The network overhead shouldn't hurt too much and the computers won't waste time switching between the DB and the app server constantly.
[ February 10, 2004: Message edited by: Joe Ess ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!