Kernel Parameters Configuration

Table of Contents

Overview

The Unix MediaAgent/iDataAgent uses the operating system's kernel resources, such as shared memory, semaphores, etc., to perform data protection and recovery operations and facilitate inter-process communications and stream management. If you are using an earlier version of the operating system, you can optimize the usage of these resources by setting the kernel parameter values. In addition to maintaining the data in memory, the kernel significantly reduces disk input/output (I/O) activity.

The requirements specified for the resources needed by the CommCell components do not take into consideration any additional resources needed by any other application.  Therefore, systems that interact with an application (e.g., Oracle) may require additional resources. These items should be (or should have been) administered by the appropriate application administrator. If you have previously tuned your kernel parameters to the levels that meet your application needs, continue to use the identified values. However, if you do change any kernel settings, make sure to restart the system in order to activate the new settings. AIX do not need any change to its shared memory resources since it is dynamic.

HP-UX

The following table displays the possible range of values for each parameter:

Parameters Description Possible Range of Values
SEMMNI Defines the maximum number of semaphore sets in the entire system. 1 - 65535
SEMMAP Defines the maximum number of semaphore map entries. 1 - 65535 (SEMMNI + 2)
SEMMNS* Defines the maximum semaphores in the system 1 - 2147483647 [MAXINT] (Default value 128 is too low.)
SEMVMX Defines the maximum value of a semaphore 32768
SHMMNI* Defines the maximum number of shared memory segments in the entire system 1 - 2147483647 [MAXINT]
SHMMAX Defines the maximum allowable size of one shared memory segment 0 - 4294967295 (Available physical memory); recommended value is 2147483648
SHMSEG* Defines the maximum number of shared memory segments that one process can attach 0 - 32767
SEMMNU Defines the maximum number of System V IPC system-wide processes that can have "undo" operations pending at any given time. 1 - (nproc-4) [256]; preferred value: 1024

Use the following steps to modify the kernel parameters with System Administrator Menu (SAM) for HP-UX File System:

  1. From the UNIX prompt, enter the command to open the System Administrator Menu (SAM).

    #sam

  2. In the SAM utility window, double-click the Kernel Configuration icon.
  3. Double-click the Configurable Parameters icon. SAM will display a screen containing a list of configurable parameters, including current and pending values.
  4. Double-click on the parameter you wish to change.
  5. Click New Formula/Value option and type the recommended value.
  6. Click OK.
  7. Restart the computer to allow the changes to take effect.

System Management Homepage (SMH) is the new tool introduced to manage HP-UX. Use the following  steps to modify the kernel parameters using System Management Homepage (SMH) since the System Administration Manager (SAM) is deprecated in the current releases of HP-UX:

  1. From the UNIX prompt, enter the command to open the System Management Homepage (SMH) window.

    #smh

  2. In the SMH Text User Interface, select k -Kernel Configuration and press Enter.

    DISPLAY variable is not set. Starting the Text User Interface.
    Please wait...HP-UX System Management Homepage (Text User Interface)
    SMH
    ----------------------------------------------------------
    a - Auditing and Security
    c - Auditing and Security Attributes Configuration(new)
    d - Peripheral Devices
    e - Resource Management
    f - Disks and File Systems
    g - Display
    k - Kernel Configuration
    l - Printers and Plotters(new)
    m - Event Monitoring Service
    n - Networking and Communications
    p - Printers and Plotters
    s - Software Management
    u - Accounts for Users and Groups
    ----------------------------------------------------------
    x-Exit smh w-WebLaunch 1-Help
    ENTER-Launch Functional Area v-SAM Log Viewer

  3. Select the t - Tunables to view a list of configurable parameters, including current and pending values and press Enter.

    SMH->Kernel Configuration
    ----------------------------------------------------------
    t - Tunables View or modify kernel tunables
    m - Modules View or modify kernel modules and drivers
    a - Alarms View or modify alarms for kernel tunables
    l - Log Viewer View the changes made to kernel tunables or modules
    u - Usage View usage of kernel tunables
    c - Manage Configuration View the options available to manage configuration
    b - Restore Previous Boot Values Restores Previous Boot Values for Tunable
    <----------------------------------------------------------------------->
    x-Exit smh ENTER-Select ESC-Back 1-Help

  4. Select the parameter you wish to change and press Enter. For Example, select semmni parameter.

    SMH->Kernel Configuration->Tunables (All)
    ----------------------------------------------------------------------------
    Tunable    Tuning       Current   Next Boot   Default  Usage Module
               Capability   Value     Value       Value
    =====================================================================
    semaem      Static      16384     16384        16384    -    pm_usync
    semmni      Static      2048       2048         2048   1.4%  pm_usync
    semmns      Static      4096       4096         4096   3.7%  pm_usync
    semmnu      Static       256        256          256    -    pm_usync
    semmsl      Dynamic     2048       2048         2048    -    pm_usync
    semume      Static       100        100          100    -    pm_usync
    semvmx      Static     32767      32767        32767    -    pm_usync
    shmmax      Dynamic  1073741824 1073741824 1073741824  3.1%  vm_asi
    shmmni      Dynamic      400        400          400   2.2%  vm_asi
    shmseg      Dynamic      300        300          300    -    vm_asi
    ---------------------------------------------------------------------
    x-Exit smh ESC-Back p-Pending b-Restore Previous Boot Values 2-kctune Manpage /-Search
    ENTER-Details m-Modify d-Dynamic 1-Help 3-Tunable Manpage

  5. Press m to modify the selected parameter.

    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    SMH->Kernel Configuration->Tunables (All)->Details
    Details : semmni
    ---------------------------------------------------------------------------------
    Tunable semmni
    ==============================================================================
    Description Maximum number of semaphore sets on the system
    Dynamic no
    Subsystem pm_usync
    Default Value 2048
    Current Value 2048
    Planned Value 2048
    Last Boot Value 2048
    Constraints semmni >= 2
    Constraints semmni <= 32767
    Constraints semmni <= semmns
    Auto Tuning Not Supported
    Current Usage 28
    ----------------------------------------------------------------------------------
    x-Exit smh m-Modify ESC-Back 1-Tunable Help

  6. Specify the following:
    • Type the new parameter value in New setting [Expression/value]
    • Type the new evaluated value for expression if needed in New setting [evaluated] or select Recalculate and press Enter.
    • Select Yes to backup the current configuration before applying the change.
    • Type the reason for modification in Reason for Change.
    • Select Modify and press Enter.

    SMH->Kernel Configuration->Tunables (All)->Details->Modify
    ------------------------------------------------------------------------
    Tunable semmni
    Description Maximum number of semaphore sets on the system
    Module pm_usync
    Current Value 2048 [Default]
    Value at Next Boot 2048 [Default]
    Value at Last Boot 2048
    Default Value 2048
    Constraints semmni >= 2
    semmni <= 32767
    semmni <= semmns
    Can Change At Next Boot Only
    NOTE: If the new Value is specified as Default, the next boot value
    will be default value for the tunable as recommended by HP.
    However, if the tunable is being autotuned then the value assigned
    will be determined dynamically by kernel during run-time.
    New setting[Expression/Value]: ___________________
    New setting (evaluated): ___________________
    [ Recalculate ]
    Back up the current configuration before applying change: (X) Yes ( ) No
    Reason for change : _______________________________________
    [ Modify ] [ Preview ] [ Cancel ]
    ------------------------------------------------------------------------

  7. A Confirmation window will be displayed warning you that the requested changes have been saved and will take effect at next boot. Press Enter to continue.

    SMH->Kernel Configuration->Tunables (All)->Details->Modify
    ----------------------------------------------------------------------------------
    mount: ignoring incomplete/incorrect entry for /dev/dsk/c0t0d0 in /etc/fstab
    NOTE: The requested changes could not be applied to the currently
    running system, for the following reasons:
    - The tunable 'semmni' cannot be changed without a reboot.
    * The requested changes have been saved, and will take effect at next boot.
    Tunable Value Expression
    semmni (now) 2048 Default
    (next boot) 2048 2048
    mount: ignoring incomplete/incorrect entry for /dev/dsk/c0t0d0 in /etc/fstab
    Command Successful
    press Enter Key to continue

  8. Restart the computer.

Linux

The following table displays the possible range of values for each parameter:

Parameters Description Possible Range of Values
SEMMSL* Defines the maximum number of semaphores per semaphore set. 1 - 2147483647 [MAXINT]
SEMMNS* Defines the maximum semaphores in the system. 1 - 2147483647 [MAXINT]
SEMOPM* Defines the maximum number of operations for each semaphore call. 100
SEMMNI* Defines the maximum number of semaphore sets in the entire system. 1 - 65535
SHMMNI Defines the maximum number of shared memory segments in the entire system. 1 - 2147483647 [MAXINT]
SHMMAX Defines the maximum allowable size of one shared memory segment. 0 - 2147483648 [2 GB] (the high-end value is the recommended value)
SHMALL Defines the maximum total shared memory system-wide. 2097152

Note: Contact your system administrator to obtain the recommended values for the SHMXXX parameters.

Use the following steps to modify the kernel parameters:

  1. From the UNIX prompt, log on to the client as root.
  2. Navigate to the /proc/sys/kernel.

    cd /proc/sys/kernel

  3. View the current values of the parameters in the sem file.

    For example, view the values of all semaphore parameters. The output provides the current value for the following parameters in the order listed: SEMMSL, SEMMNS, SEMOPM, and SEMMNI.

    Example:

    cat sem

    250 32000 32 128

    In this example, SEMMSL=250, SEMMNS=32000, SEMOPM=32, and SEMMNI=128

  4. Modify the required parameters.

    Important Considerations

    • The minimum recommended value for the SEMMNI parameter is 128.
    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    • The SEMOPM and SEMMSL parameter values must be equal.
    • If any applications or databases are running on the client, the parameters must be increased accordingly.

    Example

    Parameters Non-MediaAgent MediaAgent
    SEMMSL 1 * 250 = 250 12 * 100 = 1200
    SEMMNI 128 128
    SEMMNS 250 * 128 1200 * 128
    SEMOPM 250 1200

    sysctl -w kernel.parameter="SEMMSL SEMMNS SEMOPM SEMMNI"

    For example:

    sysctl -w kernel.sem="1200 153600 1200 128"

    • To preserve the parameter settings permanently on a Red Hat Linux computer, add them to the /etc/sysctl.conf file after removing any existing entries for the parameters.

      Example

      kernel.sem=1200 153600 1200 128

    • Run the command if you have only modified the /etc/sysctl.conf file and you want to refresh the computer with the configuration that you specified:

      sysctl -p

Macintosh

The File System iDataAgent uses the operating system's kernel resources, such as shared memory, semaphores, etc., to perform backup and restore operations. In order to run the backup and restore operations efficiently, you need to ensure that these kernel parameter settings are sufficient for the specific environment.

By default, the kernel parameters are automatically set during the installation of the Macintosh File System iDataAgent . However, you can also modify the parameters at a later point in time if needed.

The following table displays the  recommended values for each kernel parameter. Note that the requirements specified for the resources needed by the CommCell components do not take into consideration any additional resources needed by any other application.  Therefore, systems that interact with an application (e.g., Oracle) may require additional resources. These items should be (or should have been) administered by the appropriate application administrator.

Parameters Description Possible Range of Values
SEMMNI* Defines the maximum number of semaphore sets in the entire system. 1 - 65535
SEMMNS* Defines the maximum semaphores in the system. 1 - 2147483647 [MAXINT]
SEMMSL* Defines the maximum number of semaphores per semaphore set. 1 - 2147483647 [MAXINT]
SHMALL Defines the maximum total shared memory system-wide. shmmax/hw_pagesize
SHMMIN Defines the minimum allowable size of a single shared memory segment 1
SHMMNI* Defines the maximum number of shared memory segments in the entire system. 1 - 2147483647 [MAXINT]
SHMMAX Defines the maximum allowable size of one shared memory segment. 0 - 2147483648 [2 GB] (the high-end value is the recommended value)
SHMSEG* Defines the maximum number of shared memory segments that one process can attach. 0 - 32767

Use the following steps to modify the kernel parameters on Macintosh clients:

  1. Log in to the client as root.
  2. Ensure that no jobs are running on the client.
  3. Navigate to the /etc directory.
  4. Create the sysctl.conf file, if it does not exist.
  5. Edit the required parameter in the sysctl.conf file.

    For example, set the value for shmmni parameter to 12288.

    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    Example:

    set kern.sysv.shmmni=12288

  6. Save the sysctl.conf file.
  7. Restart the computer to allow the changes to take effect.

Solaris

By default, the kernel parameters are set during the installation. However, you can also modify the parameters at a later point in time if needed.

For Solaris 9 and Below Versions

The following table displays the possible range of values for each parameter for Solaris 9 and below:

Parameters Description Possible Range of Values
SEMMNI* Defines the maximum number of semaphore sets in the entire system. 1 - 65535 (unsigned short)
SEMMNS* Defines the maximum semaphores in the system. 1 - MAXINT

MAXINT = 0x7fffffff (2147483647)

SEMMSL* Defines the maximum number of semaphores per semaphore set. 1 - MAXINT

MAXINT = 0x7fffffff (2147483647)

SHMMIN Defines the minimum allowable size of a single shared memory segment. 0 (Physical Ram)

1

(It is recommended not to change the current value if set. If no value exists, set it to 1.)

SHMMNI* Defines the maximum number of shared memory segments in the entire system. 0 - MAXINT

MAXINT = 0x7fffffff (2147483647)

SHMMAX Defines the maximum allowable size of one shared memory segment. 0 - MAXINT3264

MAXINT3264 = MAXINT (if 32-bit) or 0x7fffffffffffffff (if 64-bit)

(If the current value is less than 4199304, then set it to 4199304.)

SHMSEG* Defines the maximum number of shared memory segments that one process can attach. 0 - 32767 (signed short)
SEMINFO_SEMMNU Defines the total number of undo structures supported by the System V semaphore system. 1024

Use the following steps to modify the kernel parameters for Solaris 9 and below:

  1. From the UNIX prompt, create a backup copy of the /etc/system file.

    cp /etc/system /etc/system.copy

  2. Open the /etc/system file.

    vi /etc/system

  3. Change the desired parameter value as per the range given in the above table.

    For example, set the value for semmni parameter to 55680

    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    Example:

    set semsys:seminfo_semmni=55680

  4. Save the /etc/system file.

    Press the Esc key.

    Type :wq
  5. Restart the computer to allow the changes to take effect.

For Solaris 10 and Above Versions

The following table displays the possible range of values for each parameter for Solaris 10 and above:

project.max-shm-memory Defines the total amount of shared memory allowed for a project. [Default = 25% of the physical memory]

It is recommended not to set this value. However, if you have to set the control to accommodate other resource consumers, ensure that the value is not less than 2MB = [2097152].

project.max-shm-ids* Defines the maximum number of shared memory IDs allowed for a project 16777216 [Default = 128]
project.max-sem-ids* Defines the maximum number of semaphores allowed for a project 16777216 [Default = 128]

For Solaris 10 and above, you can use any of the following commands to modify the kernel parameters:

  • projmod command - changes made using this command are persistent
  • prctl command 

Use the following steps to modify the kernel parameters in Solaris 10 and above versions using the projmod command:

  1. From the UNIX prompt, type the projmod command.

    projmod [-n] [-f filename] [-p projid [-o]] [-c comment] [-a|-s|-r] [-U user [,user...]] [-G group [,group...]] [[-K name[=value[,value...]...]]] [-I new_projectname] project

    Example:

    projmod -s -K "project.attributeName=(value,value,value)" simpana

  2. Change the desired parameter value as per the range given in the above table.

    For example, set the value for project.max-shm-ids parameter

    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    Example:

    projmod -s -K "project.max-shm-ids=(priv,1280,deny)" simpana

Use the following steps to modify the kernel parameters in Solaris 10 and above versions using the prctl command:

  1. From the UNIX prompt, type the prctl command.

    prctl [-P] [-t[basic| privileged| system]] [-n name] [-v value] [-e| d action] [-p pid] [-i idtype] id...

  2. Change the desired parameter value as per the range given in the above table.

    For example, set the value for project.max-shm-ids parameter

    • Use the following formula to calculate the value for the SEMMSL parameter:
      • Non-MediaAgent:

        SEMMSL = 1 * number_of_desired_streams

      • MediaAgent:

        SEMMSL = 12 * number_of_desired_streams

    • Use the following formula to calculate the value for the SEMMNS parameter:

      SEMMNS = SEMMSL * SEMMNI

    Example:

    prctl -n project.max-shm-ids -v 1280 -r -i project user.root

    Output:

    project: 1: user.root

    project.max-shm-ids privileged 1280 - deny -

    project.max-shm-ids system 16777216 max deny -