• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Alerting Swap

Oscar

New Pleskian
Good morning, I have a VPS server on which I have recently updated to Plesk Obsidian. Since I updated I receive alerts from Swap memory. I have seen that the amount of Swap memory of the server is 128MB and it seems somewhat low, but the hosting provider says that on VPS servers it cannot be expanded and it gives me the option to Disable Swap, but I am not sure that this is the best choice. What do you think?

I attach files with the images of the alerts.

swap1.JPG swap2.JPG

Server Features:
----------------------
SO‪: Ubuntu 16.04.6 LTS
‬Producto: Plesk Obsidian (Versión 18.0.20 Actualización #1, última actualización el 31/Oct/2019 01:55)
Memory: 16 GB (only 2GB used)
Hard Disc: 200GB
 
Besides, "...but the hosting provider says that on VPS servers it cannot be expanded..." is more or less a complete nonsense. Do you have root access to your VPS?
 
Same problem after update to Obsidian.
But I use a dedicated server with 32GB of RAM and 1GB of swap

Any recommendation?
upload_2019-11-13_7-25-44.png
 
Besides, "...but the hosting provider says that on VPS servers it cannot be expanded..." is more or less a complete nonsense. Do you have root access to your VPS?

Good morning Ales, yes, I have root access to the VPS.

The option proposed to me by the hosting provider would be to switch to a "SLM management mode" without Swap. Do you think that not having Swap memory can influence the performance of the server?
 
Root access enables you to change the swap settings without involving the provider.

I'd opt for having a bigger swap, not for trying to run a server completely without it, while at the same time keeping the swappiness setting close to 0. Try using a 1 GB swap file and see how it goes.
 
You can always add more swap space. No need to fiddle with the partitions.. You can add more swap as a file.. I recommend at least as much as your RAM.
 
We are having the same problem here: Since upgrading from Plesk Onyx to Plesk Obsidian the swap usage is running full. We are having a server with 16GB and 1GB swap. In the terminal the free command shows the problem:

root@our-server:~# free -hw
total used free shared buffers cache available
Mem: 16G 2.3G 0B 1.4G 0B 13G 13G
Swap: 1.0G 1.0G 20M

Before the Obsidian update there was no swap memory used at all (at least for the last 7 days).
It seems that the cache memory runs full and then swap memory is used for cache memory. May be this is rather a Ubuntu problem - we are using Ubuntu 16.04.06 (all actual software updates installed).
Adding more swap space doesn't seem like a good advice to me – the problem seems to be something like this: Why is the cache in my memory always full?
 
There is a nasty problem with ProFTPD that causes the server to run out of memory..
It happened to one of ours a week ago.. Tweaking the configs and adding the maximum memory config settings in proftpd.conf cured the problem.
 
@tkalfaoglu Thanks for your reply! I just restarted the ProFTPD as described in How to start or stop FTP service on a Plesk server (using service xinetd restart on Ubuntu) – and expected the memory usage to disappear, if ProFTPD should really be the reason for this behaviour (correct me, if this assumption is wrong). But it didn't free any memory at all – there is still 13G/16G cache memory and all swap memory used. So I guess ProFTPD is not the reason, is it?
 
Last edited:
Check for huge log files. If you have some, perhaps they are being used by Plesk somehow and eating your memory. Also, check how much of memory is available to swap.

"In general, I recommend 1-2x the available system RAM. So, if you have a 512mb droplet, use 512mb-1gb swap. If you have a 1gb droplet use 1gb-2gb swap, etc. This is not a hard and fast rule, for example if you have a 4gb droplet it may be best to use little (512mb) or no swap at all."

Source: How To Configure Virtual Memory (Swap File) on a VPS | DigitalOcean
 
Back
Top