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