Blob Blame History Raw
." Text automatically generated by txt2man
.TH kcbench  "1" "" ""
.SH NAME
\fBkcbench \fP- Kernel compile benchmark
.SH SYNOPSIS
.nf
.fam C
\fBkcbench\fP [\fIoptions\fP]
.fam T
.fi
.SH DESCRIPTION
Compiles a Linux kernel to benchmark a system or test its stability
.SH OPTIONS
.TP
.B
\fB-d\fP, \fB--compiledir\fP <path>
.PP
.nf
.fam C
   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

.fam T
.fi
\fB-r\fP, \fB--detailedresults\fP
.PP
.nf
.fam C
   Print more detailed results

.fam T
.fi
\fB-a\fP, \fB--ignore-running-apps\fP
.PP
.nf
.fam C
   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

.fam T
.fi
\fB-i\fP, \fB--infinite\fP 
.PP
.nf
.fam C
   run endlessly to test system stability

.fam T
.fi
\fB-n\fP, \fB--iterations\fP <int>
.PP
.nf
.fam C
   Number or iterations per number of jobs (default: 3)

.fam T
.fi
\fB-j\fP, \fB--jobs\fP <int> 
.PP
.nf
.fam C
   Number of jobs to use ('make -j #'); option can be given multiple times
   (default: number of CPUs * 2)

.fam T
.fi
\fB-c\fP, \fB--no-cachefill\fP
.PP
.nf
.fam C
   Omit the initial kernel compile to fill caches; saves time, but first
   result might be slightly lower then the following ones

.fam T
.fi
\fB-v\fP, \fB--verbose\fP
.PP
.nf
.fam C
   Increase verboselevel; option can be given multiple times

.fam T
.fi
\fB-l\fP, \fB--savefailedlogs\fP <path> 
.PP
.nf
.fam C
   Save log of failed compile runs in <path>

.fam T
.fi
\fB-s\fP, \fB--src\fP (<path>|<version>) 
.PP
.nf
.fam C
   Take sources in <path> or from /usr/share/kcdata/linux-<version>

.fam T
.fi
\fB-h\fP, \fB--help\fP
.PP
.nf
.fam C
   Show usage

.fam T
.fi
\fB-V\fP, \fB--version\fP
.PP
.nf
.fam C
   Output program version
.fam T
.fi
.SH ENVIRONMENT
Kcbench looks for a kernel to compile in /usr/share/\fBkcbench\fP-data and will
take the one that a "ls usr/share/\fBkcbench\fP-data | head \fB-n\fP 1" outputs by 
default
.SH EXAMPLE
To compile the default kernel 3 times in a row run:
.PP
.nf
.fam C
      $ kcbench

.fam T
.fi
To compile the defaukt kernel 3 times with 2 jobs and 3 times with 4 jobs
run
.PP
.nf
.fam C
      $ kcbench --iterations 3 --jobs 2 --jobs 4
.fam T
.fi
.SH RESULTS
By default the line you are looking for is this:
.PP
.nf
.fam C
      Run 1 (-j 4): 5775 (e:173.15P:192%  U:263.49 S:69.42 F:0)

.fam T
.fi
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).
.PP
As most people prefer if higher numbers mean faster systems -- to give them
what they expect \fBkcbench\fP divides 1000000 by the real time spend, which
results in 5775 \fBkcbench\fP points (1000000/173.15) in this example. 
.PP
When running with "\fB-r\fP|\fB--detailedresults\fP" you'll get more detailed results:
.PP
.nf
.fam C
      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
.fam T
.fi
.SH HINTS
.IP \(bu 3
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)
.IP \(bu 3
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.
.IP \(bu 3
the kernel that is being compiled of course has a huge impact as well;
compare only results where you compiled the same kernel version
.SH SEE ALSO
\fBtime\fP(1).
.SH BUGS
None know, but there are likely some
.SH AUTHOR
Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info>