If you think you’re running your multi-core hardware in multi-core mode but your Java application doesn’t seem as snappy as it should be, then many you want to consider running the tests shown in Heinz Kabutz’s latest
newsletter and blog.
One of the attendies of Heinz’s Java 5 course was showing off his new mulit-core laptop. Everything seemed to be working great until the the exercise that measured
CPU cycles consumed by a thread.
as all good computer scientists know, you can never scale completely linearly on one machine, so as you approach a large number of CPUs, the factor will grow more slowly.
From this we could deduce that the student running the threading exercise should experience of scaling factor of 2. What they discovered was a scaling factor on this hardware was set at just below 1. After some investigation it was discovered that the machine was running a version of the Linux kernel that didn’t support multi-core hardware.
In addition to being a very nice demonstration of one of the new
Java 5 features, the test can quickly determine if your Linux installation is taking full advantage of any multi-core technology that you may have on your machine.