Merge tag 'pm+acpi-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[deliverable/linux.git] / tools / perf / Documentation / perf-bench.txt
CommitLineData
9fbc04f2 1perf-bench(1)
4778e0e8 2=============
9fbc04f2
HM
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-----------
08942f6d 15This 'perf bench' command is a general framework for benchmark suites.
9fbc04f2
HM
16
17COMMON OPTIONS
18--------------
b6f0629a
DB
19-r::
20--repeat=::
21Specify amount of times to repeat the run (default 10).
22
9fbc04f2
HM
23-f::
24--format=::
25Specify format style.
854c5548 26Current available format styles are:
9fbc04f2
HM
27
28'default'::
29Default style. This is mainly for human reading.
30---------------------
854c5548 31% perf bench sched pipe # with no style specified
9fbc04f2
HM
32(executing 1000000 pipe operations between two tasks)
33 Total time:5.855 sec
34 5.855061 usecs/op
35 170792 ops/sec
36---------------------
37
38'simple'::
39This simple style is friendly for automated
40processing by scripts.
41---------------------
42% perf bench --format=simple sched pipe # specified simple
435.988
44---------------------
45
46SUBSYSTEM
47---------
48
49'sched'::
50 Scheduler and IPC mechanisms.
51
08942f6d
NK
52'mem'::
53 Memory access performance.
54
95a2b3c0
RR
55'numa'::
56 NUMA scheduling and MM benchmarks.
57
58'futex'::
59 Futex stressing benchmarks.
60
08942f6d
NK
61'all'::
62 All benchmark subsystems.
63
9fbc04f2
HM
64SUITES FOR 'sched'
65~~~~~~~~~~~~~~~~~~
66*messaging*::
67Suite for evaluating performance of scheduler and IPC mechanisms.
68Based on hackbench by Rusty Russell.
69
08942f6d
NK
70Options of *messaging*
71^^^^^^^^^^^^^^^^^^^^^^
9fbc04f2
HM
72-p::
73--pipe::
74Use pipe() instead of socketpair()
75
76-t::
77--thread::
78Be multi thread instead of multi process
79
80-g::
81--group=::
82Specify number of groups
83
84-l::
85--loop=::
86Specify number of loops
87
88Example of *messaging*
89^^^^^^^^^^^^^^^^^^^^^^
90
91---------------------
92% perf bench sched messaging # run with default
93options (20 sender and receiver processes per group)
94(10 groups == 400 processes run)
95
96 Total time:0.308 sec
97
854c5548 98% perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups
9fbc04f2
HM
99(20 sender and receiver threads per group)
100(20 groups == 800 threads run)
101
102 Total time:0.582 sec
103---------------------
104
105*pipe*::
106Suite for pipe() system call.
107Based on pipe-test-1m.c by Ingo Molnar.
108
109Options of *pipe*
110^^^^^^^^^^^^^^^^^
111-l::
112--loop=::
113Specify number of loops.
114
115Example of *pipe*
116^^^^^^^^^^^^^^^^^
117
118---------------------
119% perf bench sched pipe
120(executing 1000000 pipe operations between two tasks)
121
122 Total time:8.091 sec
123 8.091833 usecs/op
124 123581 ops/sec
125
126% perf bench sched pipe -l 1000 # loop 1000
127(executing 1000 pipe operations between two tasks)
128
129 Total time:0.016 sec
130 16.948000 usecs/op
131 59004 ops/sec
132---------------------
133
08942f6d
NK
134SUITES FOR 'mem'
135~~~~~~~~~~~~~~~~
136*memcpy*::
137Suite for evaluating performance of simple memory copy in various ways.
138
139Options of *memcpy*
140^^^^^^^^^^^^^^^^^^^
141-l::
142--length::
143Specify length of memory to copy (default: 1MB).
144Available units are B, KB, MB, GB and TB (case insensitive).
145
146-r::
147--routine::
148Specify routine to copy (default: default).
149Available routines are depend on the architecture.
150On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
151
152-i::
153--iterations::
154Repeat memcpy invocation this number of times.
155
156-c::
17d7a112 157--cycle::
08942f6d
NK
158Use perf's cpu-cycles event instead of gettimeofday syscall.
159
160-o::
161--only-prefault::
162Show only the result with page faults before memcpy.
163
164-n::
165--no-prefault::
166Show only the result without page faults before memcpy.
167
168*memset*::
169Suite for evaluating performance of simple memory set in various ways.
170
171Options of *memset*
172^^^^^^^^^^^^^^^^^^^
173-l::
174--length::
175Specify length of memory to set (default: 1MB).
176Available units are B, KB, MB, GB and TB (case insensitive).
177
178-r::
179--routine::
180Specify routine to set (default: default).
181Available routines are depend on the architecture.
182On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
183
184-i::
185--iterations::
186Repeat memset invocation this number of times.
187
188-c::
17d7a112 189--cycle::
08942f6d
NK
190Use perf's cpu-cycles event instead of gettimeofday syscall.
191
192-o::
193--only-prefault::
194Show only the result with page faults before memset.
195
196-n::
197--no-prefault::
198Show only the result without page faults before memset.
199
95a2b3c0
RR
200SUITES FOR 'numa'
201~~~~~~~~~~~~~~~~~
202*mem*::
203Suite for evaluating NUMA workloads.
204
205SUITES FOR 'futex'
206~~~~~~~~~~~~~~~~~~
207*hash*::
208Suite for evaluating hash tables.
209
210*wake*::
211Suite for evaluating wake calls.
212
213*requeue*::
214Suite for evaluating requeue calls.
215
9fbc04f2
HM
216SEE ALSO
217--------
218linkperf:perf[1]
This page took 0.227828 seconds and 5 git commands to generate.