Tunable parameters

Virtual memory (VM) parameters

Aging parameters

Parameter Dflt 64/256/1024 Min 64/256/1024 Max 64/256/1024 Auto
ET_AGE_INTERNAL 8 3 86400  
HI_GROW_RATE 8 4 8  
KV_RESV_MAX 3200/12800/51200 800/3200/12800 6400/25600/102400 KVM
LO_GROW_RATE 2 0 2  
MAX_AGEQUANTUM 60 30 400  
MIN_AGEQUANTUM 25 15 400  
MAXRSS 0x800 0x200 0x40000000  

While many of the tunables affecting how processes get aged are system level tunables (that is, applicable to all processes), some aging parameters applicable to a specific process can be changed to be different from those for other processes. Specifically, a process can have different parameter values for these tunables:


A process can change the applicable values using the priocntl system call or command interface.

However, since these parameters affect memory resource distribution among processes, ordinarily the PLOCK privilege is required for a process that changes these parameters. For some trusted systems, it is necessary to waive this requirement, and this is made possible by the AGING_TUNE_PRIV tunable. Typically, this tunable is set to ``0''; if unprivileged processes are to be allowed to change their aging parameters, then this tunable should be set to ``1''.

Specifies the elapsed time aging interval. This is the maximum interval, measured in seconds, for which a process that is not swapped out can continue without the scheduling of an aging event. If the system's free memory supply is plentiful, then processes may not experience aging of their address spaces; therefore, even low or moderate ET_AGE_INTERVAL does not affect process execution in such cases. Otherwise, a suitable ET_AGE_INTERVAL ensures timely identification and recycling of memory that is used relatively infrequently by processes.


While other tunables (MIN_AGEQUANTUM and MAX_AGEQUANTUM) specify the upper and lower limits on the number of virtual clock ticks between successive aging steps, the number of virtual clock ticks between two aging steps is determined by the dynamics of a process's growth rate. A high growth rate is suggestive of expansion of process size or change in process locality, and such processes are allowed more virtual clock ticks before aging. Conversely, a low growth rate is taken to signal a stable working set and biases the process toward a quicker aging step. The determination of whether a process's instantaneous growth rate is high or low is made by comparing the process growth (measured in number of physical pages) over five virtual clock ticks with the above two tunables. If the growth rate is below the LO_GROW_RATE tunable, then the process is considered to be growing slowly enough to warrant quicker aging; otherwise, if the growth rate is above the HI_GROW_RATE tunable, the process is given an extension of time between aging steps. A growth rate that falls between the two tunables does not result in an adjustment of the scheduled aging step.

KV_RESV_MAX is the amount of kernel virtual memory to hold in reserve against discretionary allocations of kernel virtual memory.



These tunables specify the number of virtual clock ticks (a clock tick specifies a duration equal to 1/HZ second, which is equal to 10 milliseconds for the conventional setting of HZ=100) after which a process schedules an aging step for itself. A process is said to have taken a virtual clock tick, if one of its LWPs is executing on a processor when a clock interrupt occurs. It is possible for an LWP to execute for short durations of time without receiving virtual clock ticks; for example, this can happen if a process is predominantly in an interrupt- or event-driven mode of execution. Such processes are likely to be aged by alternate means (see ET_AGE_INTERVAL).

The number of virtual clock ticks until the first aging step is scheduled.

The maximum number of virtual clock ticks allowed to a process between two aging steps.

The minimum number of virtual clock ticks allowed to a process between two aging steps.

Specifies the maximum memory, in pages, that a process is allowed. When processes exceed this value, they are ``trimmed,'' that is, forced to return a small number of pages back to the system, unless the system memory supply is plentiful. This tunable is intended to limit aberrant growth in the size of a process.

During a process's memory aging step, typically all its unlocked memory is considered reclaimable. If a process has no memory that is not locked down, then it is futile to subject the process to an aging step. This tunable takes this consideration one step further; it specifies the minimum number of non-locked pages a process must have before it is considered for an aging step. Typically, this tunable should be set to the default. A non-zero value for this tunable is somewhat risky because it can lead to a memory depletion deadlock when a process that is not swappable because of other reasons also is not aged while holding down unreserved memory because of a positively valued NONLOCKED_MINPG.

Dedicated memory parameters

Parameter Dflt Min Max
GENERAL_MEMORY 32768 4096 16777216

Specifies the size, in 4K pages, of memory which is to be reserved at startup time and dedicated for special purposes. Such purposes include shared memory segments which are 1MB or larger, shared memory segments which use fine-grained affinity (FGA shm), and dynamically mapped shared memory (dshm) segments. You must set DEDICATED_MEMORY in order to dedicate any amount of system memory.

DEDICATED_MEMORY is used in conjunction with GENERAL_MEMORY. See ``Managing Large Physical Memory'' for information abut using the DEDICATED_MEMORY parameter to configure Large Physical Memory (LPM).

Specifies the size, in pages, of memory which is preserved for general purpose use should the main memory be too small to accommodate the DEDICATED_MEMORY parameter. This parameter acts as a safety net, allowing the system to boot if DEDICATED_MEMORY is over-specified or if some memory fails to be recognized at boot time.

Kernel virtual address space parameters

Parameter Dflt Min Max
DRV_SEGKMEM_BYTES 0 0 0x10000000
SEGKMEM_BYTES 0x2000000 0 0x40000000
SEGKVN_BYTES 0x1100000 0 0x40000000
SEGMAP_BYTES 0xF60000    

Specifies the quantity of kernel virtual memory which will be put aside for large driver mappings, especially those generated by physmap(D3) or devmem_mapin(D3). Typically, this parameter is incremented by driver package installation scripts rather than by the administrator. DRV_SEGKMEM_BYTES is the preferred tunable when setting aside kernel virtual memory for large driver mappings, but if you need to control the percentage of kernel virtual segments reserved for large mappings other than large device memory areas, use ZBM_LGMAP_PERCENT.




These tunables, along with DRV_SEGKMEM_BYTES, UVIRT_EXTENSION and the size of general purpose memory, control the size of the kpgseg (segkvn) kernel virtual segment. kpgseg and segkvn are both valid names for the same virtual segment. This segment is used by the kernel memory allocator for all of its memory, by the hardware address translation layer (HAT) for its L1 page tables, and by various drivers for both temporary and permanent mappings. It is also used by the kernel to map ublocks and loadable modules. The size of kpgseg (segkvn) is given by the following formulas:



avail = 1GB - ptob(UVIRT_EXTENSION) - static-kernel-sz - calloc()ed-memory - per-engine-memory

seg-size = MIN(fixed-sz + (gp * percent-sz), avail)

static-kernel-sz, calloc()ed-memory and per-engine-memory are memory the kernel consumes at boot time. gp = general purpose memory.

If kpgseg (segkvn) is too small, performance might decrease because of an increased cost for allocating kernel virtual space. Also, performance might decrease on a multiprocessing system due to an increased requirement for TLB (Translation Lookaside Buffer) shootdown. In some cases driver modules might not load. Moreover, in extreme cases, the system or some LWPs could hang because of a wait for kernel virtual space that is not available. Under any of these circumstances, you may want to increase kpgseg (segkvn) virtual space. Conversely, if kpgseg (segkvn) is underutilized, you might want to decrease its size to save some of the physical memory needed to support kernel virtual.

Controls the percentage of kpgseg (segkvn) kernel virtual segment reserved for large mappings. If this value is too small, then hangs are possible while processing large physical I/O requests close to the maximum permitted size of 128K, while adding swap space, or while attempting to load certain device drivers or other loadable modules. Drivers attempting to physmap(D3) large device memory areas should use DRV_SEGKMEM_BYTES instead of ZBM_LGMAP_PERCENT. See ``Adjusting kernel virtual segments for large mappings'' for additional information about using ZBM_LGMAP_PERCENT.


Together, these two tunable parameters are used to determine the amount of virtual address space available for kernel mapping of user read/write requests. To increase this by a fixed amount, SEGMAP_BYTES is increased. To increase it by an amount per amount-of-memory, SEGMAP_PERCENT is increased. (The latter is particularly useful when building a kernel for multiple machines or if you are expecting to change the amount on one machine.)

Together, these two tunable parameters controlled the size of the segkmap kernel virtual segment. This segment is used by filesystems to cache the data accessed through the read(2) and write(2) interfaces, file directory data, as well as data accessed by NFS on the server side. By default, the maximum size of segkmap is given by:


where gp was the size of the general purpose memroy pool. The actual size of segkmap could be smaller because of limited kernel virtual space. If segkmap is too small for the load, local file or remote NFS performance could suffer. Conversely, if segkmap is underutilized, and more kernel virtual space is required in another kernel virtual segment, then it is advisable to decrease the size of segkmap.


Together these tunables controlled the rate at which segkmap unloads the translations for mappings that it caches (and thereby frees the pages). SEGMAP_AGE_TIME controlls the length of time (in seconds) a mapping must reside in memory before it is unloaded under typical memory demand conditions. The actual time could increase or decrease depending on the actual demand on memory. SEGMAP_AGINGS controls the maximum number of segkmap mappings that can be unloaded in any one second period under typical memory demand conditions. The actual number can increase or decrease depending on the actual demand on memory.

The effect of slowing down segkmap aging is to increase filesystem performance but at the expense of decreased available memory for other uses (for example, for process pages).

Page size extension parameters

Parameter Dflt Min Max
INVLPG_MAX 10 0 255
SEGKMEM_PSE_BYTES 0 0 536870912

INVLPG_MAX defines the threshold at which a global TLB (Translation Lookaside Buffer) flush is done, instead of repeatedly invalidating individual TLB entries. INVLPG_MAX is used in conjunction with DSHM. When a DSHM buffer is larger than a page size it may be more efficient to flush the entire TLB rather than multiple TLB entries.

Specifies the amount of physical memory to reserve for use by the kernel memory allocator (KMA). Setting aside memory for this purpose can provide a performance benefit for systems that use KMA heavily. The physical memory is reserved for use by KMA and cannot be used for anything else.

SEGKMEM_BYTES is the minimum size of the kpgseg kernel virtual segment. This segment is used by the kernel memory allocator for all its memory; by the hardware address translation layer (HAT) for its page tables; and by various drivers for both temporary and permanent mappings.

SEGKMEM_PSE_BYTES will be rounded up to the next 4MB boundary. SEGKMEM_PSE_BYTES should be less than SEGKMEM_BYTES, since some KMA requests (for DMA-accessible buffers, or buffers with special alignment or boundary restrictions) can only be satisfied with non-PSE backed KMA. The system will automatically reduce SEGKMEM_PSE_BYTES so that at least 2 megabytes of non-PSE backed KMA is available.

Paging parameters

Parameter Dflt 64/256/1024 Min Max 64/256/1024 Auto
PAGEOUTRATE 200/250/500 4 3200 PHYS
DESFREEBYTES 4194304/8388608/16777216 0 0x7FFFFFFF PHYS
GPGSLO 25 0 25  
KMEM_RESV 200/800/3200 25 320/1280/5120 PHYS
LOTSFREEBYTES 8388608/16777216/33554432 0 0x7FFFFFFF PHYS
MINAMEM 200/800/3200 25 1600/6400/25600 PHYS
MINFREEBYTES 2097152/4194304/8388608 0 0x7FFFFFFF PHYS
PAGES_NODISKMA 200/800/3200 25 1666/5666/21666 PHYS
PAGES_UNLOCK 2400/8000/32000 50 15000/63000/255000 PHYS

NOTE: The following parameters are used by the kernel and the system paging daemon, pageout, that is responsible for freeing up memory as the need arises.

Specifies a target pageout rate in pages per second under heavy memory demand conditions (for example, while paging or swapping).

This parameter is used by the swapper to determine the minimal level of freemem before it will swap in the smallest process.

It controls when swap outs begin. It specifies the low water mark of free memory (in pages) for swapping to start swapping out processes. The activity of the pageout daemon is also controlled by this parameter.




These tunable parameters (all specified in units of pages) control amounts of memory that cannot be locked down in order to prevent internal virtual memory deadlock. Changes should only be made if a kernel hang has been observed and subsequent diagnosis was performed by someone having expertise in the Virtual Memory area using kdb or crash.

The number of pages that cannot be locked down by KMA.

MINAMEM controls the number of pages that cannot be locked down under any circumstances.

The number of pages that cannot be locked down for discretionary allocation of KMA.

The number of pages in the system that cannot be locked down by the user. This parameter denotes the number of pages that are unavailable to be locked by user request using plock(2) or memcntl(2). Any attempt by a user to lock pages that would result in the number of unlocked pages in the system dropping below this threshold will fail.


These two parameters are used to compute the paging threshold. The system initiates paging whenever the amount of free physical memory is below this threshold. The paging threshold is the smaller of LOTSFREEBYTES and total physical memory divided by LOTSFREEFRACT.

Absolute paging threshold, specified in bytes.

Relative paging threshold, specified as a divisor of total physical memory.


These two parameters are used to compute the swapping threshold. The system initiates swapping when the amount of free memory is below this threshold for an extended period. The swapping threshold is the smaller of DESFREEBYTES and total physical memory divided by DESFREEFRACT.

Absolute swapping threshold, specified in bytes.

Relative swapping threshold, specified as a divisor of total physical memory.


These two parameters are used to compute the minimum amount of free memory which the system must maintain. The free memory minimum is the smaller of MINFREEBYTES and the swapping threshold divided by MINFREEFRACT.

Absolute minimum free memory, specified in bytes.

Relative minimum free memory, specified as a divisor of the swapping threshold.

Segment driver parameters

Parameter Dflt Min Max

This tunable parameter controls the rate at which segkvn ages the translations for mappings that are not memory locked. In practice, such mappings are used by the kernel symbol table (when not actively being referenced) and by loadable driver modules (when present in memory but not being actively executed). SEGKVN_AGE_TIME controls the length of time (in seconds) a mapping must reside in memory before its translations are aged.

Swapping parameters

Parameter Dflt Min Max
CPU_WEIGHT 10 0 100
MAX_DEFICIT 256 128 1024
MAXSLP 10 0 20
SWAP_MAXDEV 16 1 256




These four tunables are used to set relative preferences governing the selection of a process for swapping. A swapped out process is considered eligible for a swapin only when at least one of its LWPs is runnable. Of such eligible processes, each process is assigned a swapin priority based on several attributes, and the process with the highest swapin priority is chosen as the best candidate for swapping in. These tunables affect the computation of this swapin priority as follows:

Positively weighs the highest among all the LWP scheduling priorities.

Negatively weighs a value given by a cost function of the size of the process when it was swapped out. The cost function itself is a piecewise linear function of size that reaches a constant value for large processes, which prevents excessive bias against large processes.

Positively weighs the length of time for which all the LWPs of the process remained blocked but signalable, during the last such blocking interval that overlapped the process's swapout. This serves two purposes. First, it favors a process that became runnable while swapped out, and second, it favors a process that remained inactive for a long time and is likely to become inactive again after being allowed to continue.

Positively weighs the length of time for which the process has been swapped out.

The swapper maintains an operational variable called deficit, which is an account of short term memory needs on behalf of processes that are just swapped in. As time elapses, the deficit is revised; it is increased when processes are swapped in, and decayed gradually by a constant factor otherwise. DEFICIT_AGE is the fraction by which deficit is reduced per second. That is, if DEFICIT_AGE is 20, then deficit is reduced to 95% of its previous value each second. The available (free) memory count is reduced by deficit, in guiding further decisions for swapping processes in or out. If the system demonstrates a high percent of ``idle'' cycles with processes swapped out, then it might be advisable to reduce the DEFICIT_AGE factor so that deficit is revised downward quickly and swapins are encouraged. If, on the other hand, deficit is decayed too quickly, the system might swap processes in too quickly and experience memory thrashing.

Specifies the maximum value that ``deficit'' (see DEFICIT_AGE) is allowed to reach.

Specifies the number of seconds for which all LWPs in a process can sleep, or be in a stopped or idle state, while remaining signalable, before the process is considered a suitable candidate for a discretionary swapout by the system if memory stress warrants swapping. The test for signalability is meant to exclude those durations in which involuntary blocking occurs because of contention for kernel resources. Processes that sleep for long durations merely waiting for events are considered preferable for swapouts, over processes that block intermittently for short durations or those that block rarely.

Specifies how the system should arrive at the estimated peak rate for paging (both pageins and pageouts) to and from the swap device. The setting of this tunable does not affect the actual paging rate, only the system's estimate of the peak paging capacity. In response to real paging activity approaching the estimated peak paging rate, the swapper becomes more aggressive in selecting processes for swapout, with the objective of reducing system load.

If multiple swap devices exist and can be accessed in parallel so that the peak sustainable paging rate can scale with the number of swap devices, then this tunable should be set to ``1''. In this case, as each new swap device is added, the system increases its estimate of peak paging throughput. If one or more swap devices exist but the peak sustainable paging rate does not increase either because of controller limitations or because the swap devices are on the same physical media, then this tunable should be set to ``0''.

Specifies the maximum number of swap devices that will be configured.

Database management parameters

Parameter Dflt Min Max

NOTE: These values represent the number of 4K pages.

Specifies, in pages, additional virtual address space beyond the default 3GB limit, to be given to user processes. The value of UVIRT_EXTENSION applies to all user processes on the system.

In general, UVIRT_EXTENSION should only be set if the system is going to run extremely large programs, such as databases with large (3GB or more) shared memory segments. One typical case in which a non-zero value might be useful is when running large programs on machines with large amounts of physical memory (4GB or more) where much of that memory is dedicated. In such cases, UVIRT_EXTENSION might allow some applications to use the physical memory of the machine more efficiently.

Next topic: Miscellaneous parameters
Previous topic: Timer and scheduler parameters

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004