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 mem
49 Memory access performance.
50
51 numa
52 NUMA scheduling and MM benchmarks.
53
54 futex
55 Futex stressing benchmarks.
56
57 all
58 All benchmark subsystems.
59
60 SUITES FOR sched
61 messaging
62 Suite for evaluating performance of scheduler and IPC mechanisms.
63 Based on hackbench by Rusty Russell.
64
65 Options of messaging
66 -p, --pipe
67 Use pipe() instead of socketpair()
68
69 -t, --thread
70 Be multi thread instead of multi process
71
72 -g, --group=
73 Specify number of groups
74
75 -l, --loop=
76 Specify number of loops
77
78 Example of messaging
79 .ft C
80 % perf bench sched messaging # run with default
81 options (20 sender and receiver processes per group)
82 (10 groups == 400 processes run)
83
84 Total time:0.308 sec
85
86 % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
87 (20 sender and receiver threads per group)
88 (20 groups == 800 threads run)
89
90 Total time:0.582 sec
91 .ft
92
93
94 pipe
95 Suite for pipe() system call. Based on pipe-test-1m.c by Ingo
96 Molnar.
97
98 Options of pipe
99 -l, --loop=
100 Specify number of loops.
101
102 Example of pipe
103 .ft C
104 % perf bench sched pipe
105 (executing 1000000 pipe operations between two tasks)
106
107 Total time:8.091 sec
108 8.091833 usecs/op
109 123581 ops/sec
110
111 % perf bench sched pipe -l 1000 # loop 1000
112 (executing 1000 pipe operations between two tasks)
113
114 Total time:0.016 sec
115 16.948000 usecs/op
116 59004 ops/sec
117 .ft
118
119
120 SUITES FOR mem
121 memcpy
122 Suite for evaluating performance of simple memory copy in various
123 ways.
124
125 Options of memcpy
126 -l, --length
127 Specify length of memory to copy (default: 1MB). Available
128 units are B, KB, MB, GB and TB (case insensitive).
129
130 -r, --routine
131 Specify routine to copy (default: default). Available routines
132 are depend on the architecture. On x86-64, x86-64-unrolled,
133 x86-64-movsq and x86-64-movsb are supported.
134
135 -i, --iterations
136 Repeat memcpy invocation this number of times.
137
138 -c, --clock
139 Use perf’s cpu-cycles event instead of gettimeofday syscall.
140
141 -o, --only-prefault
142 Show only the result with page faults before memcpy.
143
144 -n, --no-prefault
145 Show only the result without page faults before memcpy.
146
147 memset
148 Suite for evaluating performance of simple memory set in
149 various ways.
150
151 Options of memset
152 -l, --length
153 Specify length of memory to set (default: 1MB). Available units
154 are B, KB, MB, GB and TB (case insensitive).
155
156 -r, --routine
157 Specify routine to set (default: default). Available routines
158 are depend on the architecture. On x86-64, x86-64-unrolled,
159 x86-64-stosq and x86-64-stosb are supported.
160
161 -i, --iterations
162 Repeat memset invocation this number of times.
163
164 -c, --clock
165 Use perf’s cpu-cycles event instead of gettimeofday syscall.
166
167 -o, --only-prefault
168 Show only the result with page faults before memset.
169
170 -n, --no-prefault
171 Show only the result without page faults before memset.
172
173 SUITES FOR numa
174 mem
175 Suite for evaluating NUMA workloads.
176
177 SUITES FOR futex
178 hash
179 Suite for evaluating hash tables.
180
181 wake
182 Suite for evaluating wake calls.
183
184 requeue
185 Suite for evaluating requeue calls.
186
188 perf(1)
189
190
191
192perf 06/18/2019 PERF-BENCH(1)