0

I am running a computation intensive (solving a number theory problem) standalone java program from eclipse on my Windows 7 machine. No other application is running.

Now I started task manager and see javaw.exe taking only ~50%. Even after raising priority to high, as suggested here, it still takes just 50%.

Is it possible to provide high CPU (say 90%) to this program?

2 Answers 2

8

The problem here is that your program is not designed with multithreading or multi processor based computation. Because of this the program is using, fully, one of the (im guessing) 2 cores of your machine.

Can you verify in the task manager tab "Performance" that one of the two boxes is showing full usage (100%) and one is low?

1
  • Note that with a 50% CPU use process on a dual core machine you probably won't see a 100%-0% split between cores, but more likely something like 85%-15% due to the process switching cores.
    – Joren
    Oct 9, 2012 at 12:25
5

If it is the only CPU intensive program running and it only gets ~50% CPU then there are two possible reasons:

  1. It is waiting for something else. (Often disk access)
  2. It is not multi threaded.
    With 50% this is most likely the case. Especially if you have a dual core CPU and the program is running flat out on one core, while the other core is idle.

Edit: You can test option 2 by starting two instances of the program. That will probably raise your CPU usage to 100%.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .