| United States-English |
|
|
|
![]() |
Tunable Kernel Parameters: HP-UX Release 11i Version 1.6 > Chapter 7 Memory Paging SubsystemOverview 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:
The swchunk parameter determines the size of each chunk of swap area that is created on successive devices or file systems. Selecting an appropriate value for this parameter requires extensive knowledge of kernel operation and system internals. Without such knowledge, do not change swchunk to a nondefault value. When devices are connected to the system and configured, part of the disk can be reserved for device swap. The only configurable kernel parameter related to device swap is nswapdev, which specifies how many devices have been configured with space allocated for device swap. Data structure storage space is reserved in the kernel for nswapdev devices.
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. nswapfs is the file system swap counterpart to nswapdev and defines how many locally mounted file systems can be configured system-wide to support file system swap. Like nswapdev, nswapfs should be set to match the actual number of file systems that are normally mounted and intended to be used for file system swap (about nswapfs times 300 bytes of kernel space is required for data structure storage). Only hard disk read/write file systems can be used for file system swap. A second configurable parameter, allocate_fs_swapmap can be set to enable or disable the allocation of swap space at the time swapon() is called rather than waiting to allocate space using malloc(). Preallocating space ensures the unconditional availability of file system swap space when malloc() is called (otherwise a file-system-full error could occur in some circumstances). Preallocation of file system swap space when swapon() is called is commonly used when high availability is important, but it does prevent other processes from using any resources that are not being use by the process that reserved them. Memory allocation is normally based on the availability of virtual memory (swap space available on disks and file systems). Total available (swappable) memory is the same as total swap space. However, on large systems with massive amounts of installed RAM this can lead to inefficiencies. Consider a system, for example, that contains 200 MB of RAM, and has 1 GB of swap on the root disk. It is inappropriate to limit such a system running in single-user mode with only the root disk mounted to only 1 GB of memory space when the kernel occupies only 10% or less of the available system RAM. By allowing the use of pseudo-swap, any unused RAM can also be allocated for use by the swap system, allowing larger, more demanding processes to run. On a workstation with 100 or 200 MB of swap on the root device and 16 MB of RAM, the advantage of this capability is much less significant. swapmem_on is used to enable or disable the allocation of pseudo-swap space in system RAM. |
||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||