configure kernel parameters - how to.docx

12
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 Configure Kernel Parameters - Unix/Macintosh Before You Begin Within the following procedure, the range of prescribed values for each kernel parameter is provided. Where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams). Ideally, 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 any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question. Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose. 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.

Upload: ahmed-yamil-chadid-estrada

Post on 27-Dec-2015

6 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Configure Kernel Parameters - How To.docx

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

Configure Kernel Parameters - Unix/Macintosh

Before You Begin

Within the following procedure, the range of prescribed values for each kernel parameter is provided.  Where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams).

Ideally, 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 any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question.  Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose.

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 PurposePossible 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)

Page 2: Configure Kernel Parameters - How To.docx

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

o 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

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

Set Kernel Parameters for Linux

Related Topics

Configure Kernel Parameters - Unix/Macintosh

Before You Begin

Within the following procedure, the range of prescribed values for each kernel parameter is provided.  Where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams). 

Ideally, 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 any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question.  Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose.

To set the kernel parameters for Linux

Complete the following steps.

Page 3: Configure Kernel Parameters - How To.docx

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 PurposePossible 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]

6.  

7. Review the current shared memory parameters (e.g., cat shmmax, etc.).

8. 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.

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

Page 4: Configure Kernel Parameters - How To.docx

Parameter PurposePossible 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

10. 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 = valuekernel.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

Configure Kernel Parameters - Unix/Macintosh

Before You Begin

If you must update the parameters, where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams). 

Ideally, update each affected parameter value to accommodate 10 streams. However, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question.

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.

5. 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).

6. 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. 

Page 5: Configure Kernel Parameters - How To.docx

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 PurposePossible 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

5. Save the file or script.

6. 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=536870912kern.sysv.shmall=131072kern.sysv.shmmin=1kern.sysv.shmmni=12288kern.sysv.shmseg=12192kern.sysv.semmns=99541kern.sysv.semmni=87381kern.sysv.semmsl=99541

Set Kernel Parameters for Solaris

Related Topics

Configure Kernel Parameters - Unix/Macintosh

Before You Begin

Page 6: Configure Kernel Parameters - How To.docx

Within the following procedures, the range of prescribed values for each kernel parameter is provided.  Where relevant, enter the value that factors in the desired number of data pipe streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = current value + (64 * number of desired streams)).

Ideally, 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 any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question.  Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose.

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.

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:

o MAXINT = 0x7fffffff (2147483647)

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

Parameter PurposePossible 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

Page 7: Configure Kernel Parameters - How To.docx

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

5. 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 PurposeMaximum 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]

2. 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).

Page 8: Configure Kernel Parameters - How To.docx

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.

3. 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.

4. The command syntax for the projmod command is as follows:

5. 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

6. 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:

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

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

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

10.The command syntax for the prctl command is as follows:

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

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

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

14. The following output may be displayed:

15. project: 1: user.rootproject.max-shm-ids privileged 640 - deny - project.max-shm-ids system 16777216 max deny –

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

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

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

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

Set Kernel Parameters for Tru64

Related Topics

Configure Kernel Parameters - Unix/Macintosh

Before You Begin

Within the following procedure, the range of prescribed values for each kernel parameter is provided.  Where relevant, enter the value that factors in the desired number of data pipe

Page 9: Configure Kernel Parameters - How To.docx

streams. Be sure to use the formula provided for each affected parameter to calculate its value (i.e., parameter value = 64 * desired number of streams).

Ideally, 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 any case, ensure that the parameter value does not exceed the "high-end value" of the range provided for the parameter in question.  Of course, if the system will be configured as both an iDataAgent and a MediaAgent, be sure to consider the sum of the respective parameter values for this purpose.

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 PurposePossible 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

Page 10: Configure Kernel Parameters - How To.docx

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

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

Back To Top