This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swapd.man
92 lines (92 loc) · 2.74 KB
/
swapd.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.\" $Id: swapd.man,v 1.2 1995/05/21 20:28:47 alfie Exp alfie $
.TH SWAPD 1 "21st May 1995"
.SH NAME
swapd \- add temporary swap as required
.SH SYNOPSIS
.B swapd -h
.br
.B swapd -v
.br
.B swapd
[
.BI \-d " "dir
] [
.BI \-i " "interval
] [
.BI \-n " "num
] [
.BI \-s " "size
] [
.BI \-l " "lower
] [
.BI \-u " "upper
]
.SH DESCRIPTION
.B Swapd
periodically monitors the amount of free swap available in
the system. It tries to maintain the amount of swap using upper and
lower limits. If the amount of free swap falls below the lower limit,
it will add an extra swapfile. A swap file will be removed if it will
still leave the system with at least the upper limit available.
.PP
Since swapping from a file is less efficient than swapping from a
partition, this can be used to `top up' the swap when needed (but will
also work as the sole source of swap).
.SH OPTIONS
.TP
.B \-h
Print the help summary and exit.
.TP
.B \-v
Print the version number and exit.
.TP
.BI \-p " "prio
This is the priority at which the process is run. Remember that an increased
priority is chosen with a larger negative number. This defaults to -4. If
a positive value is chosen, the process is run with real time scheduling.
.TP
.BI \-d " "dir
This is the directory in which the swap files are created. This must be a
directory, and not a symlink to the directory. This defaults to /var/tmp.
.TP
.BI \-i " "interval
This is the interval between checks on the state of the swap. This
defaults to 1 second.
.TP
.BI \-s " "size
This is the size of the swap file to create. The actual additional swap
will be one page less due to the header in swap file. The largest value
for a swap file on a machine with a 4K page size (Linux/x86) is 127.6875M.
.TP
.BI \-l " "lower
When the free swap falls below this amount, an additional swap file will
be added.
.TP
.BI \-u " "upper
When removing a swap file would leave this amount of swap free, the swap
file is removed. This must be larger than the lower limit.
.TP
.BI \-n " "num
This is the maximum number of swap files to create. Currently the total
number of swap files or partitions is limited by the kernel to 8.
.PP
Values for the size of the swap file, and the upper and lower limits can
be suffixed with the letters 'B', 'K', and 'M' to mean multiply by 512,
1024, and 1048576 respectively.
.SH BUGS
Swapping from a file is
.I much
slower than swapping from a partition.
.PP
If there is a sudden increase in VM requirement,
.B swapd
may not get to run quickly enough to add the necessary swap. This can be
mitigated by having a large lower limit, and reducing the check interval,
but can not be eliminated.
.SH "SEE ALSO"
.BR mkswap(8) ,
.BR swapon(8) ,
.BR swapoff(8) ,
.BR sched_setscheduler(2) .
.SH AUTHOR
Nick Holloway \fC<[email protected]>\fP