Debian Codegraph @

src/hackbench/hackbench.8

raw
1 .TH "hackbench" "8" "September 19, 2020" "" ""
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 .SH "NAME"
4 hackbench \- scheduler benchmark/stress test
5 .SH "SYNOPSIS"
6 .B hackbench
7 .RI "[\-f|\-\-fds NUM] "
8 .RI "[\-F|\-\-fifo] "
9 .RI "[\-g|\-\-groups NUM] "
10 .RI "[\-h|\-\-help] "
11 .RI "[\-l|\-\-loops LOOPS] "
12 .RI "[\-p|\-\-pipe] "
13 .RI "[\-s|\-\-datasize SIZE] "
14 .RI "[\-T|\-\-threads]"
15 .RI "[\-P|\-\-process]"
16
17 .SH "DESCRIPTION"
18 Hackbench is both a benchmark and a stress test for the Linux kernel
19 scheduler. It's main job is to create a specified number of pairs of
20 schedulable entities (either threads or traditional processes) which
21 communicate via either sockets or pipes and time how long it takes for
22 each pair to send data back and forth.
23
24 .SH "OPTIONS"
25 These programs follow the usual GNU command line syntax, with long
26 options starting with two dashes ("\-\-").
27 .br
28 A summary of options is included below.
29 .TP
30 .B \-f, \-\-fds=NUM
31 Defines how many file descriptors each child should use.
32 Note that the effective number will be twice the amount you set here,
33 as the sender and receiver children will each open the given amount of
34 file descriptors.
35 .TP
36 .B \-F,\-\-fifo
37 Change the main thread to SCHED_FIFO after creating workers.
38 This allows the management thread to run after many workers are created.
39 .TP
40 .B \-g, \-\-groups=NUM
41 Defines how many groups of senders and receivers should be started
42 .TP
43 .B \-h, \-\-help
44 .TP
45 .B \-l, \-\-loops=LOOPS
46 How many messages each sender/receiver pair should send
47 .TP
48 .B \-p, \-\-pipe
49 Sends the data via a pipe instead of the socket (default)
50 .TP
51 .B \-s, \-\-datasize=SIZE
52 Sets the amount of data to send in each message
53 .TP
54 .B \-T, \-\-threads
55 Each sender/receiver child will be a POSIX thread of the parent.
56 .TP
57 .B \-P, \-\-process
58 Hackbench will use fork() on all children (default behaviour)
59 .br
60 Shows a simple help screen
61 .SH "EXAMPLES"
62 .LP
63 Running hackbench without any options will give default behaviour,
64 using fork() and sending data between senders and receivers via sockets.
65 .LP
66 user@host: ~ $ hackbench
67 .br
68 Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks)
69 .br
70 Each sender will pass 100 messages of 100 bytes
71 .br
72 Time: 0.890
73 .LP
74 To use pipes between senders and receivers and using threads instead of fork(), run
75 .LP
76 user@host: ~ $ hackbench \-\-pipe \-\-threads (or hackbench \-p \-T)
77 .br
78 Running in threaded mode with 10 groups using 40 file descriptors each (== 400 tasks)
79 .br
80 Each sender will pass 100 messages of 100 bytes
81 .br
82 Time: 0.497
83 .LP
84 Set the datasize to 512 bytes, do 200 messages per sender/receiver pairs and use 15 groups
85 using 25 file descriptors per child, in process mode.
86 .LP
87 user@host: ~ $ hackbench \-s 512 \-l 200 \-g 15 \-f 25 \-P
88 .br
89 Running in process mode with 15 groups using 50 file descriptors each (== 750 tasks)
90 .br
91 Each sender will pass 200 messages of 512 bytes
92 .br
93 Time: 4.497
94 .SH "AUTHORS"
95 .LP
96 hackbench was written by Rusty Russell <[email protected]>
97 with contributions from Yanmin Zhang <[email protected]>,
98 Ingo Molnar <[email protected]> and David Sommerseth <[email protected]>
99
100 This manual page was written by Clark Williams <[email protected]>
101 and David Sommerseth <[email protected]>
102 .SH "HISTORY"
103 This version of hackbench is based on the code downloaded from http://people.redhat.com/mingo/cfs\-scheduler/tools/hackbench.c.
104 Yanmin Zhang merged the original hackbench code from
105 .br
106 http://devresources.linuxfoundation.org/craiger/hackbench/src/hackbench.c
107 which uses fork() and a modified version from
108 .br
109 http://www.bullopensource.org/posix/pi\-futex/hackbench_pth.c
110 which uses pthread only and gave the possibility to change
111 behaviour at run time. Hackbench have since then gone through some
112 more rewriting to improve error handling and proper tracking of fork()ed
113 children, to avoid leaving zombies on the system if hackbench stops
114 unexpectedly.