Difference between revisions of "Improving compilation time"

From Second Life Wiki
Jump to navigation Jump to search
(Benchmark results and conclusions)
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Improving compilation time ==
== Improving compilation time ==
Based on the benchmarks below, the following conclusions were made:
Based on the benchmarks below, the following conclusions were made:
* The more RAM, the better. Enough RAM will made the hard disk's performance irrelevant.
* The more RAM, the better. Enough RAM will make the hard disk's performance irrelevant.
* Using a RAM disk for /tmp or even the full system doesn't noticeably improve performance if enough RAM is present.
* Using a RAM disk for /tmp or even the full system doesn't noticeably improve performance if enough RAM is present.
* Given enough RAM, the process will be entirely CPU bound.
* Given enough RAM, the process will be entirely CPU bound.
Line 8: Line 8:
* Gentoo compiled 15% faster.
* Gentoo compiled 15% faster.
* Gentoo ran scons 50% slower.
* Gentoo ran scons 50% slower.


== Benchmarks ==
== Benchmarks ==


=== Hardware ===
=== Hardware ===
* Athlon 64 X2 5200+ (1MB cache)
* Athlon 64 X2 5200+ (1MB cache)
* 4GB ECC DDR2 666 RAM
* 4GB ECC DDR2 666 RAM
* Root on RAID-1, SAMSUNG HD300LJ and Maxtor 6V300F0
* Root on RAID-1, SAMSUNG HD300LJ and Maxtor 6V300F0


=== Settings ===
=== Settings ===
* Compiling with -j2
* Compiling with -j2
* llmozlib enabled
* llmozlib enabled
* building 32 bit SL version
* building 32 bit SL version
* Source from http://svn.daleglass.net/secondlife, rev 81.
* Source from http://svn.daleglass.net/secondlife, rev 81.
   
   
=== Software ===
=== Software ===
* Gentoo, x86_64, gcc 4.1.1  
* Gentoo, x86_64, gcc 4.1.1  
* Ubuntu Edgy, x86_64, gcc 4.1.2
* Ubuntu Edgy, x86_64, gcc 4.1.2


=== Methodology ===
=== Methodology ===
Line 81: Line 80:
|| || System || 0m4.599s || 0m4.360s || 0m3.546s || 0m3.258s
|| || System || 0m4.599s || 0m4.360s || 0m3.546s || 0m3.258s
|}
|}
[[Category:Compiling viewer]]

Latest revision as of 06:19, 1 July 2008

Improving compilation time

Based on the benchmarks below, the following conclusions were made:

  • The more RAM, the better. Enough RAM will make the hard disk's performance irrelevant.
  • Using a RAM disk for /tmp or even the full system doesn't noticeably improve performance if enough RAM is present.
  • Given enough RAM, the process will be entirely CPU bound.
  • A better hard disk will make a significant difference in link time if enough RAM can't be obtained.
  • Compiling using more processes (-j3 vs -j2) may be counterproductive if there's not enough RAM.
  • Gentoo compiled 15% faster.
  • Gentoo ran scons 50% slower.

Benchmarks

Hardware

  • Athlon 64 X2 5200+ (1MB cache)
  • 4GB ECC DDR2 666 RAM
  • Root on RAID-1, SAMSUNG HD300LJ and Maxtor 6V300F0

Settings

Software

  • Gentoo, x86_64, gcc 4.1.1
  • Ubuntu Edgy, x86_64, gcc 4.1.2

Methodology

Gentoo tests were done with /tmp on tmpfs.

Ubuntu tests were done with the whole install on /tmp on tmpfs, and the whole install on disk. This took about 1.5GB RAM:

  • 334MB for temporary files generated during compilation
  • 642MB for the source code
  • 462MB for the Ubuntu install (probably can be trimmed a bit)

Ubuntu tests were done as follows: Distribution was installed with debootstrap. Sources were copied into it (same copy as used for Gentoo). The whole tree, OS and sources included was copied to /tmp (on tmps), and chrooted into.

The "(on disk)" tests were done afterwards, by copying the whole tree (1.5GB) back to disk (as some changes were required to get the build going).

The "(after reboot)" were done as follows:

  1. Do required preparations (eg, binary removal)
  2. Reboot
  3. Login
  4. Chroot
  5. Build

X wasn't running during the tests.

Results

Benchmark results
Test Timings Gentoo Ubuntu (after reboot) Ubuntu (on disk) Ubuntu (on RAM disk)
Full build Real 16m44.594s 19m23.391s 19m12.447s 19m5.572s
User 29m25.549s 35m15.595s 35m23.223s 35m24.639s
System 2m57.599s 2m9.673s 2m16.113s 2m13.387s
Rebuild Real 0m41.752s 0m27.656s 0m15.457s 0m15.444s
User 0m39.938s 0m14.858s 0m14.963s 0m14.771s
System 0m1.722s 0m0.952s 0m0.644s 0m0.784s
Relink Real 1m24.408s 1m17.616s 0m41.092s 0m41.268s
User 1m12.687s 0m37.895s 0m37.455s 0m38.016s
System 0m4.599s 0m4.360s 0m3.546s 0m3.258s