RAM usage of myVesta services

Post Reply
User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
RAM usage of myVesta services

Post by dpeca »

Let's say we have VPS with 2GB RAM.

Code: Select all

[email protected]:~# 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

[email protected]:~# 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

[email protected]:~# 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.

Tags:

hekate
Posts: 4
Joined: Wed Sep 23, 2020 6:59 pm
Re: RAM usage of myVesta services

Post 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

[email protected]:~# free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       1.4Gi       185Mi        12Mi       339Mi       372Mi
Swap:            0B          0B          0B

[email protected]:~# 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:


[email protected]:~# 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:
Last edited by hekate on Wed Sep 23, 2020 8:20 pm, edited 3 times in total.

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: RAM usage of myVesta services

Post by dpeca »

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.

hekate
Posts: 4
Joined: Wed Sep 23, 2020 6:59 pm
Re: RAM usage of myVesta services

Post by hekate »

You're right I forget about it. After disable ClamAV all is right.
Thanks for your reply.

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: RAM usage of myVesta services

Post by dpeca »

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

User avatar
dpeca
Site Admin
Posts: 239
Joined: Fri Jun 19, 2020 9:59 am
Re: RAM usage of myVesta services

Post by dpeca »

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


Post Reply