Back to home page

OSCL-LXR

 
 

    


0001 perf-bench(1)
0002 =============
0003 
0004 NAME
0005 ----
0006 perf-bench - General framework for benchmark suites
0007 
0008 SYNOPSIS
0009 --------
0010 [verse]
0011 'perf bench' [<common options>] <subsystem> <suite> [<options>]
0012 
0013 DESCRIPTION
0014 -----------
0015 This 'perf bench' command is a general framework for benchmark suites.
0016 
0017 COMMON OPTIONS
0018 --------------
0019 -r::
0020 --repeat=::
0021 Specify amount of times to repeat the run (default 10).
0022 
0023 -f::
0024 --format=::
0025 Specify format style.
0026 Current available format styles are:
0027 
0028 'default'::
0029 Default style. This is mainly for human reading.
0030 ---------------------
0031 % perf bench sched pipe                      # with no style specified
0032 (executing 1000000 pipe operations between two tasks)
0033         Total time:5.855 sec
0034                 5.855061 usecs/op
0035                 170792 ops/sec
0036 ---------------------
0037 
0038 'simple'::
0039 This simple style is friendly for automated
0040 processing by scripts.
0041 ---------------------
0042 % perf bench --format=simple sched pipe      # specified simple
0043 5.988
0044 ---------------------
0045 
0046 SUBSYSTEM
0047 ---------
0048 
0049 'sched'::
0050         Scheduler and IPC mechanisms.
0051 
0052 'syscall'::
0053         System call performance (throughput).
0054 
0055 'mem'::
0056         Memory access performance.
0057 
0058 'numa'::
0059         NUMA scheduling and MM benchmarks.
0060 
0061 'futex'::
0062         Futex stressing benchmarks.
0063 
0064 'epoll'::
0065         Eventpoll (epoll) stressing benchmarks.
0066 
0067 'internals'::
0068         Benchmark internal perf functionality.
0069 
0070 'all'::
0071         All benchmark subsystems.
0072 
0073 SUITES FOR 'sched'
0074 ~~~~~~~~~~~~~~~~~~
0075 *messaging*::
0076 Suite for evaluating performance of scheduler and IPC mechanisms.
0077 Based on hackbench by Rusty Russell.
0078 
0079 Options of *messaging*
0080 ^^^^^^^^^^^^^^^^^^^^^^
0081 -p::
0082 --pipe::
0083 Use pipe() instead of socketpair()
0084 
0085 -t::
0086 --thread::
0087 Be multi thread instead of multi process
0088 
0089 -g::
0090 --group=::
0091 Specify number of groups
0092 
0093 -l::
0094 --nr_loops=::
0095 Specify number of loops
0096 
0097 Example of *messaging*
0098 ^^^^^^^^^^^^^^^^^^^^^^
0099 
0100 ---------------------
0101 % perf bench sched messaging                 # run with default
0102 options (20 sender and receiver processes per group)
0103 (10 groups == 400 processes run)
0104 
0105       Total time:0.308 sec
0106 
0107 % perf bench sched messaging -t -g 20        # be multi-thread, with 20 groups
0108 (20 sender and receiver threads per group)
0109 (20 groups == 800 threads run)
0110 
0111       Total time:0.582 sec
0112 ---------------------
0113 
0114 *pipe*::
0115 Suite for pipe() system call.
0116 Based on pipe-test-1m.c by Ingo Molnar.
0117 
0118 Options of *pipe*
0119 ^^^^^^^^^^^^^^^^^
0120 -l::
0121 --loop=::
0122 Specify number of loops.
0123 
0124 Example of *pipe*
0125 ^^^^^^^^^^^^^^^^^
0126 
0127 ---------------------
0128 % perf bench sched pipe
0129 (executing 1000000 pipe operations between two tasks)
0130 
0131         Total time:8.091 sec
0132                 8.091833 usecs/op
0133                 123581 ops/sec
0134 
0135 % perf bench sched pipe -l 1000              # loop 1000
0136 (executing 1000 pipe operations between two tasks)
0137 
0138         Total time:0.016 sec
0139                 16.948000 usecs/op
0140                 59004 ops/sec
0141 ---------------------
0142 
0143 SUITES FOR 'syscall'
0144 ~~~~~~~~~~~~~~~~~~
0145 *basic*::
0146 Suite for evaluating performance of core system call throughput (both usecs/op and ops/sec metrics).
0147 This uses a single thread simply doing getppid(2), which is a simple syscall where the result is not
0148 cached by glibc.
0149 
0150 
0151 SUITES FOR 'mem'
0152 ~~~~~~~~~~~~~~~~
0153 *memcpy*::
0154 Suite for evaluating performance of simple memory copy in various ways.
0155 
0156 Options of *memcpy*
0157 ^^^^^^^^^^^^^^^^^^^
0158 -l::
0159 --size::
0160 Specify size of memory to copy (default: 1MB).
0161 Available units are B, KB, MB, GB and TB (case insensitive).
0162 
0163 -f::
0164 --function::
0165 Specify function to copy (default: default).
0166 Available functions are depend on the architecture.
0167 On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
0168 
0169 -l::
0170 --nr_loops::
0171 Repeat memcpy invocation this number of times.
0172 
0173 -c::
0174 --cycles::
0175 Use perf's cpu-cycles event instead of gettimeofday syscall.
0176 
0177 *memset*::
0178 Suite for evaluating performance of simple memory set in various ways.
0179 
0180 Options of *memset*
0181 ^^^^^^^^^^^^^^^^^^^
0182 -l::
0183 --size::
0184 Specify size of memory to set (default: 1MB).
0185 Available units are B, KB, MB, GB and TB (case insensitive).
0186 
0187 -f::
0188 --function::
0189 Specify function to set (default: default).
0190 Available functions are depend on the architecture.
0191 On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
0192 
0193 -l::
0194 --nr_loops::
0195 Repeat memset invocation this number of times.
0196 
0197 -c::
0198 --cycles::
0199 Use perf's cpu-cycles event instead of gettimeofday syscall.
0200 
0201 SUITES FOR 'numa'
0202 ~~~~~~~~~~~~~~~~~
0203 *mem*::
0204 Suite for evaluating NUMA workloads.
0205 
0206 SUITES FOR 'futex'
0207 ~~~~~~~~~~~~~~~~~~
0208 *hash*::
0209 Suite for evaluating hash tables.
0210 
0211 *wake*::
0212 Suite for evaluating wake calls.
0213 
0214 *wake-parallel*::
0215 Suite for evaluating parallel wake calls.
0216 
0217 *requeue*::
0218 Suite for evaluating requeue calls.
0219 
0220 *lock-pi*::
0221 Suite for evaluating futex lock_pi calls.
0222 
0223 SUITES FOR 'epoll'
0224 ~~~~~~~~~~~~~~~~~~
0225 *wait*::
0226 Suite for evaluating concurrent epoll_wait calls.
0227 
0228 *ctl*::
0229 Suite for evaluating multiple epoll_ctl calls.
0230 
0231 SUITES FOR 'internals'
0232 ~~~~~~~~~~~~~~~~~~~~~~
0233 *synthesize*::
0234 Suite for evaluating perf's event synthesis performance.
0235 
0236 SEE ALSO
0237 --------
0238 linkperf:perf[1]