Debian Codegraph @

man/hugeadm.8

raw
1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH HUGEADM 8 "October 1, 2009"
6 .\" Please adjust this date whenever revising the manpage.
7 .\"
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
18 .SH NAME
19 hugeadm \- Configure the system huge page pools
20 .SH SYNOPSIS
21 .B hugeadm [options]
22 .SH DESCRIPTION
23
24 \fBhugeadm\fP displays and configures the systems huge page pools. The size
25 of the pools is set as a minimum and maximum threshold. The minimum value
26 is allocated up front by the kernel and guaranteed to remain as hugepages
27 until the pool is shrunk. If a maximum is set, the system will dynamically
28 allocate pages if applications request more hugepages than the minimum size
29 of the pool. There is no guarantee that more pages than this minimum pool
30 size can be allocated.
31
32 The following options create mounts hugetlbfs mount points.
33
34 .TP
35 .B --create-mounts
36
37 This creates mount points for each supported huge page size under
38 /var/lib/hugetlbfs. After creation they are mounts and are owned by
39 root:root with permissions set to 770. Each mount point is named
40 pagesize-<size in bytes>.
41
42 .TP
43 .B --create-user-mounts=<user>
44
45 This creates mount points for each supported huge page size under
46 /var/lib/hugetlbfs/user/<user>. Mount point naming is the same as
47 --create-mounts. After creation they are mounted and are owned by
48 <user>:root with permissions set to 700.
49
50 .TP
51 .B --create-group-mounts=<group>
52
53 This creates mount points for each supported huge page size under
54 /var/lib/hugetlbfs/group/<group>. Mount point naming is the same as
55 --create-mounts. After creation they are mounted and are owned by
56 root:<group> with permissions set to 070.
57
58 .TP
59 .B --create-global-mounts
60
61 This creates mount points for each supported huge page size under
62 /var/lib/hugetlbfs/global. Mount point naming is the same as
63 --create-mounts. After creation they are mounted and are owned by
64 root:root with permissions set to 1777.
65
66 The following options affect how mount points are created.
67
68 .TP
69 .B --max-size
70
71 This option is used in conjunction with --create-*-mounts. It limits the
72 maximum amount of memory used by files within the mount point rounded up
73 to the nearest huge page size. This can be used for example to grant
74 different huge page quotas to individual users or groups.
75
76 .TP
77 .B --max-inodes
78
79 This option is used in conjunction with --create-*-mounts. It limits the
80 number of inodes (e.g. files) that can be created on the new mount points.
81 This limits the number of mappings that can be created on a mount point. It
82 could be used for example to limit the number of application instances that
83 used a mount point as long as it was known how many inodes each application
84 instance required.
85
86 The following options display information about the pools.
87
88 .TP
89 .B --pool-list
90
91 This displays the Minimum, Current and Maximum number of huge pages in the pool
92 for each pagesize supported by the system. The "Minimum" value is the size of
93 the static pool and there will always be at least this number of hugepages in
94 use by the system, either by applications or kept by the kernel in a reserved
95 pool. The "Current" value is the number of hugepages currently in use, either
96 by applications or stored on the kernels free list. The "Maximum" value is the
97 largest number of hugepages that can be in use at any given time.
98
99 .TP
100 .B --set-recommended-min_free_kbytes
101
102 Fragmentation avoidance in the kernel depends on avoiding pages of different
103 mobility types being mixed with a pageblock arena - typically the size of
104 the default huge page size. The more mixing that occurs, the less likely
105 the huge page pool will be able to dynamically resize. The easiest means of
106 avoiding mixing is to increase /proc/sys/vm/min_free_kbytes. This parameter
107 sets min_free_kbytes to a recommended value to aid fragmentation avoidance.
108
109 .TP
110 .B --set-recommended-shmmax
111
112 The maximum shared memory segment size should be set to at least the size
113 of the largest shared memory segment size you want available for applications
114 using huge pages, via /proc/sys/kernel/shmmax. Optionally, it can be set
115 automatically to match the maximum possible size of all huge page allocations
116 and thus the maximum possible shared memory segment size, using this switch.
117
118 .TP
119 .B --set-shm-group=<gid|groupname>
120
121 Users in the group specified in /proc/sys/vm/hugetlb_shm_group are granted
122 full access to huge pages. The sysctl takes a numeric gid, but this hugeadm
123 option can set it for you, using either a gid or group name.
124
125 .TP
126 .B --page-sizes
127
128 This displays every page size supported by the system and has a pool
129 configured.
130
131 .TP
132 .B --page-sizes-all
133
134 This displays all page sizes supported by the system, even if no pool is
135 available.
136
137 .TP
138 .B --list-all-mounts
139
140 This displays all active mount points for hugetlbfs.
141
142 .PP
143 The following options configure the pool.
144
145 .TP
146 .B --pool-pages-min=<size|DEFAULT>:[+|-]<pagecount|memsize<G|M|K>>
147
148 This option sets or adjusts the Minimum number of hugepages in the pool for
149 pagesize \fBsize\fP. \fBsize\fP may be specified in bytes or in kilobytes,
150 megabytes, or gigabytes by appending K, M, or G respectively, or as DEFAULT,
151 which uses the system's default huge page size for \fBsize\fP. The pool size
152 adjustment can be specified by \fBpagecount\fP pages or by \fBmemsize\fP, if
153 postfixed with G, M, or K, for gigabytes, megabytes, or kilobytes,
154 respectively. If the adjustment is specified via \fBmemsize\fP, then the
155 \fBpagecount\fP will be calculated for you, based on page size \fBsize\fP.
156 The pool is set to \fBpagecount\fP pages if + or - are not specified. If
157 + or - are specified, then the size of the pool will adjust by that amount.
158 Note that there is no guarantee that the system can allocate the hugepages
159 requested for the Minimum pool. The size of the pools should be checked after
160 executing this command to ensure they were successful.
161
162 .TP
163 .B --obey-numa-mempol
164
165 This option requests that allocation of huge pages to the static pool with
166 \fB--pool-pages-min\fP obey the NUMA memory policy of the current process. This
167 policy can be explicitly specified using numactl or inherited from a parent
168 process.
169
170 .TP
171 .B --pool-pages-max=<size|DEFAULT>:[+|-]<pagecount|memsize<G|M|K>>
172
173 This option sets or adjusts the Maximum number of hugepages. Note that while
174 the Minimum number of pages are guaranteed to be available to applications,
175 there is not guarantee that the system can allocate the pages on demand when
176 the number of huge pages requested by applications is between the Minimum and
177 Maximum pool sizes. See --pool-pages-min for usage syntax.
178
179 .TP
180 .B --enable-zone-movable
181
182 This option enables the use of the MOVABLE zone for the allocation of
183 hugepages. This zone is created when kernelcore= or movablecore= are specified
184 on the kernel command line but the zone is not used for the allocation of
185 huge pages by default as the intended use for the zone may be to guarantee
186 that memory can be off-lined and hot-removed. The kernel guarantees that
187 the pages within this zone can be reclaimed unlike some kernel buffers
188 for example. Unless pages are locked with mlock(), the hugepage pool can
189 grow to at least the size of the movable zone once this option is set. Use
190 sysctl to permanently enable the use of the MOVABLE zone for the allocation
191 of huge pages.
192
193 .TP
194 .B --disable-zone-movable
195
196 This option disables the use of the MOVABLE zone for the future allocation of
197 huge pages. Note that existing huge pages are not reclaimed from the zone.
198 Use sysctl to permanently disable the use of the MOVABLE zone for the
199 allocation of huge pages.
200
201 .TP
202 .B --hard
203
204
205 This option is specified with --pool-pages-min to retry allocations multiple
206 times on failure to allocate the desired count of pages. It initially tries
207 to resize the pool up to 5 times and continues to try if progress is being
208 made towards the resize.
209
210 .TP
211 .B --add-temp-swap<=count>
212
213 This options is specified with --pool-pages-min to initialize a temporary
214 swap file for the duration of the pool resize. When increasing the size of
215 the pool, it can be necessary to reclaim pages so that contiguous memory is
216 freed and this often requires swap to be successful. Swap is only created for
217 a positive resize, and is then removed once the resize operation is completed.
218 The default swap size is 5 huge pages, the optional argument <count> sets
219 the swap size to <count> huge pages.
220
221 .TP
222 .B --add-ramdisk-swap
223
224 This option is specified with --pool-pages-min to initialize swap in memory
225 on ram disks. When increasing the size of the pool, it can be necessary to
226 reclaim pages so that contiguous memory is freed and this often requires swap
227 to be successful. If there isn't enough free disk space, swap can be
228 initialized in RAM using this option. If the size of one ramdisk is not
229 greater than the huge page size, then swap is initialized on multiple ramdisks.
230 Swap is only created for a positive resize, and by default is removed once
231 the resize operation is completed.
232
233 .TP
234 .B --persist
235
236 This option is specified with the --add-temp-swap or --add-ramdisk-swap to
237 make the swap space persist after the resize operation is completed. The swap
238 spaces can later be removed manually using the swapoff command.
239
240 .PP
241 The following options tune the transparent huge page usage
242
243 .TP
244 .B --thp-always
245
246 Enable transparent huge pages always
247
248 .TP
249 .B --thp-madvise
250
251 Enable transparent huge pages only on madvised regions
252
253 .TP
254 .B --thp-never
255
256 Disable transparent huge pages
257
258 .TP
259 .B --thp-khugepaged-pages <pages to scan>
260
261 Configure the number of pages that khugepaged should scan on each pass
262
263 .TP
264 .B --thp-khugepaged-scan-sleep <milliseconds>
265
266 Configure how many milliseconds khugepaged should wait between passes
267
268 .TP
269 .B --thp-khugepaged-alloc-sleep <milliseconds>
270
271 Configure how many milliseconds khugepaged should wait after failing to
272 allocate a huge page to throttle the next attempt.
273
274 .PP
275 The following options affect the verbosity of libhugetlbfs.
276
277 .TP
278 .B --verbose <level>, -v
279
280 The default value for the verbosity level is 1 and the range of the value can
281 be set with --verbose from 0 to 99. The higher the value, the more verbose the
282 library will be. 0 is quiet and 3 will output much debugging information. The
283 verbosity level is increased by one each time -v is specified.
284
285 .SH SEE ALSO
286 .I oprofile(1),
287 .I pagesize(1),
288 .I libhugetlbfs(7),
289 .I hugectl(8),
290 .br
291 .SH AUTHORS
292 libhugetlbfs was written by various people on the libhugetlbfs-devel
293 mailing list.
294