Speedier

pudge on 2003-09-19T00:30:06

I noted previously that building perl on a dual G4/1.25 GHz / 1GB RAM was fast. Well, doing it on a dual G5/2.0 GHz / 2GB RAM is a lot faster. I set the processor peformance to "Highest" or whatever, from the default of automatic, because I am greedy. Building perl 5.8.0.

Configure -des, G4: real 1m3.518s user 0m19.540s sys 0m38.910s

Configure -des, G5: real 0m38.829s user 0m15.650s sys 0m20.830s

make -j3, G4: real 5m24.854s user 5m11.600s sys 1m17.350s

make -j3, G5: real 2m13.563s user 3m29.540s sys 0m48.700s

make -j3 test, G4: real 7m35.339s user 3m18.180s sys 1m2.870s

make -j3 test, G5: real 6m48.294s user 4m9.670s sys 0m36.290s

From beginning to end, the G4 did it all in 14:04. The G5 did it in 9:41. Taking away the tests, and it is more like 6:28 to 3:53.

Mmmmm, speedilicious.


-j2? -j4?

jhi on 2003-09-19T08:13:54

Just out of curiosity, it would be nice to know whether the traditional wisdom of overcommitting by one processor works (that is, is -j3 really faster than -j2), and also how much overovercommitting (-j4) trashes the systems?

Re:-j2? -j4?

pudge on 2003-09-19T16:07:53

I was kinda wondering the same thing myself ... but it takes so long to do each build, I don't want to spend the time doing the benchmarks! :-)

make -j2, G5:
real    2m11.921s
user    3m26.660s
sys     0m45.240s
make -j3, G5:
real    2m13.723s
user    3m29.480s
sys     0m49.440s
make -j4, G5:
real    2m25.240s
user    3m31.290s
sys     0m50.420s
make -j10, G5:
real    2m24.177s
user    3m30.840s
sys     0m50.500s
So it actually looks like -j2 is slightly faster. I did both -j2 and -j3 twice, with similar results: -j2 is faster by a good second or two. And I also did -j4 more times, with similar results (slower than -j2 and -j3 by at least several seconds).

One interesting note: Encode is always the last to finish. I wonder if making Encode begin to compile first would speed up the results somewhat. So with this run, I moved lib/auto/Encode/Encode.bundle to the beginning of dynamic_ext in the Makefile after Configure -des, and before make.

make -j2, G5, putting Encode first:
real    2m12.722s
user    3m26.750s
sys     0m47.140s
make -j3, G5, putting Encode first:
real    2m13.575s
user    3m30.260s
sys     0m48.490s
Hm. Never mind. In the last test there, Encode STILL finished last, BTW.

Re:-j2? -j4?

pudge on 2003-09-20T07:11:01

Just for the heck of it, on a dual proc Xeon/2.4GHz, also with 2GB RAM:

make -j3, Xeon:
real    1m29.770s
user    3m57.040s
sys     0m16.460s
make -j5, Xeon:
real    1m25.995s
user    4m59.250s
sys     0m18.930s
This machine does "hyper-threading", so it thinks it has four processors even though it has only two, hence the -j5 run. Doesn't seem to make much difference. Anyway, this Xeon compiles perl faster than the G5, by a lot. I don't know if it means anything, though.