Using Swap file to Mimic Larger RAM
Sometimes running some stressing tests causes some important apps to be killed by the OS because free RAM is approaching zero. Since I don’t actively use the computer while those tests are running, large latencies are tolerable. The following shows how to use storage on disk to mimic RAM.
1 | # creating a swap file of 32G, the same size of my RAM |
Adding the following to /etc/fstab
:
1 | # my swapfile |
One can use free -h
to check the swap usage:
1 | $ free -h |