2

What is the downside for running a Postgres database without a swap file? This database resides on an AWS EC2 machine with 122 GB memory.

J.M.
  • 21
  • 2

2 Answers2

2

That depends on the OS that this VM runs. For instance, Solaris requires swap file, because swap in Solaris is an integral part of the it's virtual memory stack. I'd say that FreeBSD also fits better in swap-enabled configurations, but tweaking can eliminate this. Linux, on the other hand, doesn't require swap out-of-the-box.

drookie
  • 8,051
  • 1
  • 17
  • 27
1

Just to avoid any worst case scenario, you can add swapfile and set swappiness to a small value. (vm.swappiness = 10). So the system won't swap unless the memory utilization is reached up to 90%.

Anto
  • 139
  • 6