-
Notifications
You must be signed in to change notification settings - Fork 14
/
adaptivemmd.8
149 lines (142 loc) · 4.78 KB
/
adaptivemmd.8
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.\" adaptivemmd -- Free memory optimization daemon.
.\" Copyright (C) 2020 Oracle Corp
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License version 2
.\" as published by the Free Software Foundation.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License along
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.\" Manual page for adaptivemmd
.TH adaptivemmd 8 "September 2 2020"
.SH NAME
adaptivemmd \- Memory optimizer daemon
.SH SYNOPSIS
.ft 3
adaptivemmd [-dvhs] [-m max_gb] [-a level]
.SH DESCRIPTION
adaptivemmd
daemon monitors the state of free memory on the system and optimizes
availability of free pages as much as possible.
.LP
adaptivemmd monitors current state of free pages overall and free
pages of each order. Based upon current rate of free pages
consumption and memory fragmentation, it predicts if system is
likely to run out of memory or if memory will become severely
fragmented in near future. If so, it adjusts watermarks to force
memory reclamation if system is about to run out of memory. If
memory is predicted to become severely fragmented, it triggers
compaction in the kernel. The goal is to avert memory shortage
and/or fragmentation by taking proactive measures. To arrive at this
prediction, adaptivemmd samples free pages of each order on each
node periodically and fits a straight line using method of least
squares to these sample points. It also computes current reclamation
rate by monitoring
.B /proc/vmstat.
The equation derived for best fit
line is used to compute when free memory exhaustion will occur
taking into account current reclamation rate. If this exhaustion is
imminent in near future, watermarks are adjusted to initiate
reclamation.
.SH OPTIONS
adaptivemmd supports following optional command line arguments:
.TP
.B \-d
Debug mode. adaptivemmd will not run as daemon in debug mode.
.TP
.B \-v
Enable verbose mode. Use multiple \-v options to increases verbosity level.
.TP
.B \-h
Show command line help
.TP
.B \-s
Simulate a run. Combined with \-v, this can be used to check what actions
adaptivemmd will take if it were running for real. WARNING: This option
is of limited use since each action taken by adaptivemmd for real affects
free memory state and hence future actions. Actions reported by this option
are useful only to understand adaptivemmd behavior and will not correlate
necessarily with actions adaptivemmd would have taken if it were running
for real.
.TP
.B \-m max_gb
Maximum amount of gap (in GB) allowed between low and high watermarks as
adaptivemmd adjusts watermarks. This can be used to set a cap on high
watermark for the system.
.TP
.B \-a level
Aggressiveness level for optimizations. Supported levels are:
.nf
.in +4
1 Low: Sample memory stats at longer interval
and make slow gradual adjustments to system
2 Normal: Sample memory stats at a normal level
so as to not add siginificant system load and
make adjustments at normal level
3 High: Sample memory stats more frequently and
make frequent adjustments to system to maintain
high number of free pages available
.in -4
.fi
.SH CONFIGURATION
.PP
Following configuration options are available in the configuration file
(/etc/sysconfig/adaptivemmd or /etc/default/adaptivemmd):
.PP
\fBVERBOSE\fR (number)
.RS 4
Verbosity level (0-5), higher level results in more information being logged
.RE
.PP
\fBAGGRESSIVENESS\fR (number)
.RS 4
Aggressiveness level (1-3) for optimizations, higher numbers mean more
aggressive optimization
.RE
.PP
\fBENABLE_FREE_PAGE_MGMT\fR (number)
.RS 4
Allow adaptivemmd to do free page management. A non-zero value enables
free page management while a value of 0 disables it.
.RE
.PP
\fBMAXGAP\fR (number)
.RS 4
Maximum amount of gap (in GB) allowed between low and high watermarks
.RE
.PP
\fBENABLE_NEG_DENTRY_MGMT\fR (number)
.RS 4
Allow adaptivemmd to manage number of negative dentries in cache. A
non-zero value enables negative dentry management while a value of 0
disables it.
.RE
.PP
\fBNEG_DENTRY_CAP\fR (number)
.RS 4
Cap for memory consumed by negative dentries as a fraction of 1000.
Range of values supported by kernel is 1-100.
.RE
.PP
\fBENABLE_MEMLEAK_CHECK\fR (number)
.RS 4
Allow adaptivemmd to check for possible memory leaks. A
non-zero value enables memory leak check while a value of 0
disables it.
.RE
.SH FILES
.PD 0
.B /etc/sysconfig/adaptivemmd
.br
.B /etc/default/adaptivemmd
.br
.PD
.SH AUTHORS
Khalid Aziz <khalid.aziz@oracle.com>