My java program takes 30-70% of CPU usage and 3% of Memory (I use TOP linux function).
I run a 32bits version of java.
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
Is there a way to make it faster ? Some optimization to un the java software ? (I don’t have the source code, so no source code optimization is possible).
Installing a 64bits of java would help ? some other optimization tricks ?
Hard to tell based on your description, but here are few tips:
Add:
JVM options. Frequently running GC may cause excessive CPU usage.
Using
topandjstackyou can easily discover which Java threads are consuming most of the CPU.Finally plug in some Java profiler (they don’t require sources) and examine results.
However wants you discover which threads/methods (stack traces and profiling will help you) consume the CPU, you cannot do anything more without the source code and ability to tweak it.