xref: /aosp_15_r20/external/ltp/utils/benchmark/kernbench-0.42/README (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard WorkerKernbench v0.42
2*49cdfc7eSAndroid Build Coastguard Worker
3*49cdfc7eSAndroid Build Coastguard Worker
4*49cdfc7eSAndroid Build Coastguard WorkerWhat is this?
5*49cdfc7eSAndroid Build Coastguard Worker
6*49cdfc7eSAndroid Build Coastguard WorkerThis is a cpu throughput benchmark originally devised and used by Martin J.
7*49cdfc7eSAndroid Build Coastguard WorkerBligh. It is designed to compare kernels on the same machine, or to compare
8*49cdfc7eSAndroid Build Coastguard Workerhardware. To compare hardware you need to be running the same architecture
9*49cdfc7eSAndroid Build Coastguard Workermachines (eg i386), the same userspace binaries and run kernbench on the same
10*49cdfc7eSAndroid Build Coastguard Workerkernel source tree.
11*49cdfc7eSAndroid Build Coastguard Worker
12*49cdfc7eSAndroid Build Coastguard WorkerIt runs a kernel at various numbers of concurrent jobs: 1/2 number of cpus,
13*49cdfc7eSAndroid Build Coastguard Workeroptimal (default is 4xnumber of cpus) and maximal job count. Optionally it can
14*49cdfc7eSAndroid Build Coastguard Workeralso run single threaded. It then prints out a number of useful statistics
15*49cdfc7eSAndroid Build Coastguard Workerfor the average of each group of runs and logs them to kernbench.log
16*49cdfc7eSAndroid Build Coastguard Worker
17*49cdfc7eSAndroid Build Coastguard WorkerYou need more than 2Gb of ram for this to be a true throughput benchmark or
18*49cdfc7eSAndroid Build Coastguard Workerelse you will get swapstorms.
19*49cdfc7eSAndroid Build Coastguard Worker
20*49cdfc7eSAndroid Build Coastguard WorkerIdeally it should be run in single user mode on a non-journalled filesystem.
21*49cdfc7eSAndroid Build Coastguard WorkerTo compare results it should always be run in the same kernel tree.
22*49cdfc7eSAndroid Build Coastguard Worker
23*49cdfc7eSAndroid Build Coastguard Worker
24*49cdfc7eSAndroid Build Coastguard WorkerHow do I use it?
25*49cdfc7eSAndroid Build Coastguard Worker
26*49cdfc7eSAndroid Build Coastguard WorkerYou need a kernel tree (any 2.6 will do) and the applications 'time', 'awk',
27*49cdfc7eSAndroid Build Coastguard Worker'date' and 'yes' installed. 'time' is different to the builtin time used by
28*49cdfc7eSAndroid Build Coastguard WorkerBASH and has more information desired for this benchmark.
29*49cdfc7eSAndroid Build Coastguard Worker
30*49cdfc7eSAndroid Build Coastguard WorkerSimply cd into the kernel tree directory and type
31*49cdfc7eSAndroid Build Coastguard Worker
32*49cdfc7eSAndroid Build Coastguard Worker/path/to/kernbench
33*49cdfc7eSAndroid Build Coastguard Worker
34*49cdfc7eSAndroid Build Coastguard Worker
35*49cdfc7eSAndroid Build Coastguard WorkerOptions
36*49cdfc7eSAndroid Build Coastguard Worker
37*49cdfc7eSAndroid Build Coastguard Workerkernbench [-n runs] [-o jobs] [-s] [-H] [-O] [-M] [-h] [-v]
38*49cdfc7eSAndroid Build Coastguard Workern : number of times to perform benchmark (default 5)
39*49cdfc7eSAndroid Build Coastguard Workero : number of jobs for optimal run (default 4 * cpu)
40*49cdfc7eSAndroid Build Coastguard Workers : perform single threaded runs (default don't)
41*49cdfc7eSAndroid Build Coastguard WorkerH : don't perform half load runs (default do)
42*49cdfc7eSAndroid Build Coastguard WorkerO : don't perform optimal load runs (default do)
43*49cdfc7eSAndroid Build Coastguard WorkerM : don't perform maximal load runs (default do)
44*49cdfc7eSAndroid Build Coastguard Workerf : fast run
45*49cdfc7eSAndroid Build Coastguard Workerh : print this help
46*49cdfc7eSAndroid Build Coastguard Workerv : print version number
47*49cdfc7eSAndroid Build Coastguard Worker
48*49cdfc7eSAndroid Build Coastguard Worker
49*49cdfc7eSAndroid Build Coastguard WorkerChangelog:
50*49cdfc7eSAndroid Build Coastguard Workerv0.42 Fixed incorrect counting of cpus (thanks Flynn Marquardt)
51*49cdfc7eSAndroid Build Coastguard Worker	Changed -j to at least 4GB ram.
52*49cdfc7eSAndroid Build Coastguard Worker
53*49cdfc7eSAndroid Build Coastguard Workerv0.41 Fixed make oldconfig
54*49cdfc7eSAndroid Build Coastguard Worker
55*49cdfc7eSAndroid Build Coastguard Workerv0.40 Made all runs use the oldconfig if it exists. Changed to only do one
56*49cdfc7eSAndroid Build Coastguard Worker	warmup run before all the benchmarks. Added logging to kernbench.log
57*49cdfc7eSAndroid Build Coastguard Worker	Cleaned up the code substantially to reuse code where possible.
58*49cdfc7eSAndroid Build Coastguard Worker	Added standard deviation statistics courtesy of Peter Williams
59*49cdfc7eSAndroid Build Coastguard Worker
60*49cdfc7eSAndroid Build Coastguard Workerv0.30 Added fast run option which bypasses caching, warmup and tree
61*49cdfc7eSAndroid Build Coastguard Worker	preparation and drops number of runs to 3. Modified half loads to
62*49cdfc7eSAndroid Build Coastguard Worker	detect -j2 and change to -j3. Added syncs. Improved warnings and
63*49cdfc7eSAndroid Build Coastguard Worker	messages.
64*49cdfc7eSAndroid Build Coastguard Worker
65*49cdfc7eSAndroid Build Coastguard Workerv0.20 Change to average of runs, add options to choose which runs to perform
66*49cdfc7eSAndroid Build Coastguard Worker	remove single threaded run from defaults, do warmup run, lots more
67*49cdfc7eSAndroid Build Coastguard Worker	sanity checks, drop meaningless runs, add a few warnings, remove fudge
68*49cdfc7eSAndroid Build Coastguard Worker	factor from no. of jobs.
69*49cdfc7eSAndroid Build Coastguard Worker
70*49cdfc7eSAndroid Build Coastguard Workerv0.11 First public release
71*49cdfc7eSAndroid Build Coastguard Worker
72*49cdfc7eSAndroid Build Coastguard Worker
73*49cdfc7eSAndroid Build Coastguard WorkerThanks: M. Bligh for ideas. Others for help with magic incantations to get
74*49cdfc7eSAndroid Build Coastguard Worker	BASH to work.
75*49cdfc7eSAndroid Build Coastguard Worker
76*49cdfc7eSAndroid Build Coastguard Worker
77*49cdfc7eSAndroid Build Coastguard WorkerCon Kolivas <[email protected]>
78*49cdfc7eSAndroid Build Coastguard WorkerMon Jun 18 18:59:24 2007
79*49cdfc7eSAndroid Build Coastguard Worker
80*49cdfc7eSAndroid Build Coastguard WorkerLicense:
81*49cdfc7eSAndroid Build Coastguard WorkerGPL of course. Read COPYING included in this tarball.
82