kcbench - Kernel compile benchmark 

## About

Kcbench compiles a Linux kernel to benchmark a system or test system stability


## Available options:

 --compiledir <path>      
   Use the subdirectory kcbench in <path>/ for compile results -- passes
   'O=<path> /kcbench/' to make when calling it to compile a kernel; use a
   tempdir if not given

 --ignore-running-apps
   Do not warn if cron or other daemons run in the background; the results
   might not be stable when those run and call jobs that consume CPU time or
   do a lot of I/O

 --infinite 
   run endlessly to test system stability

 --iterations <int>
   Number or iterations per number of jobs (default: 3)

 --jobs <int> 
   Number of jobs to use ('make -j #'); option can be given multiple times
   (default: number of CPUs * 2)

 --no-cachefill
   Omit the initial kernel compile to fill caches; saves time, but first
   result might be slightly lower then the following ones

 --verbose
   Increase verboselevel; option can be given multiple times

 --savefailedlogs <path> 
   Save log of failed compile runs in <path>

 --src (<path>|<version>) 
   Take sources in <path> or from /usr/share/kcdata/linux-<version>

 --help
   Show usage

 --version
   Output program version


## Examples:

 $ kcbench
   Takes newest kernel from /usr/share/kcdata/ and compiles three times

 $ kcbench--iterations 3 --jobs 2 --jobs 4
   Compile 3 times with 2 jobs and three times with 4 jobs


## Example output:

$ kcbench --iterations 2 --jobs 2 --jobs 4 --jobs 8 --ignore-running-apps 
Linux running:      2.6.23-0.222.rc9.git4.fc8
Compiler:           gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-31)
CPU:                2 x Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz
Memory:             1964 MByte
Linux compiled:     linux-2.6.20 (/usr/share/kcbench-data/linux-2.6.20)
Filling caches:     Done                                                      
Run 1 (-j 2):       5858 (P:195% R:170.70 U:263.51 S:69.42)
Run 2 (-j 2):       5830 (P:194% R:171.51 U:263.92 S:69.39)
Run 3 (-j 4):       5727 (P:193% R:174.60 U:267.12 S:70.42)
Run 4 (-j 4):       5779 (P:194% R:173.03 U:266.74 S:70.09)
Run 5 (-j 8):       5636 (P:191% R:177.43 U:270.14 S:70.39)
Run 6 (-j 8):       5607 (P:190% R:178.32 U:269.64 S:70.88)


## Results

In this example

 Run 1 (-j 4): 5775 (P:192% R:173.15 U:263.49 S:69.42)

is has taken 173.15 seconds real time (R) to compile the kernel; the CPU-Usage
(P) was 192 percent; user time (U) spend was 296.49 and sys time (S) 69.42.

As most people prefer if higher numbers mean faster systems -- to give them
what they expect kcbench divides 1000000 by the real time spend, which results
in 5775 kcbench points (1000000/173.15) in this example. 


## Usage hints

 * sometimes using exactly as much jobs as processors in the system results in
   the a result faster than the default (two times the number of processors)

 * the compiler has a huge impact on the results; if you compare results from
   different machines make sure they use the same one

 * the kernel that is being compiled of course has a huge impact as well;
   compare only results where you compiled the same kernel version


## EOF
