---
title: "转贴oracle:Configuring Kernel Parameters"
author: "fourfire"
date: "2006-12-31T12:53:14Z"
tags: []
slug: "oracle-configuring-kernel-parameters"
draft: false
lastmod: "2006-12-31T12:53:14Z"
id: 41838
url: "https://fourfire.iteye.com/blog/41838"
---

2.6 Configuring Kernel Parameters

Note:

The kernel parameter and shell limit values shown in the following section are recommended values only. For production database systems, Oracle recommends that you tune these values to optimize the performance of the system. Refer to your operating system documentation for more information about tuning kernel parameters.

Verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown on Solaris 8 and Solaris 9 operating systems. The procedure following the table describes how to verify and set the values.

Parameter Recommended Value  
noexec\_user\_stack 1  
semsys:seminfo\_semmni 100  
semsys:seminfo\_semmns 1024  
semsys:seminfo\_semmsl 256  
semsys:seminfo\_semvmx 32767  
shmsys:shminfo\_shmmax 4294967295  
shmsys:shminfo\_shmmin 1  
shmsys:shminfo\_shmmni 100  
shmsys:shminfo\_shmseg 10

 

Note:

The following parameters are obsolete in Solaris 9:  
shmsys:shminfo\_shmmin

shmsys:shminfo\_shmseg  
 

On Solaris 10, verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. The table aslo contains the resource controls that replace the /etc/system file for a specific kernel parameter.

Note:

In Solaris 10, you are not required to make changes to the /etc/system file to implement the System V TPC. Solaris 10 uses the resource control facility for its implementation.

Parameter Replaced by Resource Control Recommended Value  
noexec\_user\_stack NA 1  
semsys:seminfo\_semmni project.max-sem-ids 100  
semsys:seminfo\_semmsl process.max-sem-nsems 256  
shmsys:shminfo\_shmmax project.max-shm-memory 4294967295  
shmsys:shminfo\_shmmni project.max-shm-ids 100

On Solaris 8 and Solaris 9 operating systems, use the following procedure to view the current value specified for these kernel parameters, and to change them if necessary:

To view the current values of these parameters, enter the following commands:

\# grep noexec\_user\_stack /etc/system  
\# /usr/sbin/sysdef | grep SEM  
\# /usr/sbin/sysdef | grep SHM

If you must change any of the current values, then:

Create a backup copy of the /etc/system file, for example:

\# cp /etc/system /etc/system.orig

Open the /etc/system file in any text editor and, if necessary, add lines similar to the following (edit the lines if the file already contains them):

set noexec\_user\_stack=1  
set semsys:seminfo\_semmni=100  
set semsys:seminfo\_semmns=1024  
set semsys:seminfo\_semmsl=256  
set semsys:seminfo\_semvmx=32767  
set shmsys:shminfo\_shmmax=4294967295  
set shmsys:shminfo\_shmmin=1  
set shmsys:shminfo\_shmmni=100  
set shmsys:shminfo\_shmseg=10

Enter the following command to restart the system:

\# /usr/sbin/reboot

When the system restarts, log in and switch user to root.

On Solaris 10, use the following procedure to view the current value specified for resource controls, and to change them if necessary:

To view the current values of the resource control, enter the following commands:

\# id -p // to verify the project id  
uid=0(root) gid=0(root) projid=1 (user.root)  
\# prctl -n project.max-shm-memory -i project user.root  
\# prctl -n project.max-sem-ids -i project user.root

If you must change any of the current values, then:

To modify the value of max-shm-memory to 6 GB:

\# prctl -n project.max-shm-memory -v 6gb -r -i project user.root

To modify the value of max-sem-ids to 256:

\# prctl -n project.max-sem-ids -v 256 -r -i project user.root