1perf-bench(1)
2=============
3
4NAME
5----
6perf-bench - General framework for benchmark suites
7
8SYNOPSIS
9--------
10[verse]
11'perf bench' [<common options>] <subsystem> <suite> [<options>]
12
13DESCRIPTION
14-----------
15This 'perf bench' command is a general framework for benchmark suites.
16
17COMMON OPTIONS
18--------------
19-f::
20--format=::
21Specify format style.
22Current available format styles are:
23
24'default'::
25Default style. This is mainly for human reading.
26---------------------
27% perf bench sched pipe                      # with no style specified
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'::
35This simple style is friendly for automated
36processing by scripts.
37---------------------
38% perf bench --format=simple sched pipe      # specified simple
395.988
40---------------------
41
42SUBSYSTEM
43---------
44
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
60SUITES FOR 'sched'
61~~~~~~~~~~~~~~~~~~
62*messaging*::
63Suite for evaluating performance of scheduler and IPC mechanisms.
64Based on hackbench by Rusty Russell.
65
66Options of *messaging*
67^^^^^^^^^^^^^^^^^^^^^^
68-p::
69--pipe::
70Use pipe() instead of socketpair()
71
72-t::
73--thread::
74Be multi thread instead of multi process
75
76-g::
77--group=::
78Specify number of groups
79
80-l::
81--loop=::
82Specify number of loops
83
84Example of *messaging*
85^^^^^^^^^^^^^^^^^^^^^^
86
87---------------------
88% perf bench sched messaging                 # run with default
89options (20 sender and receiver processes per group)
90(10 groups == 400 processes run)
91
92      Total time:0.308 sec
93
94% perf bench sched messaging -t -g 20        # be multi-thread, with 20 groups
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*::
102Suite for pipe() system call.
103Based on pipe-test-1m.c by Ingo Molnar.
104
105Options of *pipe*
106^^^^^^^^^^^^^^^^^
107-l::
108--loop=::
109Specify number of loops.
110
111Example 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
130SUITES FOR 'mem'
131~~~~~~~~~~~~~~~~
132*memcpy*::
133Suite for evaluating performance of simple memory copy in various ways.
134
135Options of *memcpy*
136^^^^^^^^^^^^^^^^^^^
137-l::
138--length::
139Specify length of memory to copy (default: 1MB).
140Available units are B, KB, MB, GB and TB (case insensitive).
141
142-r::
143--routine::
144Specify routine to copy (default: default).
145Available routines are depend on the architecture.
146On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
147
148-i::
149--iterations::
150Repeat memcpy invocation this number of times.
151
152-c::
153--cycle::
154Use perf's cpu-cycles event instead of gettimeofday syscall.
155
156-o::
157--only-prefault::
158Show only the result with page faults before memcpy.
159
160-n::
161--no-prefault::
162Show only the result without page faults before memcpy.
163
164*memset*::
165Suite for evaluating performance of simple memory set in various ways.
166
167Options of *memset*
168^^^^^^^^^^^^^^^^^^^
169-l::
170--length::
171Specify length of memory to set (default: 1MB).
172Available units are B, KB, MB, GB and TB (case insensitive).
173
174-r::
175--routine::
176Specify routine to set (default: default).
177Available routines are depend on the architecture.
178On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
179
180-i::
181--iterations::
182Repeat memset invocation this number of times.
183
184-c::
185--cycle::
186Use perf's cpu-cycles event instead of gettimeofday syscall.
187
188-o::
189--only-prefault::
190Show only the result with page faults before memset.
191
192-n::
193--no-prefault::
194Show only the result without page faults before memset.
195
196SUITES FOR 'numa'
197~~~~~~~~~~~~~~~~~
198*mem*::
199Suite for evaluating NUMA workloads.
200
201SUITES FOR 'futex'
202~~~~~~~~~~~~~~~~~~
203*hash*::
204Suite for evaluating hash tables.
205
206*wake*::
207Suite for evaluating wake calls.
208
209*requeue*::
210Suite for evaluating requeue calls.
211
212SEE ALSO
213--------
214linkperf:perf[1]
215