Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 1 | perf-bench(1) |
Arnaldo Carvalho de Melo | 4778e0e | 2010-05-05 11:23:27 -0300 | [diff] [blame] | 2 | ============= |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | perf-bench - General framework for benchmark suites |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'perf bench' [<common options>] <subsystem> <suite> [<options>] |
| 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 15 | This 'perf bench' command is a general framework for benchmark suites. |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 16 | |
| 17 | COMMON OPTIONS |
| 18 | -------------- |
Davidlohr Bueso | b6f0629 | 2014-06-16 11:14:19 -0700 | [diff] [blame] | 19 | -r:: |
| 20 | --repeat=:: |
| 21 | Specify amount of times to repeat the run (default 10). |
| 22 | |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 23 | -f:: |
| 24 | --format=:: |
| 25 | Specify format style. |
Randy Dunlap | 854c554 | 2010-03-31 11:31:00 -0700 | [diff] [blame] | 26 | Current available format styles are: |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 27 | |
| 28 | 'default':: |
| 29 | Default style. This is mainly for human reading. |
| 30 | --------------------- |
Randy Dunlap | 854c554 | 2010-03-31 11:31:00 -0700 | [diff] [blame] | 31 | % perf bench sched pipe # with no style specified |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 32 | (executing 1000000 pipe operations between two tasks) |
| 33 | Total time:5.855 sec |
| 34 | 5.855061 usecs/op |
| 35 | 170792 ops/sec |
| 36 | --------------------- |
| 37 | |
| 38 | 'simple':: |
| 39 | This simple style is friendly for automated |
| 40 | processing by scripts. |
| 41 | --------------------- |
| 42 | % perf bench --format=simple sched pipe # specified simple |
| 43 | 5.988 |
| 44 | --------------------- |
| 45 | |
| 46 | SUBSYSTEM |
| 47 | --------- |
| 48 | |
| 49 | 'sched':: |
| 50 | Scheduler and IPC mechanisms. |
| 51 | |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 52 | 'mem':: |
| 53 | Memory access performance. |
| 54 | |
Ramkumar Ramachandra | 95a2b3c | 2014-03-27 19:50:18 -0400 | [diff] [blame] | 55 | 'numa':: |
| 56 | NUMA scheduling and MM benchmarks. |
| 57 | |
| 58 | 'futex':: |
| 59 | Futex stressing benchmarks. |
| 60 | |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 61 | 'all':: |
| 62 | All benchmark subsystems. |
| 63 | |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 64 | SUITES FOR 'sched' |
| 65 | ~~~~~~~~~~~~~~~~~~ |
| 66 | *messaging*:: |
| 67 | Suite for evaluating performance of scheduler and IPC mechanisms. |
| 68 | Based on hackbench by Rusty Russell. |
| 69 | |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 70 | Options of *messaging* |
| 71 | ^^^^^^^^^^^^^^^^^^^^^^ |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 72 | -p:: |
| 73 | --pipe:: |
| 74 | Use pipe() instead of socketpair() |
| 75 | |
| 76 | -t:: |
| 77 | --thread:: |
| 78 | Be multi thread instead of multi process |
| 79 | |
| 80 | -g:: |
| 81 | --group=:: |
| 82 | Specify number of groups |
| 83 | |
| 84 | -l:: |
Ingo Molnar | b0d22e5 | 2015-10-19 10:04:28 +0200 | [diff] [blame] | 85 | --nr_loops=:: |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 86 | Specify number of loops |
| 87 | |
| 88 | Example of *messaging* |
| 89 | ^^^^^^^^^^^^^^^^^^^^^^ |
| 90 | |
| 91 | --------------------- |
| 92 | % perf bench sched messaging # run with default |
| 93 | options (20 sender and receiver processes per group) |
| 94 | (10 groups == 400 processes run) |
| 95 | |
| 96 | Total time:0.308 sec |
| 97 | |
Randy Dunlap | 854c554 | 2010-03-31 11:31:00 -0700 | [diff] [blame] | 98 | % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 99 | (20 sender and receiver threads per group) |
| 100 | (20 groups == 800 threads run) |
| 101 | |
| 102 | Total time:0.582 sec |
| 103 | --------------------- |
| 104 | |
| 105 | *pipe*:: |
| 106 | Suite for pipe() system call. |
| 107 | Based on pipe-test-1m.c by Ingo Molnar. |
| 108 | |
| 109 | Options of *pipe* |
| 110 | ^^^^^^^^^^^^^^^^^ |
| 111 | -l:: |
| 112 | --loop=:: |
| 113 | Specify number of loops. |
| 114 | |
| 115 | Example of *pipe* |
| 116 | ^^^^^^^^^^^^^^^^^ |
| 117 | |
| 118 | --------------------- |
| 119 | % perf bench sched pipe |
| 120 | (executing 1000000 pipe operations between two tasks) |
| 121 | |
| 122 | Total time:8.091 sec |
| 123 | 8.091833 usecs/op |
| 124 | 123581 ops/sec |
| 125 | |
| 126 | % perf bench sched pipe -l 1000 # loop 1000 |
| 127 | (executing 1000 pipe operations between two tasks) |
| 128 | |
| 129 | Total time:0.016 sec |
| 130 | 16.948000 usecs/op |
| 131 | 59004 ops/sec |
| 132 | --------------------- |
| 133 | |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 134 | SUITES FOR 'mem' |
| 135 | ~~~~~~~~~~~~~~~~ |
| 136 | *memcpy*:: |
| 137 | Suite for evaluating performance of simple memory copy in various ways. |
| 138 | |
| 139 | Options of *memcpy* |
| 140 | ^^^^^^^^^^^^^^^^^^^ |
| 141 | -l:: |
Ingo Molnar | a69b4f7 | 2015-10-19 10:04:25 +0200 | [diff] [blame] | 142 | --size:: |
| 143 | Specify size of memory to copy (default: 1MB). |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 144 | Available units are B, KB, MB, GB and TB (case insensitive). |
| 145 | |
Ingo Molnar | 2f211c8 | 2015-10-19 10:04:29 +0200 | [diff] [blame] | 146 | -f:: |
| 147 | --function:: |
| 148 | Specify function to copy (default: default). |
| 149 | Available functions are depend on the architecture. |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 150 | On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported. |
| 151 | |
Ingo Molnar | b0d22e5 | 2015-10-19 10:04:28 +0200 | [diff] [blame] | 152 | -l:: |
| 153 | --nr_loops:: |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 154 | Repeat memcpy invocation this number of times. |
| 155 | |
| 156 | -c:: |
Ingo Molnar | b14f2d3 | 2015-10-19 10:04:23 +0200 | [diff] [blame] | 157 | --cycles:: |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 158 | Use perf's cpu-cycles event instead of gettimeofday syscall. |
| 159 | |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 160 | *memset*:: |
| 161 | Suite for evaluating performance of simple memory set in various ways. |
| 162 | |
| 163 | Options of *memset* |
| 164 | ^^^^^^^^^^^^^^^^^^^ |
| 165 | -l:: |
Ingo Molnar | a69b4f7 | 2015-10-19 10:04:25 +0200 | [diff] [blame] | 166 | --size:: |
| 167 | Specify size of memory to set (default: 1MB). |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 168 | Available units are B, KB, MB, GB and TB (case insensitive). |
| 169 | |
Ingo Molnar | 2f211c8 | 2015-10-19 10:04:29 +0200 | [diff] [blame] | 170 | -f:: |
| 171 | --function:: |
| 172 | Specify function to set (default: default). |
| 173 | Available functions are depend on the architecture. |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 174 | On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported. |
| 175 | |
Ingo Molnar | b0d22e5 | 2015-10-19 10:04:28 +0200 | [diff] [blame] | 176 | -l:: |
| 177 | --nr_loops:: |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 178 | Repeat memset invocation this number of times. |
| 179 | |
| 180 | -c:: |
Ingo Molnar | b14f2d3 | 2015-10-19 10:04:23 +0200 | [diff] [blame] | 181 | --cycles:: |
Namhyung Kim | 08942f6 | 2012-06-20 15:08:06 +0900 | [diff] [blame] | 182 | Use perf's cpu-cycles event instead of gettimeofday syscall. |
| 183 | |
Ramkumar Ramachandra | 95a2b3c | 2014-03-27 19:50:18 -0400 | [diff] [blame] | 184 | SUITES FOR 'numa' |
| 185 | ~~~~~~~~~~~~~~~~~ |
| 186 | *mem*:: |
| 187 | Suite for evaluating NUMA workloads. |
| 188 | |
| 189 | SUITES FOR 'futex' |
| 190 | ~~~~~~~~~~~~~~~~~~ |
| 191 | *hash*:: |
| 192 | Suite for evaluating hash tables. |
| 193 | |
| 194 | *wake*:: |
| 195 | Suite for evaluating wake calls. |
| 196 | |
Davidlohr Bueso | d65817b | 2015-05-08 11:37:59 -0700 | [diff] [blame] | 197 | *wake-parallel*:: |
| 198 | Suite for evaluating parallel wake calls. |
| 199 | |
Ramkumar Ramachandra | 95a2b3c | 2014-03-27 19:50:18 -0400 | [diff] [blame] | 200 | *requeue*:: |
| 201 | Suite for evaluating requeue calls. |
| 202 | |
Davidlohr Bueso | d2f3f5d | 2015-07-07 01:55:53 -0700 | [diff] [blame] | 203 | *lock-pi*:: |
| 204 | Suite for evaluating futex lock_pi calls. |
| 205 | |
| 206 | |
Hitoshi Mitake | 9fbc04f | 2009-11-10 20:50:54 +0900 | [diff] [blame] | 207 | SEE ALSO |
| 208 | -------- |
| 209 | linkperf:perf[1] |