]>
Commit | Line | Data |
---|---|---|
9fbc04f2 | 1 | perf-bench(1) |
4778e0e8 | 2 | ============= |
9fbc04f2 HM |
3 | |
4 | NAME | |
5 | ---- | |
6 | perf-bench - General framework for benchmark suites | |
7 | ||
8 | SYNOPSIS | |
9 | -------- | |
10 | [verse] | |
11 | 'perf bench' [<common options>] <subsystem> <suite> [<options>] | |
12 | ||
13 | DESCRIPTION | |
14 | ----------- | |
08942f6d | 15 | This 'perf bench' command is a general framework for benchmark suites. |
9fbc04f2 HM |
16 | |
17 | COMMON OPTIONS | |
18 | -------------- | |
b6f0629a DB |
19 | -r:: |
20 | --repeat=:: | |
21 | Specify amount of times to repeat the run (default 10). | |
22 | ||
9fbc04f2 HM |
23 | -f:: |
24 | --format=:: | |
25 | Specify format style. | |
854c5548 | 26 | Current available format styles are: |
9fbc04f2 HM |
27 | |
28 | 'default':: | |
29 | Default 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':: | |
39 | This simple style is friendly for automated | |
40 | processing by scripts. | |
41 | --------------------- | |
42 | % perf bench --format=simple sched pipe # specified simple | |
43 | 5.988 | |
44 | --------------------- | |
45 | ||
46 | SUBSYSTEM | |
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 | ||
121dd9ea DB |
61 | 'epoll':: |
62 | Eventpoll (epoll) stressing benchmarks. | |
63 | ||
2a4b5166 IR |
64 | 'internals':: |
65 | Benchmark internal perf functionality. | |
66 | ||
08942f6d NK |
67 | 'all':: |
68 | All benchmark subsystems. | |
69 | ||
9fbc04f2 HM |
70 | SUITES FOR 'sched' |
71 | ~~~~~~~~~~~~~~~~~~ | |
72 | *messaging*:: | |
73 | Suite for evaluating performance of scheduler and IPC mechanisms. | |
74 | Based on hackbench by Rusty Russell. | |
75 | ||
08942f6d NK |
76 | Options of *messaging* |
77 | ^^^^^^^^^^^^^^^^^^^^^^ | |
9fbc04f2 HM |
78 | -p:: |
79 | --pipe:: | |
80 | Use pipe() instead of socketpair() | |
81 | ||
82 | -t:: | |
83 | --thread:: | |
84 | Be multi thread instead of multi process | |
85 | ||
86 | -g:: | |
87 | --group=:: | |
88 | Specify number of groups | |
89 | ||
90 | -l:: | |
b0d22e52 | 91 | --nr_loops=:: |
9fbc04f2 HM |
92 | Specify number of loops |
93 | ||
94 | Example of *messaging* | |
95 | ^^^^^^^^^^^^^^^^^^^^^^ | |
96 | ||
97 | --------------------- | |
98 | % perf bench sched messaging # run with default | |
99 | options (20 sender and receiver processes per group) | |
100 | (10 groups == 400 processes run) | |
101 | ||
102 | Total time:0.308 sec | |
103 | ||
854c5548 | 104 | % perf bench sched messaging -t -g 20 # be multi-thread, with 20 groups |
9fbc04f2 HM |
105 | (20 sender and receiver threads per group) |
106 | (20 groups == 800 threads run) | |
107 | ||
108 | Total time:0.582 sec | |
109 | --------------------- | |
110 | ||
111 | *pipe*:: | |
112 | Suite for pipe() system call. | |
113 | Based on pipe-test-1m.c by Ingo Molnar. | |
114 | ||
115 | Options of *pipe* | |
116 | ^^^^^^^^^^^^^^^^^ | |
117 | -l:: | |
118 | --loop=:: | |
119 | Specify number of loops. | |
120 | ||
121 | Example of *pipe* | |
122 | ^^^^^^^^^^^^^^^^^ | |
123 | ||
124 | --------------------- | |
125 | % perf bench sched pipe | |
126 | (executing 1000000 pipe operations between two tasks) | |
127 | ||
128 | Total time:8.091 sec | |
129 | 8.091833 usecs/op | |
130 | 123581 ops/sec | |
131 | ||
132 | % perf bench sched pipe -l 1000 # loop 1000 | |
133 | (executing 1000 pipe operations between two tasks) | |
134 | ||
135 | Total time:0.016 sec | |
136 | 16.948000 usecs/op | |
137 | 59004 ops/sec | |
138 | --------------------- | |
139 | ||
08942f6d NK |
140 | SUITES FOR 'mem' |
141 | ~~~~~~~~~~~~~~~~ | |
142 | *memcpy*:: | |
143 | Suite for evaluating performance of simple memory copy in various ways. | |
144 | ||
145 | Options of *memcpy* | |
146 | ^^^^^^^^^^^^^^^^^^^ | |
147 | -l:: | |
a69b4f74 IM |
148 | --size:: |
149 | Specify size of memory to copy (default: 1MB). | |
08942f6d NK |
150 | Available units are B, KB, MB, GB and TB (case insensitive). |
151 | ||
2f211c84 IM |
152 | -f:: |
153 | --function:: | |
154 | Specify function to copy (default: default). | |
155 | Available functions are depend on the architecture. | |
08942f6d NK |
156 | On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported. |
157 | ||
b0d22e52 IM |
158 | -l:: |
159 | --nr_loops:: | |
08942f6d NK |
160 | Repeat memcpy invocation this number of times. |
161 | ||
162 | -c:: | |
b14f2d35 | 163 | --cycles:: |
08942f6d NK |
164 | Use perf's cpu-cycles event instead of gettimeofday syscall. |
165 | ||
08942f6d NK |
166 | *memset*:: |
167 | Suite for evaluating performance of simple memory set in various ways. | |
168 | ||
169 | Options of *memset* | |
170 | ^^^^^^^^^^^^^^^^^^^ | |
171 | -l:: | |
a69b4f74 IM |
172 | --size:: |
173 | Specify size of memory to set (default: 1MB). | |
08942f6d NK |
174 | Available units are B, KB, MB, GB and TB (case insensitive). |
175 | ||
2f211c84 IM |
176 | -f:: |
177 | --function:: | |
178 | Specify function to set (default: default). | |
179 | Available functions are depend on the architecture. | |
08942f6d NK |
180 | On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported. |
181 | ||
b0d22e52 IM |
182 | -l:: |
183 | --nr_loops:: | |
08942f6d NK |
184 | Repeat memset invocation this number of times. |
185 | ||
186 | -c:: | |
b14f2d35 | 187 | --cycles:: |
08942f6d NK |
188 | Use perf's cpu-cycles event instead of gettimeofday syscall. |
189 | ||
95a2b3c0 RR |
190 | SUITES FOR 'numa' |
191 | ~~~~~~~~~~~~~~~~~ | |
192 | *mem*:: | |
193 | Suite for evaluating NUMA workloads. | |
194 | ||
195 | SUITES FOR 'futex' | |
196 | ~~~~~~~~~~~~~~~~~~ | |
197 | *hash*:: | |
198 | Suite for evaluating hash tables. | |
199 | ||
200 | *wake*:: | |
201 | Suite for evaluating wake calls. | |
202 | ||
d65817b4 DB |
203 | *wake-parallel*:: |
204 | Suite for evaluating parallel wake calls. | |
205 | ||
95a2b3c0 RR |
206 | *requeue*:: |
207 | Suite for evaluating requeue calls. | |
208 | ||
d2f3f5d2 DB |
209 | *lock-pi*:: |
210 | Suite for evaluating futex lock_pi calls. | |
211 | ||
121dd9ea DB |
212 | SUITES FOR 'epoll' |
213 | ~~~~~~~~~~~~~~~~~~ | |
214 | *wait*:: | |
215 | Suite for evaluating concurrent epoll_wait calls. | |
d2f3f5d2 | 216 | |
231457ec DB |
217 | *ctl*:: |
218 | Suite for evaluating multiple epoll_ctl calls. | |
219 | ||
2a4b5166 IR |
220 | SUITES FOR 'internals' |
221 | ~~~~~~~~~~~~~~~~~~~~~~ | |
222 | *synthesize*:: | |
223 | Suite for evaluating perf's event synthesis performance. | |
224 | ||
9fbc04f2 HM |
225 | SEE ALSO |
226 | -------- | |
227 | linkperf:perf[1] |