ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Meyer <mike65...@yahoo.de>
Subject Re: Ant build slower on two cores than on one core?
Date Sat, 08 Mar 2008 10:02:58 GMT
 --- Steve Loughran <stevel@apache.org> schrieb: 
> this is really interesting. I'd thought javac was
> unthreaded too, but 
> even so you'd expect file IO to work in the other
> CPU, so get a boost 
> from the second core.
> 
> what happens when you try a different javac, like
> the eclipse one?

I have timed a very short compile run with different
JDKs on the same machine, 
using the same OS one time with both cores enabled,
the other time with only 
one core enabled. 

Result: the compile run using only one core was
significantly faster than the
one using both cores. This is true with every JDK I
tried.

So this might be an ant specific phenomenom? Maybe ant
is spawning threads?

Test methodology:
=================
- Processor: Intel Core 2 Duo E6600
- OS: Ubuntu Linux 8.04 with kernel 2.6.24-11-generic 
  (2.6.24.3 with ubuntu specific patches)
- The number of cores has been chenged by adding
"maxcpus=1" at 
  the grub boot command line
- Ant 1.7.0 from ant.apache.org
- JDKs: - Sun JDK 6 Update 4
      - Sun JDK 5 Update 15
      - IBM JDK 6
      - BEA JRockit JDK 6 Update 3
- Before every run I changed PATH to the specific JDK
location and tested 
  the PATH with java -version
- Then I executed ant clean ; ant compile ; ant clean
; sleep 5 ; time ant compile
  This way, every file is cached in RAM before the
last compile run is executed, 
  which is timed.

Test results:
=============
1 core:
-------
Sun JDK 6 Update 4: 
real	0m1.132s
user	0m1.032s
sys	0m0.056s

Sun JDK 5 Update 15:
real	0m1.143s
user	0m1.016s
sys	0m0.076s

IBM JDK 6:
real	0m1.135s
user	0m1.028s
sys	0m0.068s

BEA JRockit JDK 6 Update 3:
real	0m1.136s
user	0m1.064s
sys	0m0.028s

2 cores:
--------
Sun JDK 6 Update 4: 
real	0m1.582s
user	0m2.428s
sys	0m0.128s

Sun JDK 5 Update 15:
real	0m1.514s
user	0m2.208s
sys	0m0.116s

IBM JDK 6:
real	0m1.439s
user	0m2.164s
sys	0m0.084s

BEA JRockit JDK 6 Update 3:
real	0m1.619s
user	0m2.500s
sys	0m0.124s


JDK Versions:
-------------
$ java -version
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed
mode)

$ java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed
mode)

$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build
pxi3260-20071123_01)
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux
x86-32 jvmxi3260-20071121_15015 (JIT enabled)
J9VM - 20071121_015015_lHdSMR
JIT  - r9_20071121_1330
GC   - 20071031_AA)
JCL  - 20071118_01

$ java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
BEA JRockit(R) (build
R27.5.0-110-94909-1.6.0_03-20080204-1558-linux-ia32,
compiled mode)


CPU with one core enabled:
--------------------------
$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 CPU          6600  @
2.40GHz
stepping	: 6
cpu MHz		: 1600.000
cache size	: 4096 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep
mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr
sse sse2 ss ht tm pbe nx lm constant_tsc up
arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2
ssse3 cx16 xtpr lahf_lm
bogomips	: 4791.85
clflush size	: 64

CPU with two cores enabled: 
---------------------------
$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 CPU          6600  @
2.40GHz
stepping	: 6
cpu MHz		: 1600.000
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep
mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr
sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon
pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16
xtpr lahf_lm
bogomips	: 4791.87
clflush size	: 64

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 CPU          6600  @
2.40GHz
stepping	: 6
cpu MHz		: 1600.000
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep
mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr
sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon
pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16
xtpr lahf_lm
bogomips	: 4788.35
clflush size	: 64



      Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message