This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multi CPU configuration for a webapplication deployed on tomcat

 
Vijay Kumar koganti
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

can you let me know how can i configure Multiple CPU's on a unix box so that load is shared between two CPU's, currently my cpu utilization is as much as 100%..

Are there any special conifgs reqd.. and any links on the concept behind it.

regards,
vijay
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many users are working with your application when you notice that it uses only one CPU? It could be an issue with JVM which your Tomcat uses.
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Vijay,

Make sure you use a modern VM (Java 1.6) because locking strategies improved dramatically over time.

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

Also, start Tomcat using the -server flag.

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

From there, use thread dumps to analyze what your code is doing. Go through them to reduce lock contention and make your code more suitable for multi-processor machines.

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

Hope this gives you some starting points.

Kees Jan
 
Vijay Kumar koganti
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Misha Ver wrote:How many users are working with your application when you notice that it uses only one CPU? It could be an issue with JVM which your Tomcat uses.


there are 8 users that are using and the JVM i am using is :

java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic