not sure if this question should be here or in serverfault, but it’s java-related so here it is:
I have two servers, with very similar technology:
- server1 is Oracle/Sun x86 with dual x5670 CPU (2.93 GHz) (4 cores each), 12GB RAM.
- server2 is Dell R610 with dual x5680 CPU (3.3 GHz) (6 cores each), 16GB RAM.
both are running Solaris x86, with exact same configuration.
both have turbo-boost enabled, and no hyper-threading.
server2 should therefore be SLIGHTLY faster than server1.
I’m running the following short test program on the two platforms.
import java.io.*;
public class TestProgram {
public static void main(String[] args) {
new TestProgram ();
}
public TestProgram () {
try {
PrintWriter writer = new PrintWriter(new FileOutputStream("perfs.txt", true), true);
for (int i = 0; i < 10000; i++) {
long t1 = System.nanoTime();
System.out.println("0123456789qwertyuiop0123456789qwertyuiop0123456789qwertyuiop0123456789qwertyuiop");
long t2 = System.nanoTime();
writer.println((t2-t1));
//try {
// Thread.sleep(1);
//}
//catch(Exception e) {
// System.out.println("thread sleep exception");
//}
}
}
catch(Exception e) {
e.printStackTrace(System.out);
}
}
}
I’m opening perfs.txt and averaging the results, I get:
- server1: average = 1664 , trim 10% = 1615
- server2: average = 1510 , trim 10% = 1429
which is a somewhat expected result (server2 perfs > server1 perfs).
now, I uncomment the “Thread.sleep(1)” part and test again, the results are now:
- server1: average = 27598 , trim 10% = 26583
- server2: average = 52320 , trim 10% = 39359
this time server2 perfs < server1 perfs
that doesn’t make any sense to me…
obviously I’m looking at a way to improve server2 perfs in the second case. there must be some kind of configuration that is different, and I don’t know which one.
OS are identical, java version are identical.
could it be linked to the number of cores ?
maybe it’s a BIOS setting ? although BIOS are different (AMI vs Dell), settings seem pretty similar.
I’ll update the Dell’s BIOS soon and retest, but I would appreciate any insight…
thanks
I actually updated the BIOS on the DELL R610 and ensured all BIOS CPU parameters are adjusted for best low-latency performances (no hyper-threading, etc…).
it solved it. The performances with & without the Thread.sleep make sense, and the overall performances of the R610 in both cases are much better than the Sun.
It appears the original BIOS did not make a correct or a full usage of the nehalem capabilities (while the Sun did).