kcbench

Langue: en

Autres versions - même langue

Version: 369116 (fedora - 01/12/10)

Section: 1 (Commandes utilisateur)

NAME

kcbench - Kernel compile benchmark

SYNOPSIS

 kcbench [options]
 

DESCRIPTION

Compiles a Linux kernel to benchmark a system or test its stability

OPTIONS

-d, --compiledir <path>
    Use the subdirectory kcbench in <path>/ when compiling results -- passes
    'O=<path> /kcbench/' to make when calling it to compile a kernel; use a
    tempdir if not given
 
 
-r, --detailedresults
    Print more detailed results
 
 
-a, --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
 
 
-i, --infinite
    run endlessly to test system stability
 
 
-n, --iterations <int>
    Number or iterations per number of jobs (default: 3)
 
 
-j, --jobs <int>
    Number of jobs to use ('make -j #'); option can be given multiple times
    (default: number of CPUs * 2)
 
 
-c, --no-cachefill
    Omit the initial kernel compile to fill caches; saves time, but first
    result might be slightly lower then the following ones
 
 
-v, --verbose
    Increase verboselevel; option can be given multiple times
 
 
-l, --savefailedlogs <path>
    Save log of failed compile runs in <path>
 
 
-s, --src (<path>|<version>)
    Take sources in <path> or from /usr/share/kcdata/linux-<version>
 
 
-h, --help
    Show usage
 
 
-V, --version
    Output program version
 

ENVIRONMENT

Kcbench looks for a kernel to compile in /usr/share/kcbench-data and will take the one that a "ls usr/share/kcbench-data | head -n 1" outputs by default

EXAMPLE

To compile the default kernel 3 times in a row run:
       $ kcbench
 
 
To compile the defaukt kernel 3 times with 2 jobs and 3 times with 4 jobs run
       $ kcbench --iterations 3 --jobs 2 --jobs 4
 

RESULTS

By default the line you are looking for is this:
       Run 1 (-j 4): 5775 (e:173.15P:192%  U:263.49 S:69.42 F:0)
 
 
Here it has taken 173.15 seconds real time (e) to compile the kernel; the CPU-Usage (P) was 192 percent; user time (U) spend was 296.49 and sys time (S) 69.42 and there we no major page faults (see the info or man pages for time for details about the notation).

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.

When running with "-r|--detailedresults" you'll get more detailed results:

       Run 1 (-j 4):       6662 (e:150.10 P:197% U:259.51 S:36.38 F:0)
         Elapsed Time(E): 2:30.10 (150.10 seconds)
         Kernel time (S): 36.38 seconds
         User time (U): 259.51 seconds
         CPU usage (P): 197%
         Major page faults (F): 0
         Minor page faults (R): 9441809
         Context switches involuntarily (c): 69031
         Context switches voluntarily (w): 46955
 

HINTS

*
sometimes using exactly as much jobs as processors in the system results in a result that's a bit 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 a similar one. The running kernel and its settings also have a impact on the results. Thus it's the best not to compare different distributions/different patch levels.
*
the kernel that is being compiled of course has a huge impact as well; compare only results where you compiled the same kernel version

SEE ALSO

time(1).

BUGS

None know, but there are likely some

AUTHOR

Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info>