0

I'm running Ubuntu on Digitalocean's instance that using ssd as their disk, and I'm using swapfile to help memory does the job.

What I wanna know is, how can we compare speed between ram and the swapfile? Is it really worth using swapfile on server's ssd?

Saying that I need to use 4 core processor and 16 GB memory, but I want to use 4 core processor and 8 GB memory + 16 GB swapfile, is using swapfile can do the trick?

I already use hdparm to benchmark the ssd speed following this thread, but I can't find a good memory benchmark that have the same job.

Thanks in advance

chipz
  • 119

1 Answers1

1

Swap is not active memory, it helps since idle memory pages which were not used recently can be evicted/moved to swap so real memory can be used for tasks which are worked on more actively. So no, no matter how fast the swap file sub system is, or how big swap is you wont get any more memory on your system. Question you should try to figure out is how much memory your use case needs, and how you can optimize services used to use memory sparingly and wisely.

Hrvoje Špoljar
  • 5,162
  • 25
  • 42