hi all,
does anybody know how to run a java program in 100% cpu usage? thanks!
Printable View
hi all,
does anybody know how to run a java program in 100% cpu usage? thanks!
nice/renice? In Windows the task manager lets you alter the priority of the various running tasks - it gives you a warning about "system instability" that should probably be taken heed of...
I have 2 cores, and if my java program has only one thread it only uses 50%. If I run 2 instances of the java program then it uses 100%. The JVM will only use 100% if it needs to. It must be a hefty task and more than one native thread.
Yeah, if its some single threaded app it makes no sense to try to use 100%, because modern cpus are multi-cored. If you make a multithreaded app (say 1 thread for each available core) it will use 100% cpu.