Page 1 of 1

RAM usage of myVesta services

Posted: Sat Jul 25, 2020 8:38 pm
by myVesta
Let's say we have VPS with 2GB RAM.

Code: Select all

root@test:~# free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       329Mi       944Mi        21Mi       673Mi       1.4Gi
So, we see here 2GB RAM

First, in order to measure myVesta RAM usage, we turned off system nginx and system php-fpm, so they are not in RAM.

Now let's see myvesta-nginx percent of RAM usages:

Code: Select all

root@test:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep nginx
693 0.0 nginx:
695 0.0 nginx:
Both processes are under 0.1% of RAM, so in worst scenario it uses 4 MB of RAM, and probably less.

Now let's see myvesta-php-fpm percent of RAM usages:

Code: Select all

root@test:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep fpm
705 0.4 php-fpm:
706 0.4 php-fpm:
703 0.2 php-fpm:
Sum is 1%, which is 20 MB of RAM.

So, there is very little overhead.

Anyway, you can turn-off both myvesta-nginx and myvesta-php-fpm once you setup hosting enviroment, so there will not be overhead at all.

Re: RAM usage of myVesta services

Posted: Wed Sep 23, 2020 7:07 pm
by hekate
Hello, after a fresh install with debian 10 using a vps of 2Gb of RAM, the use of RAM is higher.

Code: Select all

root@cp:~# free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       1.4Gi       185Mi        12Mi       339Mi       372Mi
Swap:            0B          0B          0B

root@cp:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep nginx
5812 0.3 nginx:
697 0.2 nginx:
5813 0.1 nginx:
5811 0.0 nginx:
695 0.0 nginx:


root@cp:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep fpm
2687 0.9 php-fpm:
719 0.5 php-fpm:
720 0.5 php-fpm:
713 0.3 php-fpm:

Re: RAM usage of myVesta services

Posted: Thu Sep 24, 2020 3:13 pm
by myVesta
Because you measured myvesta php-fpm + standard php-fpm + myvesta nginx + standard nginx.
I measured only myvesta php-fpm + myvesta nginx, because that is a topic here, to see PANEL usage, not usage of other services.

Also, keep in mind that ClamAV should be stoped on VM with less than 4GB RAM, because ClamAV holds 1GB of RAM, which is half of RAM if you have only 2GB of RAM.

Re: RAM usage of myVesta services

Posted: Sat Sep 26, 2020 4:47 am
by hekate
You're right I forget about it. After disable ClamAV all is right.
Thanks for your reply.

Re: RAM usage of myVesta services

Posted: Sat Sep 26, 2020 12:29 pm
by myVesta
Good way to see what is holding your RAM:

Code: Select all

ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20
Output will come as 3 columns that means:

Code: Select all

PID | percent of used RAM | process name

Re: RAM usage of myVesta services

Posted: Sat Sep 26, 2020 12:34 pm
by myVesta
Anyway, to see how much myVesta nginx+php-fpm uses RAM, first stop distribution's nginx and php-fpm:

Code: Select all

systemctl --full --type service --all | grep "php...-fpm" | awk '{print $1}' | xargs systemctl stop
systemctl stop nginx
Now only myVesta nginx and php-fpm are active, and you can do measurements from the first post.

After that, bring back distribution's nginx and php-fpm:

Code: Select all

systemctl --full --type service --all | grep "php...-fpm" | awk '{print $1}' | xargs systemctl start
systemctl start nginx