I’m working on a concurrency assignment that involves parallelizing a problem for performance. The problem involves a fair amount of blocking i/o so for my report I want to use and compare cpu usage of various approaches.
I’m new to profiling and I’ve started off with Java’s vitual vm, but even with multiple threads running a tight loop with no blocking I can’t seem to get above 50% cpu usuage. This would seem to be that only one of my two cores is being used.
How do I get my threads to use both cores? I’ve tried both manually creating threads and using the executor framework.
Thanks in advance
I don’t know what your code is doing, but this manages to put all my cores up to 100%…