[MySQL governor 1.0+]
MySQL Governor has multiple modes of operation. Some of them are experimental at this moment.
off -- Monitor Only: In this mode MySQL governor will not throttle customer's queries, instead it will let you monitor the MySQL usage to see the abusers at any given moment of time (and historically). This mode is good when you are just starting and want to see what is going on
single -- Single restricted's LVE for all restricted customers (deprecated): In that mode once customer reaches the limits specified in the MySQL governor, all customer's queries will be running inside LVE with id 3. This means that when you have 5 customers restricted at the same time, all queries for all those 5 customers will be sharing same LVE. The larger the number of restricted customers - the less resources per restricted customer will be available
abusers - Use LVE for a user to restrict queries (default mode): In that mode, once user goes over the limits specified in the MySQL governor, all customer's queries will execute inside that user's LVE. We believe this mode will help with the condition when the site is still fast, but MySQL is slow (restricted) for that user. If someone abuses MySQL, it will cause queries to share LVE with PHP processes, and PHP processes will also be throttled, causing less of a new queries being sent to MySQL. Requires dbuser-map file
all - Always run queries inside user's LVE: This way there are no need for separate limits for MySQL. Depending on overhead we see in the future, we might decide to use it as a primary way of operating MySQL Governor. The benefits of this approach is that limits are applied to both PHP & MySQL at the same time, all the time, preventing any spikes what so ever. Requires dbuser-map file
If dbuser-map file is absent on the server, "abusers" mode works emulate "single".
With single and abusers mode, once user is restricted, the queries for that user will be limited as long as user is using more than limits specified. After a minute that user is using less, we will unrestricted that user.
dbuser-map file is located at /etc/container/dbuser-map