'\" t .\" Title: perf-bench .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 1.5.7.1 .\" Date: 2018-11-27 .\" Manual: perf Manual .\" Source: perf .\" Language: English .\" .TH "PERF_4.19\-BENCH" "1" "2018-11-27" "perf" "perf Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" perf\-bench \- General framework for benchmark suites .SH "SYNOPSIS" .sp .nf \fIperf bench\fP [] [] .fi .br .SH "DESCRIPTION" .sp This \fIperf bench\fP command is a general framework for benchmark suites. .SH "COMMON OPTIONS" .sp \-r, \-\-repeat= .RS 4 Specify amount of times to repeat the run (default 10). .RE .sp \-f, \-\-format= .RS 4 Specify format style. Current available format styles are: .RE .sp \fIdefault\fP .RS 4 Default style. This is mainly for human reading. .RE .sp .if n .RS 4 .nf % perf bench sched pipe # with no style specified (executing 1000000 pipe operations between two tasks) Total time:5.855 sec 5.855061 usecs/op 170792 ops/sec .fi .if n .RE .sp \fIsimple\fP .RS 4 This simple style is friendly for automated processing by scripts. .RE .sp .if n .RS 4 .nf % perf bench \-\-format=simple sched pipe # specified simple 5.988 .fi .if n .RE .SH "SUBSYSTEM" .sp \fIsched\fP .RS 4 Scheduler and IPC mechanisms. .RE .sp \fImem\fP .RS 4 Memory access performance. .RE .sp \fInuma\fP .RS 4 NUMA scheduling and MM benchmarks. .RE .sp \fIfutex\fP .RS 4 Futex stressing benchmarks. .RE .sp \fIall\fP .RS 4 All benchmark subsystems. .RE .SS "SUITES FOR \fIsched\fP" .sp \fBmessaging\fP .RS 4 Suite for evaluating performance of scheduler and IPC mechanisms. Based on hackbench by Rusty Russell. .RE .SS "Options of \fBmessaging\fP" .sp \-p, \-\-pipe .RS 4 Use pipe() instead of socketpair() .RE .sp \-t, \-\-thread .RS 4 Be multi thread instead of multi process .RE .sp \-g, \-\-group= .RS 4 Specify number of groups .RE .sp \-l, \-\-nr_loops= .RS 4 Specify number of loops .RE .SS "Example of \fBmessaging\fP" .sp .if n .RS 4 .nf % perf bench sched messaging # run with default options (20 sender and receiver processes per group) (10 groups == 400 processes run) Total time:0.308 sec % perf bench sched messaging \-t \-g 20 # be multi\-thread, with 20 groups (20 sender and receiver threads per group) (20 groups == 800 threads run) Total time:0.582 sec .fi .if n .RE .sp \fBpipe\fP .RS 4 Suite for pipe() system call. Based on pipe\-test\-1m.c by Ingo Molnar. .RE .SS "Options of \fBpipe\fP" .sp \-l, \-\-loop= .RS 4 Specify number of loops. .RE .SS "Example of \fBpipe\fP" .sp .if n .RS 4 .nf % perf bench sched pipe (executing 1000000 pipe operations between two tasks) Total time:8.091 sec 8.091833 usecs/op 123581 ops/sec % perf bench sched pipe \-l 1000 # loop 1000 (executing 1000 pipe operations between two tasks) Total time:0.016 sec 16.948000 usecs/op 59004 ops/sec .fi .if n .RE .SS "SUITES FOR \fImem\fP" .sp \fBmemcpy\fP .RS 4 Suite for evaluating performance of simple memory copy in various ways. .RE .SS "Options of \fBmemcpy\fP" .sp \-l, \-\-size .RS 4 Specify size of memory to copy (default: 1MB). Available units are B, KB, MB, GB and TB (case insensitive). .RE .sp \-f, \-\-function .RS 4 Specify function to copy (default: default). Available functions are depend on the architecture. On x86\-64, x86\-64\-unrolled, x86\-64\-movsq and x86\-64\-movsb are supported. .RE .sp \-l, \-\-nr_loops .RS 4 Repeat memcpy invocation this number of times. .RE .sp \-c, \-\-cycles .RS 4 Use perf\(cqs cpu\-cycles event instead of gettimeofday syscall. .RE .sp \fBmemset\fP .RS 4 Suite for evaluating performance of simple memory set in various ways. .RE .SS "Options of \fBmemset\fP" .sp \-l, \-\-size .RS 4 Specify size of memory to set (default: 1MB). Available units are B, KB, MB, GB and TB (case insensitive). .RE .sp \-f, \-\-function .RS 4 Specify function to set (default: default). Available functions are depend on the architecture. On x86\-64, x86\-64\-unrolled, x86\-64\-stosq and x86\-64\-stosb are supported. .RE .sp \-l, \-\-nr_loops .RS 4 Repeat memset invocation this number of times. .RE .sp \-c, \-\-cycles .RS 4 Use perf\(cqs cpu\-cycles event instead of gettimeofday syscall. .RE .SS "SUITES FOR \fInuma\fP" .sp \fBmem\fP .RS 4 Suite for evaluating NUMA workloads. .RE .SS "SUITES FOR \fIfutex\fP" .sp \fBhash\fP .RS 4 Suite for evaluating hash tables. .RE .sp \fBwake\fP .RS 4 Suite for evaluating wake calls. .RE .sp \fBwake\-parallel\fP .RS 4 Suite for evaluating parallel wake calls. .RE .sp \fBrequeue\fP .RS 4 Suite for evaluating requeue calls. .RE .sp \fBlock\-pi\fP .RS 4 Suite for evaluating futex lock_pi calls. .RE .SH "SEE ALSO" .sp perf(1)