

Laptops that can hibernate need to be slightly larger than the physical memory. For UNIX/Linux servers with much more physical memory you may lower the size of swap space to 50% of RAM. Keep this in mind for general-purpose setups and desktop machines. Swap sizeĪs a general rule the size of the swap space it is recommended to be twice as much as the system has physical memory. In order to achieve a specific output order choose the desired column headers and its sequence. The option –show accepts a list of values that represent the column headers. $ /sbin /swapon -show=NAME,TYPE,SIZE,USED,PRIO To see which swap space is active on your UNIX/Linux system run the following command in a terminal: Version 2 can also be enabled on UNIX/Linux systems (see below). Version 1 is very common on UNIX/Linux systems, BSD and OS X, whereas version 2 exists on systems that run Microsoft Windows. Simply, version 2 is a file on a disk that resides in the file system on your harddisk. There are no files stored onto that partition but memory information (dumps). Version 1 is a separate disk partition which is the so-called swap partition. This method is named the Least Recently Used Page Replacement Algorithm (LRU). That’s why less used memory pages are parked on swap space to have as much free physical memory available as possible. Second, not all the data is needed in memory at the same time. Now, the swap space comes into play, and a selection of memory pages are transferred to the swap space to free physical memory. As a result, all data that is kept in physical memory cannot be stored there any longer. First, sometimes single processes need more memory than the system physically owns and can provide more to the processes that demands it. There exist a few reasons why swap memory is useful. In contrast, swap memory is rather cheap, but slow, and accessible within milliseconds. Physical memory is rather expensive but fast and accessible within nanoseconds. Altogether this is called the virtual memory of a computing system. To achieve this compromise UNIX/Linux systems combine two types of memory - physical memory (RAM), and swap space. Mostly, the result is a clever compromise between costs and speed to access the memory cells. The more physical memory is installed the more costly it is. Simply saying that there can never be enough. In order to work properly a computer depends on having an adequate amount of memory.
