blob: 4464ad770d51257e392dfa801c64adcba72e76d7 [file] [log] [blame]
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +09001perf-bench(1)
Arnaldo Carvalho de Melo4778e0e2010-05-05 11:23:27 -03002=============
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +09003
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-----------
Namhyung Kim08942f62012-06-20 15:08:06 +090015This 'perf bench' command is a general framework for benchmark suites.
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090016
17COMMON OPTIONS
18--------------
19-f::
20--format=::
21Specify format style.
Randy Dunlap854c5542010-03-31 11:31:00 -070022Current available format styles are:
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090023
24'default'::
25Default style. This is mainly for human reading.
26---------------------
Randy Dunlap854c5542010-03-31 11:31:00 -070027% perf bench sched pipe # with no style specified
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090028(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
Namhyung Kim08942f62012-06-20 15:08:06 +090048'mem'::
49 Memory access performance.
50
Ramkumar Ramachandra95a2b3c2014-03-27 19:50:18 -040051'numa'::
52 NUMA scheduling and MM benchmarks.
53
54'futex'::
55 Futex stressing benchmarks.
56
Namhyung Kim08942f62012-06-20 15:08:06 +090057'all'::
58 All benchmark subsystems.
59
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090060SUITES FOR 'sched'
61~~~~~~~~~~~~~~~~~~
62*messaging*::
63Suite for evaluating performance of scheduler and IPC mechanisms.
64Based on hackbench by Rusty Russell.
65
Namhyung Kim08942f62012-06-20 15:08:06 +090066Options of *messaging*
67^^^^^^^^^^^^^^^^^^^^^^
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090068-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
Randy Dunlap854c5542010-03-31 11:31:00 -070094% perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +090095(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
Namhyung Kim08942f62012-06-20 15:08:06 +0900130SUITES 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::
Hitoshi Mitake17d7a112012-07-02 22:46:17 +0900153--cycle::
Namhyung Kim08942f62012-06-20 15:08:06 +0900154Use 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::
Hitoshi Mitake17d7a112012-07-02 22:46:17 +0900185--cycle::
Namhyung Kim08942f62012-06-20 15:08:06 +0900186Use 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
Ramkumar Ramachandra95a2b3c2014-03-27 19:50:18 -0400196SUITES 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
Hitoshi Mitake9fbc04f2009-11-10 20:50:54 +0900212SEE ALSO
213--------
214linkperf:perf[1]