Random notes regarding swap space and swap partitions.
What is swap space?
Swap space is an area where processes are swapped in and out to effectively manage processes which share CPU time.
Swap space is like extra RAM which increases processing power of the CPU but should not be considered a solution in lieu of RAM. Swap space is not on the RAM, but located on the HD.
- Slower than RAM.
- Thrashing - When the kernel creates a volatile and unstable cycle of swapping processes.
- You may resolve thrashing by reducing the swappiness value.
The best way to modify a swap file is to use rescue mode. This avoids conflicts with processes in swap space and swap space being used by the kernel.
A swap file should be used if you plan to modify it regularly, as it can be easily resized.
Large amounts of RAM on a server typically require smaller swap partitions.
Swap space is what allows multiple browsers/tabs and applications to be used simultaneously.
Your swap partition should be twice the amount of your physical RAM up to 2GB. After that 1GB for every 1GB of physical RAM.
Comments
Post a Comment