As the name suggests, we may also allocate swap space from swap files reserved on mounted file systems. The swap files are sized in alignment with the swap chunk size (the swap chunk is the basic unit used to track swap in kernel data structures, we will discuss it in detail shortly) and may be dynamically allocated as needed. When a file system swap space is initialized, a minimum and maximum amount of space may be configured. A reserved free space limit for the file system may also be specified. Initialized file system swap appears as a directory named paging, which contains individual swap files. The swap file naming convention is somewhat interesting. The root of the name is the system's hostname followed by a period (.) and the swap chunk number this file represents in the system's swap table. While file system swap spaces are fully functional, they do present a couple of concerns. When a file system is 100 percent full, its performance becomes sluggish, and a file system with a paging directory and swap files may not be unmounted. If the host file system employs features such as VxFS logging, this could further impact swap performance. Keep these issues in mind before deciding to use this feature. It is entirely possible to allocate file system swap on a remotely mounted Network File System (NFS), but this is generally not a good idea. The extra overhead incurred in the network combined with the stateless nature of an NFS mount makes for very bad chemistry! Besides, the NFS server's administrator may not appreciate your chewing up their disk space to satisfy your swap requirements (such connections are readily apparent, and with the naming convention used, it is a simple matter to determine which remote host has configured the remote swap). |