aspose file tools*
The moose likes Performance and the fly likes multiple processors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "multiple processors" Watch "multiple processors" New topic
Author

multiple processors

Kris Melotte
Greenhorn

Joined: Jan 24, 2002
Posts: 17
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

Joined: Oct 05, 2001
Posts: 1170

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

Joined: Jan 24, 2002
Posts: 17
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

Joined: Jul 23, 2002
Posts: 8
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 ]

--<br />Anurag
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
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


Java Resources at www.wbrogden.com
Anurag Jain
Greenhorn

Joined: Jul 23, 2002
Posts: 8
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

Joined: Mar 22, 2000
Posts: 12678
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple processors
 
Similar Threads
Configuring SSL on IBM WebSphere 6.0x on Solaris
cyclic reference in gc
Monitoring standalone java program
IRIX JRE 1.5?
JVM Multiple CPU Usage on Redhat