I have a Centos7 VM running under VMware and I'm considering increasing virtual memory in the Centos VM. Currently my VM has 8GB of virtual memory, 6GB of swap and using 0 swap right now. I am considering increasing the VM's virtual memory from 8GB to 16GB and would like to know the implications of this. Would i need to adjust the swap partition ? I've read that the swap file should be close in size to the actual virtual memory capacity. If there are not other concerns regarding the swap size I estimate that the current size of 6GB should be enough.
Asked
Active
Viewed 90 times
1
-
1You might want to be a bit more precise here - do you want to increase the amount of physical RAM in the host or the amount of virtual memory in the Centos VM? Also, by how much and does the VM use any swap at this point? Do you expect that it will? – MrMajestyk Feb 03 '16 at 09:11
-
The implications of increasing RAM is having more RAM. Not meant snippy, but you have to say what it means (you never talk of what t he server does run), so we can only state the obvious. Whether SWAP needs to change depends a lot on whether it is used or possibly used. – TomTom Feb 03 '16 at 11:37
-
Virtual memory and physical are not the same things. – c4f4t0r Mar 17 '16 at 10:41
2 Answers
1
Leave the swap at 6GB.
If it worked before with 8GB+6GB it will also work with 16GB+6GB.
More info here: https://askubuntu.com/questions/62073/how-to-decide-on-swap-size
1
This is the official RedHat recommendation regarding the swap sizes:
Amount of RAM in the System Recommended Amount of Swap Space
4GB of RAM or less a minimum of 2GB of swap space
4GB to 16GB of RAM a minimum of 4GB of swap space
16GB to 64GB of RAM a minimum of 8GB of swap space
64GB to 256GB of RAM a minimum of 16GB of swap space
256GB to 512GB of RAM a minimum of 32GB of swap space
Zoliton is right and you don't need to increase the swap partition.
Cheers!
![](../../users/profiles/269155.webp)
shodanshok
- 44,038
- 6
- 98
- 162
![](../../users/profiles/342695.webp)
runyoufreak
- 184
- 1
- 6