Tunable Kernel Parameters HP-UX Release 11i Version 1.6 Edition 2 Customer Order Number: ONLINE ONLY Manufacturing Part Number : TKP-90203 E0203 Printed in United States of America © Copyright 2000-2003 Hewlett-Packard Company. All rights reserved.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Revision History This guide’s printing date and part number indicate its current edition. The printing date changes when a new edition is printed. (Minor corrections and updates which are incorporated at reprint do not cause the date to change.) The part number changes when extensive technical changes are incorporated. New editions of this manual incorporate all material updated since the previous edition. Edition 2 February 2003. Part number TKP-90302. Online only. HP-UX Release 11i Version 1.6 Update 1.
Conventions We use the following typographical conventions. audit (5) An HP-UX manpage. On docs.hp.com and on the Instant Information CD, it may be a hot link to the manpage itself. For example, audit is the name and 5 is the section in the HP-UX Reference. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man (1). 4 Book Title The title of a book. On the web and on the Instant Information CD, it may be a hot link to the book itself.
Contents 1. Overview Tunables by Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tunable Kernel Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manpage Layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Specify Configurable Parameter Values. .
Contents 5. Interprocess Communication (IPC) Subsystem IPC Parameter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Parameter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Semaphore Parameter Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shared Memory Parameter Summary. . . . .
Contents Spinlock Pool Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Acceptable Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 10.
Contents 8
1 Chapter 1 Overview 9
Overview Tunables by Subsystem Tunables by Subsystem The tunable kernel parameters are divided into the following subsystems and groups.
Overview Tunable Kernel Parameters Tunable Kernel Parameters Tunables (or configurable kernel parameters) are kernel variables that allow the operating system to be configured to fit specific system needs, resulting in better performance and/or more efficient allocation of resources.
Overview Manpage Layout Manpage Layout The tunable manpages described in this manual are available on HP-UX 11i Version 1.6 systems with the man command as well as on docs.hp.com and on Instant Information and through the kcweb (1M) interface. The manpages for tunable kernel parameters have a layout that is different from other manpages. The special headings and subheadings are described below. NAME This section contains the name or names of the tunable and a short description.
Overview How to Specify Configurable Parameter Values How to Specify Configurable Parameter Values All configurable kernel parameters must be specified using an integer value or a formula consisting of a valid integer expression. All can be specified as an integer, and most can be specified using a formula; but only a minority are usually specified using formula values. Entering Values Use the kcweb web interface or the kmtune command to view and change values.
Overview Undocumented Kernel Parameters Undocumented Kernel Parameters Some of the configurable parameters that appear in the kernel master file are not documented, and some are not known to or are not supported by kcweb and kmtune for any of several possible reasons: 14 • The parameter is obsolete. It is no longer used in current HP-UX releases, but might appear in an existing kernel configuration.
2 Chapter 2 Accounting Subsystem 15
Accounting Subsystem Accounting Parameter Summary Accounting Parameter Summary Two configurable kernel parameters are related to accounting: Accounting acctresume Resume accounting when free space on the file system where accounting log files reside rises above acctresume plus minfree percent of total usable file system size. Manpage: acctsuspend (5).
Accounting Subsystem Overview of Accounting Parameters Overview of Accounting Parameters When activated by the system administrator, the process accounting subsystem maintains log files for storing information about system and user processes. These files can become large, reducing available space for other files on the file system where they reside.
Accounting Subsystem Specifying a Threshold Value Specifying a Threshold Value acctsuspend and acctresume are integers that each specify a percentage of total usable space on the file system where the accounting log files reside. This percentage is added to the current value of minfree to determine what percentage of total file system space must be available for process accounting to continue operating.
Accounting Subsystem Specifying a Threshold Value minfree = 5 acctsuspend = 0 acctresume = 3 Suspend when file system is completely full, do not resume (resume when available space reaches 105% of total file system which cannot happen): minfree = 5 acctsuspend = -5 (minus 5) acctresume = 100 How to Determine Value of minfree acctsuspend and acctresume specify accounting thresholds based on the current value of the minfree parameter for the file system where the accounting files reside.
Accounting Subsystem Specifying a Threshold Value 20 Chapter 2
3 Chapter 3 Asynchronous I/O Subsystem 21
Asynchronous I/O Subsystem Asynchronous I/O Parameter Summary Asynchronous I/O Parameter Summary The following kernel parameters are used for managing asynchronous I/O operations. The first four (aio_*) are related to POSIX asynchronous I/O operations; the last (max_async_ports) pertains to open ports between processes and the asynchronous disk I/O driver. See also “How to Specify Configurable Parameter Values” on page 13.
4 Chapter 4 File System Subsystem 23
File System Subsystem File System Parameter Summary File System Parameter Summary Configurable parameters related to file system performance fall into the following categories. See also “How to Specify Configurable Parameter Values” on page 13. File System Buffer Parameter Summary Allocate system physical memory resources for static and dynamic file system buffer cache space. For more information, see “File System Buffer Parameters” on page 27.
File System Subsystem File System Parameter Summary Logical Volume Manager (LVM) Parameter Summary Control kernel interaction with the Logical Volume Manager. For more information, see “Logical Volume Manager (LVM) Operation” on page 30. File System: LVM maxvgs Maximum number of volume groups configured by the Logical Volume Manager on the system. Manpage: maxvgs (5). Open or Locked Files Parameter Summary Set number of files that can be open or locked simultaneously.
File System Subsystem File System Parameter Summary File System: Read vxfs_max_ra_kbytes Maximum amount of read-ahead data, in KB, that the kernel may have outstanding for a single VxFS file system. Manpage: vxfs_max_ra_kbytes (5). File System: Read vxfs_ra_per_disk Maximum amount of VxFS file system read-ahead per disk, in KB. Manpage: vxfs_ra_per_disk (5). SCSI Devices Parameter Summary Control SCSI device access.
File System Subsystem File System Buffer Parameters File System Buffer Parameters The system allocates a portion of system memory for use in block-mode file operations (such as exec() and mount() system calls and inode reading). Buffer space is reserved in increments of 4096-byte pages, but buffers can be much larger than 4096 bytes, requiring as many as 16 or more pages per buffer, depending on hardware device and configuration characteristics.
File System Subsystem File System Buffer Parameters Alternate Procedure To allocate a fixed amount of memory for static buffer cache, set bufpages to the desired number of 4 KB pages, and set nbuf to zero, which allocates space for bufpages/2 buffer headers in the header array. dbc_min_pct and dbc_max_pct are ignored.
File System Subsystem Open or Locked Files Parameters Open or Locked Files Parameters Open and Locked Files Individual processes can open one or more files for reading or writing, and it is not uncommon for a process to have many files open at the same time; particularly in large database applications, for example. Furthermore, mail, database, and other applications often require simultaneous access to a given file by two or more processes.
File System Subsystem Logical Volume Manager (LVM) Operation Logical Volume Manager (LVM) Operation Logical Volume Manager (LVM) is a subsystem for managing file systems and disk storage space that are structured into logical volumes rather than being restricted to the beginning and end points of a physical disk. Logical volumes can be smaller than the disk or disk array on which they reside, or they can include all or part of several disks or disk arrays.
5 Chapter 5 Interprocess Communication (IPC) Subsystem 31
Interprocess Communication (IPC) Subsystem IPC Parameter Summary IPC Parameter Summary See also “How to Specify Configurable Parameter Values” on page 13. Message Parameter Summary The following parameters control allocation of space for messages. See also “Overview of Message Queue Operations” on page 35. IPC: Message mesg Enable or disable IPC messages at system boot time. Manpage: mesg (5). IPC: Message msgmap Size of free-space resource map for allocating shared memory space for messages.
Interprocess Communication (IPC) Subsystem IPC Parameter Summary IPC: Semaphore semmsl Maximum number of individual System V IPC semaphores per semaphore identifier. Manpage: semmsl (5). IPC: Semaphore semume Maximum number of IPC semaphores that a given process can have undo operations pending on. Manpage: semume (5). IPC: Semaphore semvmx Maximum value any given IPC semaphore is allowed to reach (prevents undetected overflow conditions). Manpage: semvmx (5).
Interprocess Communication (IPC) Subsystem System V Interprocess Communication Mechanisms System V Interprocess Communication Mechanisms The HP-UX operating system uses shared memory to provide three mechanisms for communicating between cooperating programs and processes: Messages Message data is stored in a given part of shared memory to be retrieved by receiving programs.
Interprocess Communication (IPC) Subsystem Overview of Message Queue Operations Overview of Message Queue Operations See “Message Parameter Summary” on page 32 for the list of parameters. Messages Messages are small collections of data (400 bytes, for example) that can be passed between cooperating programs through a message queue. Messages within a queue can be of different types, and any process with proper permissions can receive the messages.
Interprocess Communication (IPC) Subsystem Overview of Message Queue Operations Message Queues Queue Size Each message queue is created with enough space for msgmnb (message queue number of bytes) bytes of messages. Each message contains one or more message segments of msgssz (message segment size) bytes each. Message Size To discourage malicious or poorly written programs from consuming excessive message space, individual messages cannot contain more than msgmax (message maximum) bytes per message.
Interprocess Communication (IPC) Subsystem Overview of Semaphore Operations Overview of Semaphore Operations System V IPC semaphores are used mainly to keep processes properly synchronized to prevent collisions when accessing shared data structures. Their use in software tends to be complex, so many programmers use alternate means of control where practical. See “Semaphore Parameter Summary” on page 32 for the list of parameters.
Interprocess Communication (IPC) Subsystem Overview of Shared Memory Operation Overview of Shared Memory Operation See “Shared Memory Parameter Summary” on page 33 for the list of parameters. Shared Memory Shared memory is reserved memory space for storing data structures and data being shared between or among cooperating processes.
6 Chapter 6 Kernel Crash Dump Subsystem 39
Kernel Crash Dump Subsystem Kernel Crash Dump Parameter Summary Kernel Crash Dump Parameter Summary The following parameters affect dump operations when a kernel panic occurs and parts of system memory are dumped to disk. See also “How to Specify Configurable Parameter Values” on page 13. Kernel Crash Dump alwaysdump Select which classes of system memory pages are to be dumped if a kernel panic occurs. Manpage: alwaysdump (5).
7 Chapter 7 Memory Paging Subsystem 41
Memory Paging Subsystem Memory Paging Parameter Summary Memory Paging Parameter Summary Memory Paging allocate_fs_swapmap Enable or disable preallocation of file system swap space when swapon() is called as opposed to allocating swap space when malloc() is called. Enabling allocation reduces risk of insufficient swap space and is used primarily where high availability is important. Manpage: allocate_fs_swapmap (5).
Memory Paging Subsystem Memory Paging Parameter Summary Memory Paging: Size vps_pagesize Minimum user page size (in KB) if no page size is specified using chatr. Manpage: vps_pagesize (5).
Memory Paging Subsystem Overview of Memory Paging Parameters Overview of Memory Paging Parameters Configurable kernel parameters for memory paging enforce operating rules and limits related to virtual memory (swap space). They fall into the following categories: Total System Swap Maximum swap space that can be allocated, system-wide. Parameters include: swchunk. Device Swap Swap space allocated on hard disk devices. Parameters include: nswapdev.
Memory Paging Subsystem Overview of Memory Paging Parameters File System Swap In addition to swap space on individual devices, swap space can also be created in existing mounted file systems. This file system swap is somewhat slower than device swap because it must be handled by reading from and writing to open files rather than transferring data directly between the operating system and the disk device.
Memory Paging Subsystem Overview of Memory Paging Parameters 46 Chapter 7
8 Chapter 8 Process Management Subsystem 47
Process Management Subsystem Process Management Parameter Summary Process Management Parameter Summary See also “How to Specify Configurable Parameter Values” on page 13. Timesharing Parameter Summary See also “CPU Timesharing Management” on page 50. ProcessMgmt: CPU timeslice Maximum time a process can use the CPU until it is made available to the next process having the same process execution priority. This feature also prevents runaway processes from causing system lock-up. Manpage: timeslice (5).
Process Management Subsystem Process Management Parameter Summary ProcessMgmt: Memory pa_maxssiz_64bit Maximum size (in bytes) of the stack for a user process running under the PA-RISC emulator on IPF. Manpage: pa_maxssiz (5). Process Parameter Summary See also “Process Management” on page 50. ProcessMgmt: Process executable_stack Allows or denies program execution on the stack. Manpage: executable_stack (5).
Process Management Subsystem Overview of Process Management Parameters Overview of Process Management Parameters Process management includes: • Managing the number of processes on the system and processes per user to keep system resources effectively distributed among users for optimal overall system operation. • Managing allocation of CPU time to competing processes at equal and different priority levels.
Process Management Subsystem Overview of Process Management Parameters Memory Allocation Management See also “Memory Space Parameter Summary” on page 48. PA-RISC hardware supports the allocation of up to 2 GB of virtual memory to a single process. This memory is divided between the text space where programs are stored, data space (globals, statics, locals to main(), strings, etc.), dynamic storage (space allocated by malloc(), stack, registers, etc.), and approximately 200 MB reserved for other purposes.
Process Management Subsystem Overview of Process Management Parameters 52 Chapter 8
9 Chapter 9 Spinlock Pool 53
Spinlock Pool Spinlock Pool Parameter Summary Spinlock Pool Parameter Summary See also “Spinlock Pool Parameters” on page 55 and “Tunables by Subsystem” on page 10. Spinlock Pool bufcache_hash_locks Buffer-cache spinlock pool. NO MANPAGE. Spinlock Pool chanq_hash_locks Channel queue spinlock pool. Manpage: chanq_hash_locks (5). Spinlock Pool dnlc_hash_locks Number of locks for directory cache synchronization. NO MANPAGE. Spinlock Pool ftable_hash_locks File table spinlock pool. NO MANPAGE.
Spinlock Pool Spinlock Pool Parameters Spinlock Pool Parameters The parameters related to spinlock pools for multiprocessor computers are used similarly and are documented together here. Each parameter allocates the specified number of spinlocks for the corresponding system resource: These parameters are for use by advanced users only who have a thorough understanding of how spinlocks are used by multiple processors and how the number of spinlocks needed are related to system size and complexity.
Spinlock Pool Spinlock Pool Parameters 56 Chapter 9
10 Chapter 10 Streams Subsystem 57
Streams Subsystem Streams Parameter Summary Streams Parameter Summary The following configurable kernel parameters are used for managing resources used by character-mode I/O streams. See also: • “Overview of Streams Kernel Parameters” on page 59 • “How to Specify Configurable Parameter Values” on page 13 • STREAMS/UX for the HP 9000 Reference Manual Streams NSTREVENT Maximum number of outstanding streams bufcalls that are allowed to exist at any given time on the system.
Streams Subsystem Overview of Streams Kernel Parameters Overview of Streams Kernel Parameters A stream is an I/O pipeline through which serial data passes between the HP-UX operating system and a kernel driver associated with a raw (character-mode) device file and corresponding device such as a terminal or pty.
Streams Subsystem Overview of Streams Kernel Parameters 60 Chapter 10
11 Chapter 11 Miscellaneous Parameters 61
Miscellaneous Parameters Miscellaneous Parameter Summary Miscellaneous Parameter Summary The following miscellaneous configurable kernel parameters affect various, usually unrelated, HP-UX subsystems. See also “How to Specify Configurable Parameter Values” on page 13. CD-ROM Parameter Summary Miscellaneous: CD ncdnode Maximum number of entries in the vnode table and therefore the maximum number of open CD-ROM file system nodes that can be in memory. Manpage: ncdnode (5).
Miscellaneous Parameters Miscellaneous Parameter Summary Fast Symbolic Link Traversal Parameter Summary Miscellaneous: Links create_fastlinks Create fast symbolic links using a newer, more efficient format to improve access speed by reducing disk block accesses during path name look-up sequences. Manpage: create_fastlinks (5). Reserved System Memory Parameter Summary Miscellaneous: Memory eqmemsize Number of pages of memory to be reserved for equivalently mapped memory, used mostly for DMA transfers.
Miscellaneous Parameters Miscellaneous Parameter Summary Terminal Parameter Summary Miscellaneous: Terminal nclist Maximum number of cblocks available for data transfers through tty and pty devices. Manpage: nclist (5). Miscellaneous: Terminal npty Maximum number of pseudo-tty entries allowed on the system at any one time. Manpage: npty (5). Miscellaneous: Terminal nstrpty System-wide maximum number of streams-based pseudo-ttys that are allowed on the system. Manpage: nstrpty (5).
A Appendix A Table of Tunable Kernel Parameters 65
Table of Tunable Kernel Parameters Table A-1 Category Tunable Kernel Parameters in Alphabetic Order Tunable Description Accounting acctresume Resume accounting when free space on the file system where accounting log files reside rises above acctresume plus minfree percent of total usable file system size. Manpage: acctsuspend (5).
Table of Tunable Kernel Parameters Table A-1 Tunable Kernel Parameters in Alphabetic Order (Continued) Category Tunable Description Miscellaneous: Links create_fastlinks Create fast symbolic links using a newer, more efficient format to improve access speed by reducing disk block accesses during path name look-up sequences. Manpage: create_fastlinks (5). File System: Buffer dbc_max_pct Maximum percentage of memory for dynamic buffer cache. Manpage: dbc_max_pct (5).
Table of Tunable Kernel Parameters Table A-1 Category Tunable Kernel Parameters in Alphabetic Order (Continued) Tunable Description File System: Read hfs_max_revra_blocks The maximum number of reverse read-ahead blocks that the kernel may have outstanding for a single HFS file system. Manpage: hfs_max_revra_blocks (5). File System: Read hfs_ra_per_disk The amount of HFS file system read-ahead per disk drive, in KB. Manpage: hfs_ra_per_disk (5).
Table of Tunable Kernel Parameters Table A-1 Tunable Kernel Parameters in Alphabetic Order (Continued) Category Tunable Description ProcessMgmt: Memory maxtsiz Maximum allowable process text segment size, used by unchanging executable-code (32-bit processes). Manpage: maxtsiz (5). ProcessMgmt: Memory maxtsiz_64bit Maximum allowable process text segment size, used by unchanging executable-code (64-bit processes). Manpage: maxtsiz (5).
Table of Tunable Kernel Parameters Table A-1 Tunable Kernel Parameters in Alphabetic Order (Continued) Category Tunable Description IPC: Message msgmax System-wide maximum size (in bytes) for individual messages. Manpage: msgmax (5). IPC: Message msgmnb Maximum combined size (in bytes) of all messages that can be queued simultaneously in a message queue. Manpage: msgmnb (5). IPC: Message msgmni Maximum number of message queues allowed on the system at any given time. Manpage: msgmni (5).
Table of Tunable Kernel Parameters Table A-1 Category Tunable Kernel Parameters in Alphabetic Order (Continued) Tunable Description Streams NSTREVENT Maximum number of outstanding streams bufcalls that are allowed to exist at any given time on the system. This number should be equal to or greater than the maximum bufcalls that can be generated by the combined total modules pushed onto any given stream, and serves to limit run-away bufcalls. Manpage: nstrevent (5).
Table of Tunable Kernel Parameters Table A-1 Tunable Kernel Parameters in Alphabetic Order (Continued) Category Tunable Description ProcessMgmt: Memory pa_maxssiz_32bit Maximum size (in bytes) of the stack for a user process running under the PA-RISC emulator on IPF. Manpage: pa_maxssiz (5). ProcessMgmt: Memory pa_maxssiz_64bit Maximum size (in bytes) of the stack for a user process running under the PA-RISC emulator on IPF. Manpage: pa_maxssiz (5).
Table of Tunable Kernel Parameters Table A-1 Tunable Kernel Parameters in Alphabetic Order (Continued) Category Tunable Description IPC: Semaphore semmsl Maximum number of individual System V IPC semaphores per semaphore identifier. Manpage: semmsl (5). IPC: Semaphore semume Maximum number of IPC semaphores that a given process can have undo operations pending on. Manpage: semume (5).
Table of Tunable Kernel Parameters Table A-1 Category Tunable Kernel Parameters in Alphabetic Order (Continued) Tunable Description Memory Paging swapmem_on Enable or disable pseudo-swap allocation. This allows systems with large installed memory to allocate memory space as well as disk swap space for virtual memory use instead of restricting availability to defined disk swap area. Manpage: swapmem_on (5). Memory Paging swchunk Amount of space allocated for each chunk of swap area.
Table of Tunable Kernel Parameters Table A-1 Category Tunable Kernel Parameters in Alphabetic Order (Continued) Tunable Description File System: Read vxfs_max_ra_kbytes Maximum amount of read-ahead data, in KB, that the kernel may have outstanding for a single VxFS file system. Manpage: vxfs_max_ra_kbytes (5). File System: Journaled vxfs_ra_per_disk Maximum amount of VxFS file system read-ahead per disk, in KB. Manpage: vxfs_ra_per_disk (5).
Table of Tunable Kernel Parameters 76 Appendix A