1mpss.so.1(1)                     User Commands                    mpss.so.1(1)
2
3
4

NAME

6       mpss.so.1 - shared object for setting preferred page size
7

SYNOPSIS

9       mpss.so.1
10
11

DESCRIPTION

13       The  mpss.so.1  shared  object  provides a means by which the preferred
14       stack and/or heap page size can be selectively configured for  launched
15       processes  and  their  descendants.  To enable mpss.so.1, the following
16       string needs to be present in the environment  (see  ld.so.1(1))  along
17       with  one  or  more MPSS (Multiple Page Size Support) environment vari‐
18       ables:
19
20         LD_PRELOAD=$LD_PRELOAD:mpss.so.1
21
22
23

ENVIRONMENT VARIABLES

25       Once preloaded, the mpss.so.1 shared object reads the  following  envi‐
26       ronment variables to determine any preferred page size requirements and
27       any processes these may be specific to.
28
29       MPSSHEAP=size              MPSSHEAP and MPSSSTACK specify the preferred
30       MPSSSTACK=size             page  sizes  for the heap and stack, respec‐
31                                  tively.  The  specified  page  size(s)   are
32                                  applied to all created processes.
33
34                                  size  must  be  a  supported  page size (see
35                                  pagesize(1)) or 0, in which case the  system
36                                  will  select  an  appropriate page size (see
37                                  memcntl(2)).
38
39                                  size can be qualified with K, M, G, or T  to
40                                  specify  Kilobytes, Megabytes, Gigabytes, or
41                                  Terabytes respectively.
42
43
44       MPSSCFGFILE=config-file    config-file is a text  file  which  contains
45                                  one  or  more  mpss configuration entries of
46                                  the form:
47
48                                    exec-name exec-args:heap-size:stack-size
49
50
51                                  exec-name specifies the name of an  applica‐
52                                  tion  or  executable. The corresponding pre‐
53                                  ferred page size(s) are set for  newly  cre‐
54                                  ated  processes  (see  getexecname(3C)) that
55                                  match the first exec-name found in the file.
56
57                                  exec-name can be a  full  pathname,  a  base
58                                  name or a pattern string. See File Name Gen‐
59                                  eration in sh(1) for a discussion of pattern
60                                  matching.
61
62                                  exec-args is an optionally specified pattern
63                                  string to match against arguments. Preferred
64                                  page  size(s)  are  set only if exec-args is
65                                  not specified or occurs within the arguments
66                                  to exec-name.
67
68                                  If heap-size and/or stack-size are not spec‐
69                                  ified,  the  corresponding  preferred   page
70                                  size(s) will not be set.
71
72                                  MPSSCFGFILE  takes  precedence over MPSSHEAP
73                                  and MPSSSTACK. When MPSSCFGFILE is not  set,
74                                  preferred  page size settings are taken from
75                                  file /etc/mpss.conf if it exists.
76
77
78       MPSSERRFILE=pathname       By default, error messages  are  logged  via
79                                  syslog(3C)  using level LOG_ERR and facility
80                                  LOG_USER. If MPSSERRFILE  contains  a  valid
81                                  pathname  (such  as /dev/stderr), error mes‐
82                                  sages will be logged there instead.
83
84

EXAMPLES

86       Example 1 Configuring preferred page sizes using MPSSCFGFILE
87
88
89       The following Bourne shell commands (see sh(1)) configure the preferred
90       page  sizes  to a select set of applications with exec names that begin
91       with foo, using the MPSSCFGFILE environment variable. The MPSS configu‐
92       ration  file, mpsscfg, is assumed to have been previously created via a
93       text editor like vi(1). The cat(1) command is only dumping out the con‐
94       tents.
95
96
97         example$ LD_PRELOAD=$LD_PRELOAD:mpss.so.1
98         example$ MPSSCFGFILE=mpsscfg
99         example$ export LD_PRELOAD MPSSCFGFILE
100         example$ cat $MPSSCFGFILE
101         foo*:512K:64K
102
103
104
105
106       Once  the  application has been started, pmap (see proc(1)) can be used
107       to view the actual page sizes configured:
108
109
110         example$ foobar &
111         example$ pmap -s `pgrep foobar`
112
113
114
115
116       If the desired page size is not configured (shown in the pmap  output),
117       it  may  be due to errors in the MPSS configuration file or environment
118       variables. Check the error  log  (by  default:  /var/adm/messages)  for
119       errors.
120
121
122
123       If  no  errors  can  be found, resource or alignment constraints may be
124       responsible. See the NOTES section.
125
126
127       Example 2 Configuring preferred page sizes using MPSSHEAP and MPSSSTACK
128
129
130       The following Bourne shell commands configure 512K heap and  64K  stack
131       preferred  page  sizes  for  all  applications  using  the MPSSHEAP and
132       MPSSSTACK environment variables.
133
134
135         example$ LD_PRELOAD=$LD_PRELOAD:mpss.so.1
136         example$ MPSSHEAP=512K
137         example$ MPSSSTACK=64K
138         example$ export LD_PRELOAD MPSSHEAP MPSSSTACK
139
140
141
142       Example 3 Precedence rules (continuation from Example 2)
143
144
145       The preferred page size configuration in MPSSCFGFILE overrides MPSSHEAP
146       and  MPSSTACK.  Appending  the following commands to those in Example 2
147       would mean that all applications will be configured with 512K heap  and
148       64K  stack  preferred  page  sizes with the exception of those applica‐
149       tions, the ls command, and all applications  beginning  with  ora  that
150       have ora1 as an argument, in the configuration file.
151
152
153         example$ MPSSCFGFILE=mpsscfg2
154         example$ export MPSSCFGFILE
155         example$ cat $MPSSCFGFILE
156         ls::
157         ora* ora1:4m:4m
158
159
160

FILES

162       /usr/lib/ld/map.bssalign     A  template link-editor mapfile for align‐
163                                    ing bss (see NOTES).
164
165
166       /etc/mpss.conf               Configuration file
167
168

ATTRIBUTES

170       See attributes(5) for descriptions of the following attributes:
171
172
173
174
175       ┌─────────────────────────────┬─────────────────────────────┐
176       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
177       ├─────────────────────────────┼─────────────────────────────┤
178       │Availability                 │SUNWesu (32-bit)             │
179       ├─────────────────────────────┼─────────────────────────────┤
180       │                             │SUNWesxu (64-bit)            │
181       ├─────────────────────────────┼─────────────────────────────┤
182       │Interface Stability          │Evolving                     │
183       └─────────────────────────────┴─────────────────────────────┘
184

SEE ALSO

186       cat(1),  ld(1),  ld.so.1(1),  pagesize(1),  ppgsz(1),  proc(1),  sh(1),
187       vi(1),  exec(2), fork(2), memcntl(2), getexecname(3C), getpagesize(3C),
188       syslog(3C), proc(4), attributes(5)
189

NOTES

191       The heap and stack preferred page sizes are inherited. A child  process
192       has  the  same preferred page sizes as its parent. On exec(2), the pre‐
193       ferred page sizes are set back to the default system page size unless a
194       preferred page size has been configured via the mpss shared object.
195
196
197       ppgsz(1),  a  proc  tool,  can  also be used to set the preferred stack
198       and/or heap page sizes. It cannot selectively configure the  page  size
199       for descendents based on name matches.
200
201
202       See also NOTES under ppgsz(1).
203
204
205
206SunOS 5.11                        20 Feb 2002                     mpss.so.1(1)
Impressum