MegaGlest Forum

MegaGlest => MegaGlest => Topic started by: andy_5995 on 6 April 2016, 21:04:59

Title: speed up build time with distcc
Post by: andy_5995 on 6 April 2016, 21:04:59
Last week I experimented building MG using 'distcc' to speed up build time.
Normally I build on a quad-core 3.2G machine. I distributed (using distcc) the build to a second computer 2 cores @2.4 g. The build went from ~8 minutes to ~5 minutes
Title: Re: speed up build time with distcc
Post by: titi on 8 April 2016, 09:30:13
8 Minutes ???? Thats really a lot.
How do you build typically ? Do you use the script build-mg.sh in mk/linux ?
This sets the number of cores correctly and by this the build should not take so long :-/

If you run cmake manually followed by a make call, you should add the -j option to the make call, setting the number of cores which will be used.
So with 4 cores you do:
make -j4

If you have an Intel CPU with hyperthreading, you can try to run with -j8, but I don't know how much faster it will be.
Title: Re: speed up build time with distcc
Post by: filux on 8 April 2016, 16:22:20
well 4 cores + "gcc5+" = 8 minutes sounds ok for me,
take a look for some travis' results: https://travis-ci.org/MegaGlest/megaglest-source
Title: Re: speed up build time with distcc
Post by: andy_5995 on 8 April 2016, 16:39:59
Seems like gcc5 isn't on Debian stable yet.

version info:
gcc (Debian 4.9.2-10) 4.9.2

Yes, I'm using build-mg.sh from mk/linux, and it's using all 4 cores.

Title: Re: speed up build time with distcc
Post by: filux on 8 April 2016, 17:06:17
I didn't have version 4.9 for long but it was somehow like this: ~4.8 ok -> ... ~4.9 a bit slower  :| ... -> ~5.0 even slower again ;D
Title: Re: speed up build time with distcc
Post by: titi on 8 April 2016, 21:44:06
I still have gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
AMD Phenom(tm) II X4 965 Processor 3.4 Ghz + a normal harddisk ( no SSD )

For me it takes 3:20 to compile.

Dow you have intel mobile versions or why are they running so slow ?
Title: Re: speed up build time with distcc
Post by: andy_5995 on 10 April 2016, 04:15:41
No, not Intel mobile versions.

# hdparm -t /dev/sda

/dev/sda:
 Timing buffered disk reads: 366 MB in  3.01 seconds = 121.57 MB/sec

I still have gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
AMD Phenom(tm) II X4 965 Processor 3.4 Ghz + a normal harddisk ( no SSD )

For me it takes 3:20 to compile.

Dow you have intel mobile versions or why are they running so slow ?