1hackbench(8)                                                      hackbench(8)
2
3
4

NAME

6       hackbench - scheduler benchmark/stress test
7

SYNOPSIS

9       hackbench  [-p|--pipe] [-s|--datasize <bytes>] [-l|--loops <num-loops>]
10       [-g|--groups   <num-groups>]   [-f|--fds   <num-fds>]    [-T|--threads]
11       [-P|--process] [-F|--fifo] [--help]
12
13

DESCRIPTION

15       Hackbench  is  both  a benchmark and a stress test for the Linux kernel
16       scheduler. It's main job is to create a specified number  of  pairs  of
17       schedulable  entities  (either  threads or traditional processes) which
18       communicate via either sockets or pipes and time how long it takes  for
19       each pair to send data back and forth.
20
21

OPTIONS

23       These  programs  follow  the  usual  GNU command line syntax, with long
24       options starting with two dashes ("--").
25       A summary of options is included below.
26
27       -p, --pipe
28              Sends the data via a pipe instead of the socket (default)
29
30       -s, --datasize=<size in bytes>
31              Sets the amount of data to send in each message
32
33       -l, --loops=<number of loops>
34              How many messages each sender/receiver pair should send
35
36       -g, --groups=<number of groups>
37              Defines how many groups  of  senders  and  receivers  should  be
38              started
39
40       -f, --fds=<number of file descriptors>
41              Defines  how  many file descriptors each child should use.  Note
42              that the effective number will be twice the amount you set here,
43              as  the  sender  and  receiver children will each open the given
44              amount of file descriptors.
45
46       -T, --threads
47              Each sender/receiver child will be a POSIX thread of the parent.
48
49       -P, --process
50              Hackbench will use fork() on all children (default behaviour)
51
52       -F,--fifo
53              Change the main thread to  SCHED_FIFO  after  creating  workers.
54              This  allows the management thread to run after many workers are
55              created.
56
57       --help
58              Shows a simple help screen
59

EXAMPLES

61       Running hackbench without any  options  will  give  default  behaviour,
62       using  fork()  and sending data between senders and receivers via sock‐
63       ets.
64
65       user@host: ~ $ hackbench
66       Running in process mode with 10 groups using 40 file  descriptors  each
67       (== 400 tasks)
68       Each sender will pass 100 messages of 100 bytes
69       Time: 0.890
70
71       To use pipes between senders and receivers and using threads instead of
72       fork(), run
73
74       user@host: ~ $ hackbench --pipe --threads   (or hackbench -p -T)
75       Running in threaded mode with 10 groups using 40 file descriptors  each
76       (== 400 tasks)
77       Each sender will pass 100 messages of 100 bytes
78       Time: 0.497
79
80       Set  the  datasize  to  512  bytes, do 200 messages per sender/receiver
81       pairs and use 15 groups using 25 file descriptors per child, in process
82       mode.
83
84       user@host: ~ $ hackbench -s 512 -l 200 -g 15 -f 25 -P
85       Running  in  process mode with 15 groups using 50 file descriptors each
86       (== 750 tasks)
87       Each sender will pass 200 messages of 512 bytes
88       Time: 4.497
89

AUTHORS

91       hackbench was written by  Rusty  Russell  <rusty@rustcorp.com.au>  with
92       contributions  from  Yanmin  Zhang <yanmin_zhang@linux.intel.com>, Ingo
93       Molnar <mingo@elte.hu> and David Sommerseth <davids@redhat.com>
94
95       This manual page was written by  Clark  Williams  <williams@redhat.com>
96       and David Sommerseth <davids@redhat.com>
97

HISTORY

99       This  version  of  hackbench  is  based  on  the  code  downloaded from
100       http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c.  Yanmin
101       Zhang merged the original hackbench code from
102       http://devresources.linuxfoundation.org/craiger/hackbench/src/hack
103       bench.c which uses fork() and a modified version from
104       http://www.bullopensource.org/posix/pi-futex/hackbench_pth.c which uses
105       pthread  only and gave the possibility to change behaviour at run time.
106       Hackbench have since then gone through some more rewriting  to  improve
107       error handling and proper tracking of fork()ed children, to avoid leav‐
108       ing zombies on the system if hackbench stops unexpectedly.
109
110
111
112                              February  23, 2010                  hackbench(8)
Impressum