What is the suggested size of swap if your system RAM is 4GB?
Table of Contents
What is the suggested size of swap if your system RAM is 4GB?
How much should be the swap size?
RAM Size | Swap Size (Without Hibernation) | Swap size (With Hibernation) |
---|---|---|
2GB | 1GB | 3GB |
3GB | 2GB | 5GB |
4GB | 2GB | 6GB |
6GB | 2GB | 8GB |
What is maximum size of a swap partition?
What is the right amount of swap space?
Amount of system RAM | Recommended swap space |
---|---|
less than 2 GB | 2 times the amount of RAM |
2 GB – 8 GB | Equal to the amount of RAM |
8 GB – 64 GB | 0.5 times the amount of RAM |
more than 64 GB | workload dependent |
How much memory is used in swap?
Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB. Using this formula, a system with 2 GB of physical RAM would have 4 GB of swap, while one with 3 GB of physical RAM would have 5 GB of swap.
How do I know my swap size?
The procedure to check swap space usage and size in Linux is as follows:
- Open a terminal application.
- To see swap size in Linux, type the command: swapon -s .
- You can also refer to the /proc/swaps file to see swap areas in use on Linux.
- Type free -m to see both your ram and your swap space usage in Linux.
How can I extend my swap memory?
How to extend LVM based swap filesystem
- Verify availability of the new space.
- Create additional partition for the new swap partition.
- Activate the new partition.
- Verify the new partition is available.
- Create a new physical volume on the LUN.
- Add the new volume to the volume group for the swap volume.