6 perf-bench - General framework for benchmark suites
11 'perf bench' [<common options>] <subsystem> <suite> [<options>]
15 This 'perf bench' command is a general framework for benchmark suites.
21 Specify number of times to repeat the run (default 10).
26 Current available format styles are:
29 Default style. This is mainly for human reading.
31 % perf bench sched pipe # with no style specified
32 (executing 1000000 pipe operations between two tasks)
39 This simple style is friendly for automated
40 processing by scripts.
42 % perf bench --format=simple sched pipe # specified simple
50 Scheduler and IPC mechanisms.
53 System call performance (throughput).
56 Memory access performance.
59 NUMA scheduling and MM benchmarks.
62 Futex stressing benchmarks.
65 Eventpoll (epoll) stressing benchmarks.
68 Benchmark internal perf functionality.
71 Benchmark overhead of uprobe + BPF.
74 All benchmark subsystems.
79 Suite for evaluating performance of scheduler and IPC mechanisms.
80 Based on hackbench by Rusty Russell.
82 Options of *messaging*
83 ^^^^^^^^^^^^^^^^^^^^^^
86 Use pipe() instead of socketpair()
90 Be multi thread instead of multi process
94 Specify number of groups
98 Specify number of loops
100 Example of *messaging*
101 ^^^^^^^^^^^^^^^^^^^^^^
103 ---------------------
104 % perf bench sched messaging # run with default
105 options (20 sender and receiver processes per group)
106 (10 groups == 400 processes run)
110 % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
111 (20 sender and receiver threads per group)
112 (20 groups == 800 threads run)
115 ---------------------
118 Suite for pipe() system call.
119 Based on pipe-test-1m.c by Ingo Molnar.
125 Specify number of loops.
129 Names of cgroups for sender and receiver, separated by a comma.
130 This is useful to check cgroup context switching overhead.
131 Note that perf doesn't create nor delete the cgroups, so users should
132 make sure that the cgroups exist and are accessible before use.
138 ---------------------
139 % perf bench sched pipe
140 (executing 1000000 pipe operations between two tasks)
146 % perf bench sched pipe -l 1000 # loop 1000
147 (executing 1000 pipe operations between two tasks)
153 % perf bench sched pipe -G AAA,BBB
154 (executing 1000000 pipe operations between cgroups)
155 # Running 'sched/pipe' benchmark:
156 # Executed 1000000 pipe operations between two processes
158 Total time: 6.886 [sec]
163 ---------------------
168 Suite for evaluating performance of core system call throughput (both usecs/op and ops/sec metrics).
169 This uses a single thread simply doing getppid(2), which is a simple syscall where the result is not
176 Suite for evaluating performance of simple memory copy in various ways.
182 Specify size of memory to copy (default: 1MB).
183 Available units are B, KB, MB, GB and TB (case insensitive).
187 Specify function to copy (default: default).
188 Available functions are depend on the architecture.
189 On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
193 Repeat memcpy invocation this number of times.
197 Use perf's cpu-cycles event instead of gettimeofday syscall.
200 Suite for evaluating performance of simple memory set in various ways.
206 Specify size of memory to set (default: 1MB).
207 Available units are B, KB, MB, GB and TB (case insensitive).
211 Specify function to set (default: default).
212 Available functions are depend on the architecture.
213 On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
217 Repeat memset invocation this number of times.
221 Use perf's cpu-cycles event instead of gettimeofday syscall.
226 Suite for evaluating NUMA workloads.
231 Suite for evaluating hash tables.
234 Suite for evaluating wake calls.
237 Suite for evaluating parallel wake calls.
240 Suite for evaluating requeue calls.
243 Suite for evaluating futex lock_pi calls.
248 Suite for evaluating concurrent epoll_wait calls.
251 Suite for evaluating multiple epoll_ctl calls.
253 SUITES FOR 'internals'
254 ~~~~~~~~~~~~~~~~~~~~~~
256 Suite for evaluating perf's event synthesis performance.