Recommended NetBackup UNIX / Linux semaphore tuning values (Linux/Solaris/HP-UX/AIX)

Article: 100023842
Last Published: 2021-03-04
Ratings: 3 1
Product(s): NetBackup & Alta Data Protection


A Master Server and Media server running NetBackup may need OS level system resources increased to function properly.  The following values are used by NetBackup engineering in their test environments.  These are recommended minimum values that should address some OS related performance issues.  If OS resource limitations are below recommended values NetBackup may not work as effectively as expected.  Resource limitations have been known to cause behaviors including application hangs, status code 252, processing delays, and lack of responsiveness amongst other things.

The proposed semaphore values are a recommended minimum.  If your environment already exceeds these values, you should not reduce them to the recommended values.  


The following semaphore properties should be adjusted:

SEMMSL            - The maximum number of semaphores in a sempahore set.
SEMMNS            - A system-wide limit on the number of semaphores in all semaphore sets. The maximum number of sempahores in the system.
SEMOPM            - The maximum number of operations in a single semop call
SEMMNI              - A system-wide limit on the maximum number of semaphore identifiers (sempahore sets)  

NetBackup support recommends the following values:

SEMMSL            SEMMNS            SEMOPM            SEMMNI
300                      307200                32                        1024


Validating/Changing Linux semaphore values:

Run the following command to check existing semaphore values:

root@NBU-Master:~ > sysctl -a | grep kernel.sem
kernel.sem = 250    256000 32    1024

These values can be adjusted immediately without a restart using the following (but will not persist over a reboot):   

root@NBU-Master:~ > cat /proc/sys/kernel/sem
250 256000 32 1024

root@NBU-Master:~ > echo 300   307200   32   1024 > /proc/sys/kernel/sem

root@NBU-Master:~ > sysctl -a | grep kernel.sem                   
kernel.sem = 300    307200  32   1024  

To modify system semaphore values permanently, running the following will change their default setting and apply these new values immediately:

root@NBU-Master:~ > echo "kernel.sem = 300  307200  32  1024">> /etc/sysctl.conf

root@NBU-Master:~ >  cat /etc/sysctl.conf | grep kernel.sem
kernel.sem = 300    307200 32    1024

root@NBU-Master:~ > sysctl -p

After running these commands, even after a reboot, the server will maintain the semaphore values that have been set.  Changing semaphore values has resolved multiple performance issues observed on NetBackup Master or Media Servers.


Validating/Changing Solaris semaphore values:

Solaris 10 uses projects to set these values.  The following steps check for the existence of a NetBackup project, and allow you to tune semaphore values within the project.  It is not required to run NetBackup in a project on these operating systems but the following steps are what is required to set semaphore values on a Solaris 10 system:

First check to see if a NetBackup project already exists on the server:

root@NBSolMaster:~ > projects -l NetBackup
projects: project "NetBackup" does not exist

If no NetBackup project has been configured on your system, please review related article below for a detailed explanation of the steps required to setup a NetBackup project on Solaris.  

After a project has been added for NetBackup, you will see the following output:

root@NBSolMaster:~ > projects -l NetBackup                           
        projid : 1000
        comment: "NetBackup resource project"
        users  : root
        groups : (none)


Once a project has been created, attributes can be set to address semaphore usage as follows:

root@NBSolMaster:~ > projmod -a -K 'process.max-sem-nsems=(privileged,300,deny)' NetBackup
root@NBSolMaster:~ > projmod -a -K 'process.max-sem-ops=(privileged,32,deny)' NetBackup
root@NBSolMaster:~ > projmod -a -K 'project.max-sem-ids=(privileged,1024,deny)' NetBackup  

NOTE: For Solaris 10 and above, SEMMNS has been deprecated.

After entering these values, run the following to confirm that they have been set:

root@NBSolMaster:~ > projects -l NetBackup
        projid : 1000
        comment: "NetBackup resource project"
        users  : root
        groups : (none)
        attribs: project.max-sem-ids=(privileged,1024,deny)

Starting with version 8.1.2, NetBackup no longer supports HP-UX and AIX platforms for master and media servers. However, NetBackup still supports clients that run on HP-UX and AIX platforms.

Validating/Changing HP-UX semaphore values:

Run the following command to check existing semaphore values:

# kctune -v semmsl semmns semopm semmni

Increasing the semaphore values that are reported can be done with the following:

# kctune semmsl=300
# kctune semmns=307200
# kctune semopm=32
# kctune semmni=1024

After setting these values using kctune, you may need to reboot the server to update these values.  The following command can be used to validate the changes:

# kctune -v semmsl semmns semopm semmni


Validating/Changing AIX semaphore values:

AIX is self tuning and will adjust these values automatically as needed.

Was this content helpful?