how_long does it take...
- To install a specific module?
- To install the ISO?
- To recompile all my modules?
These questions get asked a lot by new lunar users and it is a very logical question: Lunar is after all a source distro and requires you to compile all the applications from source, which can sometimes take extremely long!
- System(CPU) speed
Double the CPU MHz, and you double the amount of instructions that a system can make per time unit. So, as a rule, a faster CPU results in faster compiles.
- Memory size
Compiling may require large amounts of memory, especially when compiling C++ applications. Generally, a compilation will go 50% faster if you have double the memory. So, if you only have 128MB of memory, you will speed up your compiles by 225% by increasing the amount of memory to 512MB. This might be worth the trip to the hardware store.
- Idle time
Compiling takes a long time. Every second that your system is doing something else, especially interactive tasks, reduces the amount of time that your system can compile applications.
- System architecture and components
Needless to say that a compile on a SATA hard disk is a lot faster than on a ATA-33 system. Especially with larger modules this is a very important factor.
'Some basic numbers'
The following numbers are from a Pentium 4 laptop system with 256 MB, running at 1.8GHz. This is a fairly normal system and if you wish to compare it with your own system, you should keep in mind that this system might be relatively slower or faster based on the influencing factors mentioned earlier.
The modules listed below are very common modules, so they should give you some good insight in how long it takes to compile and install something. Based on the size you can make rough estimates for new modules that you wish to install.
module source size installed size compile time gcc 27.6 257.3 120:45 XOrg 48.2 93.8 68:07 glibc 13.5 64.7 47:09 gtk+-2 11.8 34.5 26:08 perl 9.8 52.3 17:50
As you clearly can see there is some correlation between installed size and compile time, but there are many outliers in this trend: gtk+-2 comes with a lot of bitmaps and documentation, while the XOrg tarball is counted without documentation. The gcc compiler itself has a very elaborate bootstrap phase that takes almost half the time it takes to compile the target compiler. Many many module-specific factors are at work here.
'Estimating compile time'
If you correlate the size of the installed product or the source code size (in compressed form easily available), you get a very loose correlation shown in the graph below:
Above is correlated by install size (uncompressed size in kB against compile time in seconds), below is correlated against the size of the compressed source code tarballs (same scale).