Custom Search

April 14, 2010

Solaris 10 Tuning


DOCUMENTATION: Tuning Solaris 10 shared memory for NetBackup Media Server processes (bptm)

Exact Error Message
EXIT STATUS 89: problems encountered during setup of shared memory
Details:
Introduction
Prior to Solaris 10, shared memory tuning was performed by adding or changing entries in the /etc/system file and rebooting the server - see TechNote 295295 (linked below) for advice on tuning Solaris 9 and earlier.

With the introduction of Solaris 10, Sun have deprecated the use of /etc/system settings and introduced the Resource Controls Facility. This allows projects to be created for applications and the resources tuned dynamically on a per-project basis.

As part of this change, Sun set the default amount of shared memory to be 25% of the total system memory. For most NetBackup media server configurations this default will be sufficient. If not then NetBackup jobs may fail with the error:

EXIT STATUS 89: problems encountered during setup of shared memory

If this happens, the instructions in this TechNote should be used.

This TechNote is divided into two sections:
  • First Time Setup
  • Modifying the Tuning

To check if the first time setup has already been performed, use the projects command. If first time setup has not been performed, a message similar to the following will be displayed:

/bin/projects -l NetBackup
projects: project "NetBackup" does not exist

First Time Setup
Here are the steps to create a project for NetBackup and have the Solaris 10 Service Management Facility (SMF) launch NetBackup daemon processes in that project. This results in the bptm process being launched with the values tuned in the NetBackup project.

First create a NetBackup project (id = 1000) and "tune" it. The following example sets the maximum amount of shared memory to 8GB:

(The commands below have had line breaks inserted for readability, but each should be entered on a single command line.)

/usr/sbin/projadd -U root -c "NetBackup resource project" -p 1000 NetBackup

/usr/sbin/projmod -a 
-K 'project.max-shm-ids=(privileged,256,deny)' NetBackup

projmod -a 
-K 'project.max-sem-ids=(privileged,1024,deny)' NetBackup

projmod -a 
-K 'project.max-msg-ids=(privileged,256,deny)' NetBackup

projmod -a 
-K 'project.max-shm-memory=(privileged,8589934592,deny)' NetBackup

Note: TechNote 183702 (linked below) contains advice on appropriate sizing for NetBackup shared memory requirements.

This may be checked with the projects command:
projects -l NetBackup
NetBackup
projid : 1000
comment: "NetBackup resource project"
users : root
groups : (none)
attribs: project.max-msg-ids=(privileged,256,deny)
project.max-sem-ids=(privileged,1024,deny)
project.max-shm-ids=(privileged,256,deny)
project.max-shm-memory=(privileged,8589934592,deny)

Now arrange for SMF to launch the NetBackup daemon processes in the NetBackup project just created. This should be performed for both the vnetd and bpcd daemons.

Find the NetBackup vnetd service:
# /usr/sbin/svccfg list | grep vnetd
network/vnetd/tcp

See the current settings:
svccfg -s network/vnetd/tcp listprop | grep project
inetd_start/project astring default

Change the service to run in the NetBackup project:
svccfg -s network/vnetd/tcp setprop inetd_start/project=NetBackup

Check the change is applied:
svccfg -s network/vnetd/tcp listprop | grep project
inetd_start/project astring NetBackup

Now do the same for the bpcd daemon:
svccfg list | grep bpcd
network/vnetd/tcp
svccfg -s network/bpcd/tcp listprop | grep project
inetd_start/project astring default
svccfg -s network/bpcd/tcp setprop inetd_start/project=NetBackup
svccfg -s network/bpcd/tcp listprop | grep project
inetd_start/project astring NetBackup


Check the effects of the tuning on a running process with the prctl command. In this example, the bpps command on the media server shows the process id of bptm to be 3428 and the output of the prctlcommand shows the shared memory setting to be 8GB:
/usr/openv/netbackup/bin/bpps | grep bptm
root 3428 1 0 12:05:39 ? 0:00 bptm
/bin/prctl -n project.max-shm-memory 3428
process: 3428: bptm
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 8.00GB - deny -
system 16.0EB max deny -


Modifying the Tuning
Once first time setup has been performed, it is necessary to use different command options to modify the settings; repeating the first time settings can lead to unpredictable results.

First ensure the NetBackup daemons are being launched by SMF in the NetBackup project:
svccfg -s network/vnetd/tcp listprop | grep project
inetd_start/project astring NetBackup
svccfg -s network/bpcd/tcp listprop | grep project
inetd_start/project astring NetBackup

Now review the NetBackup project settings:
projects -l NetBackup
NetBackup
projid : 1000
comment: "NetBackup resource project"
users : root
groups : (none)
attribs: project.max-msg-ids=(privileged,256,deny)
project.max-sem-ids=(privileged,1024,deny)
project.max-shm-ids=(privileged,256,deny)
project.max-shm-memory=(privileged,8589934592,deny)

To modify a project attribute, use the projmod command with the -s switch. For example, to increase the maximum shared memory setting to 10GB (10737418240), use the command:
projmod -s -K 'project.max-shm-memory=(privileged,10737418240,deny)' NetBackup

Check the change was successful and that the project contains just one entry for the tunable attribute that you specified:
projects -l NetBackup | grep max-shm-memory
project.max-shm-memory=(privileged,10737418240,deny)

No comments:

Post a Comment