Contained Within
Find More Documentation
Featured Support Resources
| PDF로 이 문서 다운로드
Tuning Kernel Parameters
A
- The SunOS 5.x kernel modules are automatically loaded when they are needed. This makes rebuilding the kernel unnecessary. There are parameters for the kernel and kernel modules that you can tune. However, you shouldn't need to change these parameters, except under special circumstances. Many parameters automatically scale as a function of the value assigned to the maxusers parameter.
- This appendix lists some of the kernel parameters that you can change or tune. You can change any global variable that is one of the following data types-- int, long, short, or char--by entering a line in the /etc/system file.
· How to List the Kernel Parameters
-
To see the current values assigned to the kernel parameters. * Type sysdef -i and press Return.
· How to Change the Value of a Parameter
-
To set the value of a parameter: 1. Enter a line in the /etc/system file in the form: set parameter=value
- The following example sets the value of the max_nprocs to 500 parameter.
-
-
-
Reboot the system.
The kernel parses the /etc/system file during autoconfiguration and overrides the default value for the parameters specified in this file.
-
To set the value of a module variable: 1. Enter a line in the /etc/system file in the form: set module_name:variable=value
- The following example sets the value of the msginfo_msgmap parameter in the msgsys module to 150.
-
set msgsys:msginfo_msgmap=150
|
-
-
Reboot the system.
The kernel parses the /etc/system file during autoconfiguration and overrides the default value for the parameters specified in this file.
Buffer Cache Parameters
- The bufhwm parameter specifies the maximum size for buffer cache memory usage expressed in units of 1K bytes. The default is 2% of physical memory.
UFS File System Parameters
- The following table describes the tunable UFS parameters.
-
Table A-1
| Parameter | Description |
| ufs_ninode | Maximum size of the inode table
(default = max_nprocs + 16 + maxusers+ 64) |
| ncsize | Number of dnlc entries (default = max_nprocs+16+maxusers + 64); dnlc is the directory-name lookup cache. |
STREAMS Parameters
- The following table describes the tunable STREAMS parameters.
-
Table A-2
| Parameter | Default | Description |
| nstrpush | 9 | This is the maximum number of STREAMS pushes allowed. |
| strmsgsz | 0 | This is the maximum size for the STREAMS message that a user can create. A value of 0 indicates no upper bound. This parameter may disappear entirely in a future release. |
| strctlsz | 1024 | This is the maximum size of the ctl part of a message. |
| strthresh | 0 | This is the maximum amount of dynamic memory that the STREAMS subsystem can consume, in bytes. Once this threshold is passed, any pushes, opens, and writes on a STREAMS devices will fail for non-root processes. A value of 0 means no limit. |
| sadcnt | 16 | Number of sad devices |
Interprocess Communication (IPC) Parameters
- The following table describes the tunable interprocess communication parameters.
-
Table A-3
| Parameter | Default | Description |
| msginfo_msgmap | 100 | Number of entries in the message map |
| msginfo_msgmax | 2048 | Maximum message size |
| msginfo_msgmnb | 4096 | Maximum bytes on queue |
| msginfo_msgmni | 50 | Number of message queue identifiers |
| msginfo_msgssz | 8 | Segment size of a message (should be a multiple of the word size) |
| msginfo_msgtql | 40 | Number of system message headers |
| msginfo_msgseg | 1024 | Number of message segments (must be < 32768) |
| seminfo_semmap | 10 | Number of entries in semaphore map |
| seminfo_semmni | 10 | Number of semaphore identifiers |
| seminfo_semmns | 60 | Number of semaphores in the system |
| seminfo_semmnu | 30 | Number of undo structures in the system |
| seminfo_semmsl | 25 | Maximum number of semaphores, per id |
| seminfo_semopm | 10 | Maximum number of operations, per semaphore call |
| seminfo_semume | 10 | Maximum number of undo entries, per process |
| seminfo_semvmx | 32767 | Semaphore maximum value |
| seminfo_semaem | 16384 | Maximum value for adjustment on exit |
| shminfo_shmmax | 1048576 | Maximum shared memory segment size |
| shminfo_shmmin | 1 | Minimum shared memory segment size |
| shminfo_shmmni | 100 | Number of shared memory identifiers |
| shminfo_shmseg | 6 | Segments, per process |
· How to Tune the Message Queue Parameters
-
* Tune the msgsys parameters using the following syntax:
-
-
set msgsys:msginfo_variable=value
* Tune the semsys parameters using the following syntax:
set semsys:seminfo_variable=value
* Tune the shmsys parameters using the following syntax:
set shmsys:shminfo_variable=value
TPI Loopback Pseudo-Driver Parameters
- The following table describes the tunable TPI loopback pseudo-driver parameters.
-
Table A-4
| Parameter | Default | Description |
| tune_t_gpgslo | 25 | If freemem < t_getpgslow, the system starts to steal pages from processes. If freemem drops below t_gpgslo, the system wakes up the swapper process. The swapper will try to free some memory by swapping processes to disk. |
| tune_t_fsflush r | 30 | Rate at which fsflush is run, in seconds |
| tune_t_minarme m | 25 | The minimum available resident (not swappable) memory needed to avoid deadlock, in pages |
| tune_t_minasme m | 25 | The minimum available swappable memory needed to avoid deadlock, in pages |
| tune_t_flckrec | 512 | The maximum number of active frlocks |
| putbufsz | 2000 | Size of the putchar buffer |
| npty | 48 | Total number of 4.x pseudo-ttys configured |
| pt_cnt | 48 | Total number of 5.x pseudo-ttys configured |
-
Note - Both the freemem and t_gpgslo parameters are defined in pages. Utilities like vmstat translates freemem into bytes from pages.
· How to Tune the TPI Loopback Pseudo-Driver Parameters
-
* Tune the tune parameters using the following syntax: set tune:variable=value.
Miscellaneous Parameters
- The following table describes a tunable miscellaneous parameter.
-
Table A-5 Miscellaneous
| Parameter | Default | Description |
| lwp_default_stksize | 8192 | Size of the kernel stack for lwps. Do not adjust this value unless there is a kernel overflow. The value is expressed in bytes and must be a multiple of PAGESIZE bytes. |
|
|