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
Related Topics
Before You Begin
To set the kernel parameters for HP-UX
Complete the following steps.
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
|
1 - (nproc-4) [256]; preferred value: 1024 |
Related Topics
Before You Begin
To set the kernel parameters for Linux
Complete the following steps.
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] |
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 |
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.
Related Topics
Before You Begin
To set the kernel parameters for Macintosh
Complete the following steps.
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
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
Related Topics
Before You Begin
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 = current value + (64 * number of desired streams) as long as the "high-end" value of the range for the parameter is not exceeded. |
To set the kernel parameters for Solaris 9 and lower
Complete the following steps.
In the following table:
|
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 |
To set the kernel resources for Solaris 10
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] |
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
Related Topics
Before You Begin
To set the kernel parameters for Tru64
Complete the following steps.
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
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 |