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