1SPAUSEDD(8)               BSD System Manager's Manual              SPAUSEDD(8)
2

NAME

4     spausedd — Utility to detect and log scheduler pause
5

SYNOPSIS

7     spausedd [-dDfhp] [-m steal_threshold] [-t timeout]
8

DESCRIPTION

10     The spausedd utility is used for detecting and logging scheduler pause.
11     This means, when process should have been scheduled, but it was not. It's
12     also able to use steal time (time spent in other operating systems when
13     running in a virtualized environment) so it is (to some extend) able to
14     detect if problem is on the VM or host side.  spausedd is able to read
15     information about steal time ether from kernel or (if compiled in) also
16     use VMGuestLib.  Internally spausedd works as following pseudocode:
17
18           repeat:
19               store current monotonic time
20               store current steal time
21               sleep for (timeout / 3)
22               set time_diff to (current monotonic time - stored monotonic time)
23               if time_diff > timeout:
24                   display error
25                   set steal_time_diff to (current steal time - stored steal time)
26                   if (steal_time_diff / time_diff) * 100 > steal_threshold:
27                       display steal time error
28
29     spausedd arguments are as follows:
30
31     -d      Display debug messages (specify twice to display also trace mes‐
32             sages).
33
34     -D      Run on background (daemonize).
35
36     -f      Run on foreground (do not demonize - default).
37
38     -h      Show help.
39
40     -p      Do not set RR scheduler.
41
42     -t steal_threshold
43             Set steal threshold percent. (default is 10 if kernel information
44             is used and 100 if VMGuestLib is used).
45
46     -t timeout
47             Set timeout value in milliseconds (default 200).
48
49     If spausedd receives a SIGUSR1 signal, the current statistics are show.
50

EXAMPLES

52     To generate CPU load yes(1) together with chrt(1) is used in following
53     examples:
54
55           chrt -r 99 yes >/dev/null &
56
57     If chrt fails it may help to use cgexec(1) like:
58
59           cgexec -g cpu:/ chrt -r 99 yes >/dev/null &
60
61     First example is physical or virtual machine with 4 CPU threads so yes(1)
62     was executed 4 times. In a while spausedd should start logging messages
63     similar to:
64
65           Mar 20 15:01:54 spausedd: Running main poll loop with maximum
66           timeout 200 and steal threshold 10%
67           Mar 20 15:02:15 spausedd: Not scheduled for 0.2089s (threshold is
68           0.2000s), steal time is 0.0000s (0.00%)
69           Mar 20 15:02:16 spausedd: Not scheduled for 0.2258s (threshold is
70           0.2000s), steal time is 0.0000s (0.00%)
71           ...
72
73     This means that spausedd didn't got time to run for longer time than
74     default timeout. It's also visible that steal time was 0% so spausedd is
75     running ether on physical machine or VM where host machine is not over‐
76     loaded (VM was scheduled on time).
77
78     Second example is a host machine with 2 CPU threads running one VM. VM is
79     running an instance of spausedd. Two instancies of yes(1) was executed on
80     the host machine. After a while spausedd should start logging messages
81     similar to:
82
83           Mar 20 15:08:20 spausedd: Not scheduled for 0.9598s (threshold is
84           0.2000s), steal time is 0.7900s (82.31%)
85           Mar 20 15:08:20 spausedd: Steal time is > 10.0%, this is usually
86           because of overloaded host machine
87           ...
88
89     This means that spausedd didn't got the time to run for almost one sec‐
90     ond. Also because steal time is high, it means that spausedd was not
91     scheduled because VM wasn't scheduled by host machine.
92

DIAGNOSTICS

94     The spausedd utility exits 0 on success, and >0 if an error occurs.
95

AUTHORS

97     The spausedd utility was written by Jan Friesse <jfriesse@redhat.com>.
98

BUGS

100     -   OS is not updating steal time as often as monotonic clock. This means
101         that steal time difference can be (and very often is) bigger than
102         monotonic clock difference, so steal time percentage can be bigger
103         than 100%. It's happening very often for highly overloaded host
104         machine when spausedd is called with small timeout. This problem is
105         even bigger when VMGuestLib is used.
106
107     -   VMGuestLib seems to randomly block.
108
109BSD                              Mar 21, 2018                              BSD
Impressum