Swapfile for the OLS or not

ltynk

New Member
#1
When install OLS on the Ubuntu swap on the OS level is not configured. I know that OLS is doing lot of stuff to limit RAM usage and has configured own swap folder. Do you setup swapfile or it's fine to leave OS without one? Cyberpanel is configuring swapfile, but what about pure OLS. Thanks
 

Pong

Administrator
#2
OLS will configure the swap file folder at /tmp/lshttpd/swap by default, you can change it from OLS configuration settings
 

ltynk

New Member
#3
It's configured. But I'm talking about swapfile at OS level, which would be visible in htop for example. But I guess it doesn't provide any extra benefit with OLS.
 

Pong

Administrator
#4
Swap file to RAM is on system level and should be good pratice to setup one, but this is not for OLS, it will apply to all applications.
 
#5
I dont recommend swapfiles for servers, just get 20% more ram than you need. Its really simple why, Nvme / SSD and physical disks have such poor read speeds for web ops. Besides if you are swapping - its almost always the case that you dont have enough memory. If you have a rogue process or just get hammered - the swapfile will get completely used and the OOM will kill the process anyway (and at this stage any wordpress or database app is not going to be usable anyway).

Make use of memory by looking at your database sizing, you want your whole database to be held in memory all of the time. Tune your innodb_buffer_pool_size to some amount of memory you can fit and that is bigger than your database. Check after a few days how the buffer pool is being used, and then resize it down. You want good utilization without hitting 100% and not wasting memory by sitting at 90% unused.
 
Top