Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple processors

 
Kris Melotte
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
We are running a website on a solaris 8 sparc machine with 2 processors. We are using 32bit JDK 1.4 and JRun 3.0. As traffic increases on the site we noticed that cpu idle time is low during peak hours. How can we now if adding a processor will help? (versus rewriting parts of our application such that it will be more performant)
We already increased the memory for the JVM to 700MB.
Is there any good documentation around on the net about the allowed JVM params for Solaris. I also heard about different threading models but I did not find any good documentation about this.
Would it be better to use the 64bit JDK which is also available?
Thanks and best regards,
Kris
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you said processor idle time was low, this is perfect indication that adding a processor will help. You dont have to look too deep for the answer sometimes.

Is their something which makes you question adding another processor? I wouldnt say add automatically. If you were running a single processor adding a 2nd might not do anything. But since you program can already handle 2 it will likely be able to handle more.
You should still optimize your code.
 
Kris Melotte
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, we upgraded to a new Solaris machine with 4 processors. With the same load on the site the cpu avg idle time is more than 60%.
We are using Jrun as our application server. How much memory should we allocate with the -Xms and -Xmx parameters?
And also: how many threads should jrun use? we can set a minimum and maximum thread pool size. We have increased the max from 150 to 300.
Is there any documentation on best practices for setting these numbers?
kris
 
Anurag Jain
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranch Members,

I am looking for an answer on "performance change due to increase in number of threads". I have seen considerable change ( :roll: both improvement as well as degradation) in performance by adding number of threads.

I have a cpu intensive java application which spawns multiple threads withing a JVM. Does anyone has insight into max number of threads which is recommended per JVM.

Thanks
[ April 21, 2006: Message edited by: Anurag Jain ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Instead of hijacking this ancient forum thread you should have started a new one.
2. If your application is indeed "cpu intensive" then adding more Threads is unlikely to help. Threads only help when the CPU is spending a significant amount of time waiting on something, such as network IO.
3. Im having a hard time imagining an application that you can just add Threads to arbitrarily - what does this application do?

Bill
 
Anurag Jain
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill,

Application is for high volume (in memory) data mining and processing of data. You said adding threads would not make a difference since there is low cpu wait time. Do you have any other suggestions?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming that the CPU is not wasting much time waiting for IO, it is time to try to optimize the algorithms it is using. You need to first use a profiler find the code areas where the most time is spent, then carefully examine the code.

JProbe is a well regarded commercial profiller with a free evaluation download.

The web is full of sites on improving Java performance.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic