MPSS.SO.1(1) User Commands MPSS.SO.1(1) - shared object for setting preferred page size

The shared object provides a means by which the preferred stack and/or heap page size can be selectively configured for launched processes and their descendants. To enable, the following string needs to be present in the environment (see along with one or more MPSS (Multiple Page Size Support) environment variables:


Once preloaded, the shared object reads the following environment variables to determine any preferred page size requirements and any processes these may be specific to.


MPSSHEAP and MPSSSTACK specify the preferred page sizes for the heap and stack, respectively. The specified page size(s) are applied to all created processes.

size must be a supported page size (see pagesize(1)) or 0, in which case the system will select an appropriate page size (see memcntl(2)).

size can be qualified with K, M, G, or T to specify Kilobytes, Megabytes, Gigabytes, or Terabytes respectively.


config-file is a text file which contains one or more mpss configuration entries of the form:

exec-name exec-args:heap-size:stack-size

exec-name specifies the name of an application or executable. The corresponding preferred page size(s) are set for newly created processes (see getexecname(3C)) that match the first exec-name found in the file.

exec-name can be a full pathname, a base name or a pattern string. See File Name Generation in sh(1) for a discussion of pattern matching.

exec-args is an optionally specified pattern string to match against arguments. Preferred page size(s) are set only if exec-args is not specified or occurs within the arguments to exec-name.

If heap-size and/or stack-size are not specified, the corresponding preferred page size(s) will not be set.

MPSSCFGFILE takes precedence over MPSSHEAP and MPSSSTACK. When MPSSCFGFILE is not set, preferred page size settings are taken from file /etc/mpss.conf if it exists.


By default, error messages are logged via syslog(3C) using level LOG_ERR and facility LOG_USER. If MPSSERRFILE contains a valid pathname (such as /dev/stderr), error messages will be logged there instead.

Example 1 Configuring preferred page sizes using MPSSCFGFILE

The following Bourne shell commands (see sh(1)) configure the preferred page sizes to a select set of applications with exec names that begin with foo, using the MPSSCFGFILE environment variable. The MPSS configuration file, mpsscfg, is assumed to have been previously created via a text editor like vi(1). The cat(1) command is only dumping out the contents.

example$ LD_PRELOAD=$
example$ MPSSCFGFILE=mpsscfg
example$ cat $MPSSCFGFILE

Once the application has been started, pmap (see proc(1)) can be used to view the actual page sizes configured:

example$ foobar &
example$ pmap -s `pgrep foobar`

If the desired page size is not configured (shown in the pmap output), it may be due to errors in the MPSS configuration file or environment variables. Check the error log (by default: /var/adm/messages) for errors.

If no errors can be found, resource or alignment constraints may be responsible. See the NOTES section.

Example 2 Configuring preferred page sizes using MPSSHEAP and MPSSSTACK

The following Bourne shell commands configure 512K heap and 64K stack preferred page sizes for all applications using the MPSSHEAP and MPSSSTACK environment variables.

example$ LD_PRELOAD=$
example$ MPSSHEAP=512K
example$ MPSSSTACK=64K

Example 3 Precedence rules (continuation from Example 2)

The preferred page size configuration in MPSSCFGFILE overrides MPSSHEAP and MPSSTACK. Appending the following commands to those in Example 2 would mean that all applications will be configured with 512K heap and 64K stack preferred page sizes with the exception of those applications, the ls command, and all applications beginning with ora that have ora1 as an argument, in the configuration file.

example$ MPSSCFGFILE=mpsscfg2
example$ export MPSSCFGFILE
example$ cat $MPSSCFGFILE
ora* ora1:4m:4m


A template link-editor mapfile for aligning bss (see NOTES).


Configuration file

See attributes(7) for descriptions of the following attributes:

Interface Stability Evolving

cat(1), ld(1),, pagesize(1), ppgsz(1), proc(1), sh(1), vi(1), exec(2), fork(2), memcntl(2), getexecname(3C), getpagesize(3C), syslog(3C), proc(5), attributes(7)

The heap and stack preferred page sizes are inherited. A child process has the same preferred page sizes as its parent. On exec(2), the preferred page sizes are set back to the default system page size unless a preferred page size has been configured via the mpss shared object.

ppgsz(1), a proc tool, can also be used to set the preferred stack and/or heap page sizes. It cannot selectively configure the page size for descendents based on name matches.

See also NOTES under ppgsz(1).

February 20, 2002 OmniOS