Low memory utilization on VPS with enough RAM

ntk

Member
Jun 16, 2007
16
0
51
Hello,
I have a Centos 7.7 VPS (kvm virtualization), WHM v82.0.16 with 58 GB RAM, 10 cores and good disk speed.
There are about 150 Cpanel accounts on that server - half of them with Wordpress.
The load of the server is floating between 1 and 4 with average of 2.
/proc/sys/vm/swappiness is 1
mysqladmin status
Uptime: 1323221 Threads: 29 Questions: 1279971013 Slow queries: 2219 Opens: 3063496 Flush tables: 1 Open tables: 15000 Queries per second avg: 1259.711
The mariadb 10.3 server is tuned with mysqltuner and few other tricks.

My concerns is that the memory is not used (and wasted). "free -h" command gives:
total used free shared buff/cache available
Mem: 58G 10G 41G 3.9G 6.6G 43G
Swap: 8.0G 478M 7.5G

How I can tell to WHM/Cpanel and daemons to use more memory/caches and in this way to speed my server and decrease CPU usage?
Any idea why more than 40 GB of the memory is not used?
When I had a hardware server with the same set of accounts and 32GB of RAM and 16 GB swap - those resources are fully used and were not enough.
Now with the VPS I have plenty of RAM but unused.
I read a lot of guides how to decrease the memory usage, but could not find anything, about how to utilize the resources that are wasted (im my case memory).

Regards
ntk
 
Last edited:

LucasRolff

Well-Known Member
May 27, 2013
128
74
28
cPanel Access Level
Root Administrator
Hi @ntk

> There are about 150 Cpanel accounts on that server - half of them with Wordpress.

Those 150 accounts, how much disk space do they take? In general, how much disk space does your server use?

> How I can tell to WHM/Cpanel and daemons to use more memory/caches

You don't - Linux will fill up the cache as needed, and free up the cache as needed. If there's not enough content to cache (or no reason to cache it) then the OS won't do it.

Things will only go into cache if they've been read at least once, so if you're only using 6.6GB of buff/cache, that means the amount of files that actually ever get accessed are relatively low.

If you want to use more cache - put more data on your server that is getting accessed.

> and in this way to speed my server and decrease CPU usage?

You have 10 cores - load between 1 and 4, with an average of 2.

There's no need to really decrease CPU usage.

> When I had a hardware server with the same set of accounts and 32GB of RAM and 16 GB swap - those resources are fully used and were not enough.

Likely configurations differ between the systems - maybe your old server was configured incorrectly, e.g. it could be configured in such a way that MySQL would simply eat memory for no reason.
 

ntk

Member
Jun 16, 2007
16
0
51
Hi LucasRolff,
Thank you for clarification for the cache.
The /home consume about 500 GB and I have about 700 GB free on that partition.
/var/lib/mysql consume 9.3 GB with about 660 databases.
You are probably right about my old hardware server - the mysql version was 5.5 and now it is MariaDB 10.3. Probably the new version is a bit better on memory usage.
The strange thing is that in munin statistics the old mysql was with up to 5 threads/connections, but now I see up to 75 threads/connections with average 35 on weekly basis.

regards
ntk