Jump to content
Excelsior Forums
ozzo

Performance with background application running

Recommended Posts

When I start background application that takes all idle CPU time (in my case that was 7zip archiver in background mode) my JET compiled application use only 2-5% of CPU time. Without background application it normally takes 10-20% CPU time.

JET application has normal priority. Background application has idle priority.

Question: is it possible to tune jet to use all it's 'foreground' CPU?

Or is it JET bug/feature :)

OS:WindowXP SP2

JET:4.8 evaluation.

JAVA:1.5.0_09

CPU:AMP athlon64

Share this post


Link to post
Share on other sites

So, do you notice that throughput of your application is decreased in background mode?

By the way, how does the application behave when it is running with Sun JRE 1.5.0_09?

Share this post


Link to post
Share on other sites

So, do you notice that throughput of your application is decreased in background mode?

To be precisious, throughput of my application(running in normal mode) is decreased when another CPU consuming application is runing in background mode.

By the way, how does the application behave when it is running with Sun JRE 1.5.0_09?

I don't see any throughput decrease when running on Sun JRE 1.5.0

I'll try to create single test case that reproduces this problem.

Share this post


Link to post
Share on other sites

import java.math.BigInteger;

public class Speed {

? public static void main(String[] args) {
? ? int n = 20000;
? ? 
? ? while (true) {
? ? ? long time = System.currentTimeMillis();
? ? ? calculateFactorial(n);
? ? ? time = System.currentTimeMillis() - time;

? ? ? System.out.println((time) + "ms");
? ? }
? }

? private static String calculateFactorial(int i) {
? ? BigInteger multiplier = BigInteger.ONE;
? ? BigInteger result = BigInteger.ONE;
? ? for (int j = 0; j < i; j++) {
? ? ? result = result.multiply(multiplier);
? ? ? multiplier = multiplier.add(BigInteger.ONE);
? ? }
? ? return result.toString(10);
? }

}

Small case that demonstrates the problem.

If you start this application, you'll see some numbers (how many ms is taken to compute factorial of 20000).

If you'll start some backgroung CPU consuming application (for example 7zip archiver in background mode) then you'll see after some time that numbers became much larger.

On Sun JVM you won't see such behaviour.

P.S. this program runs until interupted....

Share this post


Link to post
Share on other sites

OK, thank you for the code. We'll check it on our side.

Could you also post here the following values you obtain with both Sun JRE 1.5.0_09 and Excelsior JET 4.8, provided no other processes run:

1) Exact time result values

2) CPU load values

3) Heap size set for the test

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×