Configure Kernel Parameters - Unix/Macintosh - How To

Topics | How To


Set Kernel Parameters for HP-UX

Set Kernel Parameters for Linux

Set Kernel Parameters for Macintosh

Set Kernel Parameters for Solaris

Set Kernel Parameters for Tru64


Set Kernel Parameters for HP-UX

Related Topics

Before You Begin

To set the kernel parameters for HP-UX

Complete the following steps.

  1. Using SAM, change (if necessary) the value of each parameter in the following table to a value within the prescribed range indicated for the parameter.  If the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter.
    If '*" appears after the parameter name, this indicates that you can increment the value of the parameter based on the number of desired streams by using the formula

    parameter value = 64 * number of desired streams

    as long as the "high-end" value of the range for the parameter is not exceeded.

    Parameter Purpose 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.

    NOTES

    • This parameter is critical in extreme circumstances regarding the HP-UX MediaAgent (e.g., whenever the HP-UX MediaAgent is hosting hundreds of LAN clients). Running out of kernel space allocated for this parameter setting will cause massive pipeline failures. Therefore, be sure to consider setting this parameter whenever you are configuring a HP-UX MediaAgent server.
    1 - (nproc-4) [256]; preferred value: 1024
  2. Reboot the system to allow the changes to take effect.

Set Kernel Parameters for Linux

Related Topics

Before You Begin

To set the kernel parameters for Linux

Complete the following steps.

  1. Log in to the client as root.
  2. Navigate to /proc/sys/kernel.
  3. Review the current semaphore parameters in the sem file (by entering cat sem , for example).  The output provides the current value for the following parameters in the order listed:  SEMMSL, SEMMNS, SEMOPM, and SEMMNI.  For example:

    250 32000 32 128

    In this example, SEMMSL=250, SEMMNS=32000, SEMOPM=32, and SEMMNI=128
     
  4. Where required, replace each parameter variable with the appropriate value for the parameter.   Be sure to use the following table to determine a value that falls within the prescribed range of values for the parameter.  If the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter.
    If '*" appears after the parameter name, this indicates that you can increment the value of the parameter based on the number of desired streams by using the formula

    parameter value = 64 * number of desired streams

    as long as the "high-end" value of the range for the parameter is not exceeded.

    Parameter Purpose Possible Range of Values
    SEMMSL* Defines the minimum recommended semaphore value 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
    SHMMNI* Defines the maximum number of shared memory segments in the entire system 1 2147483647 [MAXINT]

     

  5. Review the current shared memory parameters (e.g., cat shmmax, etc.).
  6. Where required, update the value for each shared memory parameter.   Be sure to use the following table to determine a value that falls within the prescribed range of values for the parameter.
    If '*" appears after the parameter name, this indicates that you can increment the value of the parameter based on the number of desired streams by using the formula

    parameter value = 64 * number of desired streams

    as long as the "high-end" value of the range for the parameter is not exceeded.

    If a MediaAgent is included, be sure allocate no fewer than 100 additional streams per affected parameter.
     

    Parameter Purpose Possible Range of Values
    SHMMAX Defines the maximum allowable size of one shared memory segment 0 2147483648 [2 GB] (the high-end value is the recommended value)

     
    SHMMNI* Defines the maximum number of shared memory segments in the entire system 1 2147483647 [MAXINT]
    SHMALL Defines the maximum total shared memory system-wide 2097152
  7. For a non-Red Hat Linux system, reboot the system to allow the changes to take effect. For a Red Hat Linux system, edit the /etc/sysctl.conf file if necessary to make the changes permanent as follows:

    kernel.shmmax = value
    kernel.sem = value1 value2 value3 value4

    (Be sure to include a space on either side of each "=" and also between each value.) Then run the sysctl -p command to allow these changes to take effect immediately.


Set Kernel Parameters for Macintosh

Related Topics

Before You Begin

To set the kernel parameters for Macintosh

Complete the following steps.

  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. Check if the sysctl.conf (/etc/sysctl-macosxserver.conf for Mac OSX Server) file exists on the machine.
    This file usually exists for Mac OSX versions 10.3.x.

    If this file exists, edit this file to modify the values of the required parameters.  If the file does not exist, edit the /etc/rc script instead (in this case, the kernel parameter configurations are located under either the "Start BootCache" section or "System Tuning" section of the /etc/rc script).

    Specifically, in either case, change (if necessary) the value of each parameter in the following table to a value within the prescribed range indicated for the parameter.  Update each affected parameter value to accommodate 10 streams. 

    If '*" appears after the parameter name, this indicates that you can increment the value of the parameter based on the number of desired streams by using the formula

    parameter value = 64 * number of desired streams

    as long as the "high-end" value of the range for the parameter is not exceeded.

Parameter Purpose 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 minimum recommended semaphore value 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
  1. Save the file or script.
  2. Reboot the machine for the changes to take effect.

The following is an example of various kernel parameters set on a Macintosh OSX machine containing an iDataAgent:

kern.sysv.shmmax=536870912
kern.sysv.shmall=131072
kern.sysv.shmmin=1
kern.sysv.shmmni=12288
kern.sysv.shmseg=12192
kern.sysv.semmns=99541
kern.sysv.semmni=87381
kern.sysv.semmsl=99541


Set Kernel Parameters for Solaris

Related Topics

Before You Begin

To set the kernel parameters for Solaris 9 and lower

Complete the following steps.

  1. Create a backup copy of the /etc/system file.
  2. From the client, open the /etc/system file (using vi, for example).
  3. Change (if necessary) the value of each parameter in the following table to a value within the prescribed range indicated for the parameter.  If the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter.
    In the following table:
    • MAXINT = 0x7fffffff (2147483647)
    • MAXINT3264 = MAXINT (if 32-bit) or 0x7fffffffffffffff (if 64-bit)
    Parameter Purpose 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
    SEMMSL* Defines the minimum recommended semaphore value 1 MAXINT
    SHMMIN Defines the minimum allowable size of a single shared memory segment 0 (Physical Ram)
    1

    (Generally, do not change the current value if set. If the value is not set, set it to 1.)

    SHMMNI* Defines the maximum number of shared memory segments in the entire system 0 MAXINT
    SHMMAX Defines the maximum allowable size of one shared memory segment 0 - MAXINT3264

    (If the current value is less than 4199304, just 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

    This parameter is critical in extreme circumstances regarding the Solaris MediaAgent (e.g., whenever the Solaris MediaAgent is hosting hundreds of LAN clients). Running out of kernel space allocated for this parameter setting will cause massive pipeline failures. Therefore, be sure to consider setting this parameter whenever you are configuring a Solaris MediaAgent server.

    1024
  4. Reboot the system to allow the changes to take effect.

To set the kernel resources for Solaris 10

  1. Decide which resource controls you would like to change. Use the following table as a reference.
    Resource Control Purpose Maximum Value [Default Value]
    project.max-shm-memory Defines the total amount of shared memory allowed for a project [Default = 25% of the physical memory]

    NOTES

    It is recommended that this resource control not be set. 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]
  1. From the client, use either the projmod command or the prctl command to change the value of any resource control in the previous table to a value that does not exceed the maximum value indicated for the control. The projmod command makes a "permanent" change to the value of the affected control (i.e., until you change the value subsequently), while the prctl command makes a temporary change to the value (i.e., the value reverts back to the previous value upon system reboot).
    Be sure to check the appropriate man page for these commands. Information on the projmod command is located at http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqch?a=view. Information on the prctl command is located at http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9p6?a=view.

    If the system will be configured as an iDataAgent, update each affected control value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected control.

    The following commands and examples are based on the Solaris 10 General Availability (GA) version and may be subject to change.

    The command syntax for the projmod command is as follows:

    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

    In Solaris 10, the /etc/project file contains all the "projects" that are associated with a processor. By default, root gets associated with "project" user.root. Therefore, for example, suppose that user.root includes the following:

    project.max-shm-ids=(priv,640,deny)

    Now, suppose you want to change the value of project.max-shm-ids to 1280. To do so, you can issue the following command:

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


    The command syntax for the prctl command is as follows:

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

    For example, suppose you want to display the current value of project.max-shm-ids. To do this, you can issue the following command:

    prctl -P -n project.max-shm-ids -i project user.root

    The following output may be displayed:

    project: 1: user.root
    project.max-shm-ids privileged 640 - deny -
    project.max-shm-ids system 16777216 max deny

    This indicates that the current value of project.max-shm-ids is 640.

    Now, suppose you want to change the value of project.max-shm-ids to 1280. To do so, you can issue the following command:

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

  2. Reboot the system to allow the changes to take effect.

Set Kernel Parameters for Tru64

Related Topics

Before You Begin

To set the kernel parameters for Tru64

Complete the following steps.

  1. Navigate to the /etc/sysconfigtab file.
  2. Make a copy of this file.
  3. Open the original file (using vi, for example) and scroll to the "ipc" section of the file.  The following is an example of what you might see in this section:
    ipc:

      shm_max=1073741824

      shm_mni=1024 
      shm_min=1

      shm_seg=256

      sem_mni=128

      sem_msl=128

      sem_opm=100

      sem_ume=64

      sem_vmx=32768

      sem_aem=16384 

  4. Where required, update the value for each parameter.   Be sure to use the following table to determine a value that falls within the prescribed range of values for the parameter.  If the system will be configured as an iDataAgent, update each affected parameter value to accommodate 10 streams. If the system will be configured as a MediaAgent, allocate no fewer than 100 additional streams per affected parameter.
    If '*" appears after the parameter name, this indicates that you can increment the value of the parameter based on the number of desired streams by using the formula

    parameter value = 64 * number of desired streams

    as long as the "high-end" value of the range for the parameter is not exceeded.

    Parameter Purpose Possible Range of Values
    SEMMNI* Defines the maximum number of semaphore sets in the entire system. 1 65535
    SEMMSL* Defines the minimum recommended semaphore value 1 2147483647 [MAXINT]
    SEMOPM Defines the maximum number of operations for each semaphore call 100
    SEMVMX Defines the maximum value of a semaphore 32767
    SEMUME Defines the maximum number of undo entries per process 64
    SEMAEM Defines the maximum value for adjustment on exit 16384
    SHMMIN Defines the minimum allowable size of a single shared memory segment 0 ( Physical Ram)
    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 4294967295 (recommended value is 2147483648)
     
     
    SHMSEG* Defines the maximum number of shared memory segments that one process can attach 0 - 32767
  5. Reboot the system to allow the changes to take effect.

Back To Top