We know that using swap space instead of RAM can severely slow down the performance of Linux. So then, one might ask, since I have more than enough RAM available, wouldn't it better to remove swap space completely?
The short answer is, No. There are performance benefits when swap is enabled, even when you have more than enough RAM.
Read the full thing at https://haydenjames.io/linux-performance-almost-always-add-swap-space/