I have a relatively simple program that currently uses 1 thread (main). The application takes about 30 minutes to complete. However, according to Task Manager, it is only using 25% of processing power. It seems that it’s spread over my processor’s 4 cores.
Is there a way to ‘make’ the JVM use more resources?
There is a lot of reading and writing to file, also. Could this be a bottle-neck and thus the reason that only 25% of processing resources are being used?
Thanks
If you’ve only got a single thread and four cores, then pretty much by definition you can only use 25% of the total processing power. It doesn’t matter much if that thread hops between processors.
If you want to make the JVM use more resources, you’ll need to parallelize the operation. We can’t really help you do that without more information about the task.
As for reading and writing files – that wouldn’t be a CPU bottleneck, but it could prove to be a bottleneck in other areas.