Strategies for Monitoring MariaDB Users and Reducing RAM Usage

remics

Verified User
Joined
Aug 6, 2019
Messages
61
I am currently managing a server that utilizes MariaDB, and I've noticed that the database is consuming a significant amount of RAM. I'm seeking advice on tools and strategies to monitor which users are most actively using the database and to identify ways to optimize RAM usage.

What tools or plugins are recommended for monitoring user activity on MariaDB? I'm interested in understanding which users are making the most requests or running the most resource-intensive queries. I am also looking for suggestions on how to reduce the MariaDB server's RAM consumption. Are there specific settings or configurations within MariaDB or DirectAdmin that can be optimized to lower memory usage?

Thank you for your time and assistance.
 
Last edited:
maria/mysql by itself made to keep in RAM as much as possible because it fastest storage. So you can limit max memory consumption by limiting: max user connections, total buffers, monitor slow queries, make shorter timeouts - but all this will cause more often requests to disks and total mysql latency will grow up.
 
maria/mysql by itself made to keep in RAM as much as possible because it fastest storage. So you can limit max memory consumption by limiting: max user connections, total buffers, monitor slow queries, make shorter timeouts - but all this will cause more often requests to disks and total mysql latency will grow up.
I understand your point, but how can I know which users make the most requests to the database and therefore use the most RAM?
 
number requests != ram usage.
requests can be short, tables can be small.
you can limit frequency to see who makes most requests (who will reach limit).
but better - configure/monitor slow log
also you can just check mysql's "processlist"
 
There is a monitoring tool called Workbench
which you can download here
and connect via ssh to your server
and here is how to connect it to MariaDB

But i never used it and cannot tell if it will show you the users with the most usage.
 
Back
Top