1PERF-BENCH(1) perf Manual PERF-BENCH(1)
2
3
4
6 perf-bench - General framework for benchmark suites
7
9 perf bench [<common options>] <subsystem> <suite> [<options>]
10
12 This perf bench command is a general framework for benchmark suites.
13
15 -r, --repeat=
16 Specify amount of times to repeat the run (default 10).
17
18 -f, --format=
19 Specify format style. Current available format styles are:
20
21 default
22 Default style. This is mainly for human reading.
23
24
25 .ft C
26 % perf bench sched pipe # with no style specified
27 (executing 1000000 pipe operations between two tasks)
28 Total time:5.855 sec
29 5.855061 usecs/op
30 170792 ops/sec
31 .ft
32
33
34 simple
35 This simple style is friendly for automated processing by scripts.
36
37
38 .ft C
39 % perf bench --format=simple sched pipe # specified simple
40 5.988
41 .ft
42
43
45 sched
46 Scheduler and IPC mechanisms.
47
48 syscall
49 System call performance (throughput).
50
51 mem
52 Memory access performance.
53
54 numa
55 NUMA scheduling and MM benchmarks.
56
57 futex
58 Futex stressing benchmarks.
59
60 epoll
61 Eventpoll (epoll) stressing benchmarks.
62
63 internals
64 Benchmark internal perf functionality.
65
66 all
67 All benchmark subsystems.
68
69 SUITES FOR sched
70 messaging
71 Suite for evaluating performance of scheduler and IPC mechanisms.
72 Based on hackbench by Rusty Russell.
73
74 Options of messaging
75 -p, --pipe
76 Use pipe() instead of socketpair()
77
78 -t, --thread
79 Be multi thread instead of multi process
80
81 -g, --group=
82 Specify number of groups
83
84 -l, --nr_loops=
85 Specify number of loops
86
87 Example of messaging
88 .ft C
89 % perf bench sched messaging # run with default
90 options (20 sender and receiver processes per group)
91 (10 groups == 400 processes run)
92
93 Total time:0.308 sec
94
95 % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
96 (20 sender and receiver threads per group)
97 (20 groups == 800 threads run)
98
99 Total time:0.582 sec
100 .ft
101
102
103 pipe
104 Suite for pipe() system call. Based on pipe-test-1m.c by Ingo
105 Molnar.
106
107 Options of pipe
108 -l, --loop=
109 Specify number of loops.
110
111 Example of pipe
112 .ft C
113 % perf bench sched pipe
114 (executing 1000000 pipe operations between two tasks)
115
116 Total time:8.091 sec
117 8.091833 usecs/op
118 123581 ops/sec
119
120 % perf bench sched pipe -l 1000 # loop 1000
121 (executing 1000 pipe operations between two tasks)
122
123 Total time:0.016 sec
124 16.948000 usecs/op
125 59004 ops/sec
126 .ft
127
128
129 SUITES FOR syscall
130 basic
131 Suite for evaluating performance of core system call throughput
132 (both usecs/op and ops/sec metrics). This uses a single thread
133 simply doing getppid(2), which is a simple syscall where the result
134 is not cached by glibc.
135
136 SUITES FOR mem
137 memcpy
138 Suite for evaluating performance of simple memory copy in various
139 ways.
140
141 Options of memcpy
142 -l, --size
143 Specify size of memory to copy (default: 1MB). Available units
144 are B, KB, MB, GB and TB (case insensitive).
145
146 -f, --function
147 Specify function to copy (default: default). Available
148 functions are depend on the architecture. On x86-64,
149 x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
150
151 -l, --nr_loops
152 Repeat memcpy invocation this number of times.
153
154 -c, --cycles
155 Use perf’s cpu-cycles event instead of gettimeofday syscall.
156
157 memset
158 Suite for evaluating performance of simple memory set in
159 various ways.
160
161 Options of memset
162 -l, --size
163 Specify size of memory to set (default: 1MB). Available units
164 are B, KB, MB, GB and TB (case insensitive).
165
166 -f, --function
167 Specify function to set (default: default). Available functions
168 are depend on the architecture. On x86-64, x86-64-unrolled,
169 x86-64-stosq and x86-64-stosb are supported.
170
171 -l, --nr_loops
172 Repeat memset invocation this number of times.
173
174 -c, --cycles
175 Use perf’s cpu-cycles event instead of gettimeofday syscall.
176
177 SUITES FOR numa
178 mem
179 Suite for evaluating NUMA workloads.
180
181 SUITES FOR futex
182 hash
183 Suite for evaluating hash tables.
184
185 wake
186 Suite for evaluating wake calls.
187
188 wake-parallel
189 Suite for evaluating parallel wake calls.
190
191 requeue
192 Suite for evaluating requeue calls.
193
194 lock-pi
195 Suite for evaluating futex lock_pi calls.
196
197 SUITES FOR epoll
198 wait
199 Suite for evaluating concurrent epoll_wait calls.
200
201 ctl
202 Suite for evaluating multiple epoll_ctl calls.
203
204 SUITES FOR internals
205 synthesize
206 Suite for evaluating perf’s event synthesis performance.
207
209 perf(1)
210
211
212
213perf 06/14/2022 PERF-BENCH(1)