Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
User Commandsmpss.so.1(1)


NAME

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

SYNOPSIS

 mpss.so.1

DESCRIPTION

 

The mpss.so.1 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 mpss.so.1, the following string needs to be present in the environment (see ld.so.1(1)) along with one or more MPSS (Multiple Page Size Support) environment variables:

 
LD_PRELOAD=$LD_PRELOAD:mpss.so.1

ENVIRONMENT VARIABLES

 

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

MPSSHEAP=size
MPSSSTACK=size
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.

MPSSCFGFILE=config-file
config-file is a text file which contains one or more mpss configuration entries of the form:
 
exec-name: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.

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.

MPSSERRFILE=pathname
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.

EXAMPLES

 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=$LD_PRELOAD:mpss.so.1
example$ MPSSCFGFILE=mpsscfg
example$ export LD_PRELOAD MPSSCFGFILE
example$ cat $MPSSCFGFILE
foo*:512K:64K

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=$LD_PRELOAD:mpss.so.1
example$ MPSSHEAP=512K
example$ MPSSSTACK=64K
example$ export LD_PRELOAD MPSSHEAP MPSSSTACK
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, in the configuration file.

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

FILES

 
/usr/lib/ld/map.bssalign
A template link-editor mapfile for aligning bss (see NOTES).

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWesu (32-bit)
 SUNWesxu (64-bit)
Interface StabilityEvolving

SEE ALSO

 

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

NOTES

 

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).


SunOS 5.9Go To TopLast Changed 11 Dec 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.