@tomer628
The report of memory usage is not a problem, it is quite normal: some part of memory used is in cache.
Note that the command line tool "free" gives similar, but more "easy to understand" output. Just run "free -m" from the command line and you will see.
The fact that your swap is inactive is not something to worry about.
However, swap can be used to offload temporary memory overusage, since swap is essentially a disk based memory file.
You can create a swap file by running the following commands (in chronological order):
1) fallocate -l 4G /swapfile
Important: you are running a VPS, if I am not mistaken. It can be the case that some swap is already present, but not identified by Plesk. Run commands "swapon -s" and "free -m" to verify that swap is indeed absent. If the swap is present, do
not create a new swap.
Note: this will create a 4G swapfile with the name swapfile, in the root directory.
Note: you first want to check where the most disk space is available. If I am not mistaken, this is on the /dev/vda1 device, that should be mounted on /
2) chmod 600 /swapfile
3) mkswap /swapfile
4) swapon /swapfile
Note: you can check the activation of the swapfile by running the command "swapon -s" or "free -m"
Note: the swap created is not yet persistent across reboots, so follow step 5.
5) edit the /etc/fstab file and add the line:
/swapfile none swap sw 0 0
preferably at the bottom of the /etc/fstab file.
6) Tweak swap settings: edit /etc/sysctl.conf to contain
- vm.swappiness = 10 (or a similar low value: a lower value implies that less data is put in swap, which is often a good thing when having a VPS).
- vm.vfs_cache_pressure = 70 (a lower value implies that , in essence, "access data" is cached more. This setting is optional.)
and add them to the bottom of the /etc/sysctl.conf file.
Note: swap settings can be tweaked with a trail-and-error approach. The default settings are often good enough, but tweaking some settings can be valuable, with the disadvantage that one has to check performance in order to establish whether the tweaked settings are good enough. It can even be the case that the tweaking works counterproductive.
Hope the above helps!
Regards