Swap area (swap) is an area that exists on a high speed storage device and is an important part of a virtual memory system. Through the swap area, we are no longer limited to the limited physical memory space, theoretically can expand the virtual memory system, so as to run more programs, more business transactions, more fully play hardware resources. The swap area uses the swap technology and the memory Exchange process or data page. According to a certain scheduling principle, some infrequently used processes or data pages in memory are exchanged periodically to swap areas to allow more free space for programs that need to be run. The swap process or data page is exchanged as needed, which enables the management of a large number of concurrent processes. Improper Exchange zone settings not only make the page-shift daemon Busy exchanging page access and consumption time, but also make the process running speed, system efficiency are greatly reduced, to a large extent, affect the performance of the operating system. With the increasing application and the rapid growth of operations, high-performance databases, such as the shared memory technology used by the Informix Online Dynamic Server in response to rapid access to data, have made a higher demand for limited physical memory space, Therefore, the implementation of the Exchange area effective management plays an important role.
Calculation of swap area capacity
The swap area is typically required for initial installation of the operating system, and most programs require the minimum required swap area capacity to function properly. Generally, when the physical memory does not exceed 256M, the primary swap capacity is set to twice times the memory, and more than 256M, the capacity is the same as the physical memory. After installation of the operating system, with the increasing application and business changes, the original Exchange zone settings may not meet the needs, the performance of the system also has an impact, the system administrator can add a new exchange zone as a secondary exchange zone with the main exchange area supporting the use. Administrators should also regularly monitor the use of swap areas and make the necessary adjustments as needed.
Type of swap area
Exchange distinctions are mainly divided into the following four categories:
1. Device Exchange
This is faster if you use the entire disk or part of the disk area as a swap area in a contiguous physical space. The use of advanced logical volume technology in HP-UX enables dynamic and scalable management of physical disks, so administrators can use one or more logical volumes as devices, whereas in SCO OpenServer, block devices that occupy a certain disk space area are used as devices.
2. File System Exchange
File system Exchange is a secondary exchange, only in the device exchange is not enough to be considered to meet the need for page feed, characterized by simple and convenient configuration and dynamic settings. Because the file system Exchange uses only some of the file systems it needs, the size of the space used is variable, and many applications and data in the filesystem require frequent access, thus greatly reducing the efficiency of the system. Administrators can limit file system Exchange to a fixed range to prevent it from taking up unnecessary space and preferably on less-used file systems.