About SBUs

Standard Build Units (SBUs) are a method of predicting approximately how long it will take to compile and install a package when building according to the instructions in the Linux from Scratch (LFS) or Beyond Linux from Scratch (BLFS) books.

In the books, we would like to give build times for each package, but it is not possible to give actual times that are anywhere near accurate. For example, the biggest package in LFS, glibc, won't take more than twenty minutes on the fastest systems, but will take something like three days on the slowest—no kidding. So instead of giving actual times, we've come up with the idea of using SBUs.

The concept of the SBU is simple: measure the time for building the first package in LFS and use that as a standard. This is designated 1.0 SBU. Then divide all the other times by the standard time to determine each package's SBU time.

For example, if the time it takes to build GCC for the first time is 3.9 SBU and on your system it took 10 minutes to compile and install the first program, Binutils, then you know it will take nearly 40 minutes to build the static GCC. Fortunately, most build times are much shorter than the one of Binutils.

Originally, the term SBU stood for Static Bash Unit becasue the Bash package was the first to be compiled in LFS and this package was compiled with static linking. Later the first package was changed to Binutils, so the acroynm stayed the same, but now stood for Static Binutils Unit. I have chosen to rename the term SBU to Standard Build Unit to make it a general term independent of the name of the first package to be installed.

How to measure SBUs

When we measure the time it takes to build a package, we use the time function built into bash. We do not include the time it takes to unpack the compressed source, but we do include everything else. The braces group the commands for both the time function and the redirection of all the output to a log file.


TIMEFORMAT='%1R Elapsed Time - $PROGRAM'
tar -zxvf $PROGRAM.tar.gz
pushd $PROGRAM
{ time \
  { 
    ./configure &&
    make &&
    make install
  }
} 2>&1 | tee ../build.log
popd

Of course the instructions and the $PROGRAM need to be customized for each package.

About this site

The purpose of this site is to provide more information about package SBUs. Here you can look at averages and also see the details of what other LFSers have done. You can also add your data to the database.

On the main page - Averages - Standard Deviations

On the main page is a table of the SBUs for LFS and BLFS. For each package, the average SBU measurement and the standard deviation of the measurement is listed for each package. The standard deviation is a measure of consistency. For instance, about 68% of all results fall within one standard deviation of the average and 95% fall within two standard deviations. The more values we have, the more meaningful are the results.

You can look for a specific system similar to yours

When you look at the data on the main page, you may want to find some data on a system similar to yours. You can look at the raw data for each system by selecting the "View" link on this page.

You can enter your times

Finally, you can help others. If, as you compile your packages, you measure the times on your system, you can enter them here. The averages on the main page will be updated immediately. You can enter more than one system if you choose. In the end, the data we have is only as good as what the LFS community make it. Your help is appreciated.