Name: boT120536 Date: 02/20/2001
stromboli:~/bench>java -version
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
The thread creation time on linux is too long.
My tests showed that 10 threads creation time take on linux is more than 1s,
less than 5ms on Solaris and is nearly not measurable on Windows 2000.
The linux internals book have with native code a thread creation time of
0.017ms (per thread). This looks to me like a bug and not a feature request
because this will slow any server kind of application.
My bench for thread creation time is :
class TestThread {
public static void main(String args[]) {
long nb_threads = Long.parseLong(args[0]);
System.out.println("Creating " + nb_threads + " threads");
long start_time= System.currentTimeMillis();
for (long il =0; il < nb_threads; il ++) {
Thread th = new Thread() {
public void run() {
int il = 0;
while (true) {
il++;
il--;
}
}
};
th.start();
long end_time = System.currentTimeMillis();
System.out.println("Time = " + (end_time-start_time));
}
}
(Review ID: 116703)
======================================================================
- duplicates
-
JDK-4445649 "java -version" hangs in Linux Redhat, Turbo, Caldera
-
- Closed
-
-
JDK-4358598 Linux: low performance of Hotspot running benchmarks/specV16/_225_shock/short te
-
- Closed
-
-
JDK-4436291 java -version hangs on few linux machines using b59
-
- Closed
-