Wed, 2014-08-20 11:47anatoliydimitrov
With MariaDB, as with any service, you must monitor user resource usage to ensure optimal performance. MariaDB provides detailed statistics for resource usage on per-user basis that you can use for database service monitoring and optimization. User statistics are especially useful in shared environments to prevent a single gluttonous user from causing server-wide performance deterioration. If you detect abnormal use, you can apply fine-grained limits, as we'll see.
To enable user statistics in MariaDB, edit the server
configuration file /etc/my.cnf.d/server.cnf. In the
[mysqld] section, add userstat = 1,
then restart the service.
Now MariaDB will gather and store usage statistics in the table USER_STATISTICS in the database information_schema. USER_STATISTICS uses the Memory engine and does not preserve information upon service restarts, so statistics are …
[Read more]