Debian Codegraph @

man/hugectl.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 HUGECTL 8 "October 10, 2008"
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 hugectl \- Control policy for backing text, data and malloc() with hugepages
20 .SH SYNOPSIS
21 .B hugectl [options] command {arguments}
22 .SH DESCRIPTION
23
24 \fBhugectl\fP runs processes with a specific policy for backing memory regions
25 with hugepages. The use of hugepages benefit applications that use large
26 amounts of address space and suffer a performance hit due to TLB misses.
27 Policy is enforced by \fBlibhugetlbfs\fP and \fBhugectl\fP configures the
28 environment based on the options provided. Wall-clock time or oprofile can
29 be used to determine if there is a performance benefit from using hugepages
30 or not.
31
32 To effectively back text/data, the target process must be relinked to align
33 the ELF segments on a hugepage boundary. The library also supports more options
34 for the control of memory regions than are exposed by the \fBhugectl\fP
35 utility. See the \fBlibhugetlbfs\fP manual page for more details.
36
37 The following options affect what memory regions are backed by hugepages.
38
39 .TP
40 .B --text[=<size>],--data[=<size>],--bss[=<size>]
41 Back the text, data or BSS segments with hugepages, optionally with pages
42 of the specified size. To be effective, the process must be relinked
43 as described in the HOWTO to align the ELF segments. It is possible to
44 partially back segments using the HUGETLB_FORCE_ELMAP environment variable
45 as described in the \fBlibhugetlbfs\fP manual page.
46
47 .TP
48 .B --heap[=<size>]
49 Use the glibc morecore hook to back malloc() with hugepages, optionally
50 with pages of the specified size. Note that this does not affect brk()
51 segments and applications that use custom allocators potentially do not
52 use hugepages for their heap even with this option specified.
53
54 .TP
55 .B --shm
56 This option overrides shmget() to back shared memory regions with hugepages
57 if possible. Segment size requests will be aligned to fit to the default
58 hugepage size region.
59
60 .TP
61 .B --share-text
62 Request that multiple application instances share text segments that are
63 backed with huge pages. This option sets the environment variable
64 HUGETLB_SHARE to 1.
65
66 .TP
67 .B --thp
68 Align heap regions to huge page size for promotion by khugepaged. For more
69 information on transparent huge pages see linux-2.6/Documentation/transhuge.txt
70
71 .PP
72 The following options affect how \fBhugectl\fP behaves.
73
74 .TP
75 .B --no-preload
76 Disable any pre-loading of the \fBlibhugetlbfs\fP library. This may be necessary
77 if only the heap is being backed by hugepages and the application is already
78 linked against the library. \fBhugectl\fP may pre-load the library by mistake
79 and this option prevents that.
80
81 .TP
82 .B --force-preload
83 Force pre-loading of the \fBlibhugetlbfs\fP library. This option is used when
84 the segments of the binary are aligned to the hugepage boundary of interest
85 but the binary is not linked against libhugetlbfs. This is useful on PPC64
86 where binaries are aligned to 64K as required by the ABI and the kernel is
87 using a 4K base pagesize.
88
89 .TP
90 .B --no-reserve
91 By default, huge pages are reserved at mmap() time so future faults will
92 succeed. This avoids unexpected application but some applications depend
93 on memory overcommit to create large sparse mappings. For this type of
94 application, this switch will create huge page backed mappings without a
95 reservation if the kernel is recent enough to make this operation safe.
96 Use this option with extreme care as in the event huge pages are not
97 available when the mapping is faulted, the application will be killed.
98
99 .TP
100 .B --dry-run
101 Instead of running the process, the \fBhugectl\fP utility will describe what
102 environment variables it set for \fBlibhugetlbfs\fP. This is useful if
103 additional environment variables are to be set and a launcher shell script is
104 being developed.
105
106 .TP
107 .B --library-use-path
108 By default, \fBhugectl\fP will use the version of \fBlibhugetlbfs\fP it was
109 installed with, even if this is not in the LD_LIBRARY_PATH environment. Using
110 this option forces \fBhugectl\fP to use the version of \fBlibhugetlbfs\fP
111 installed in the library system path.
112
113 .TP
114 .B --library-path <path>
115 This option forces \fBhugectl\fP to use the \fBlibhugetlbfs\fP libraries within
116 the given prefix.
117
118 .PP
119 The following options affect the verbosity of libhugetlbfs.
120
121 .TP
122 .B --verbose <level>, -v
123 The default value for the verbosity level is 1 and the range of the value can
124 be set with --verbose from 0 to 99. The higher the value, the more verbose the
125 library will be. 0 is quiet and 3 will output much debugging information. The
126 verbosity level is increased by one each time -v is specified.
127
128 .TP
129 .B -q
130 The -q option will drecease the verbosity level by 1 each time it is specified
131 to a minimum of 0.
132
133 .SH SEE ALSO
134 .I oprofile(1),
135 .I hugeadm(7),
136 .I libhugetlbfs(7)
137 .br
138 .SH AUTHORS
139 libhugetlbfs was written by various people on the libhugetlbfs-devel
140 mailing list.
141