MySQL Governor

Navigation:  »No topics above this level«

MySQL Governor

Previous pageReturn to chapter overviewNext page

]MySQL Governor 0.8-32+]


MySQL governor is software to monitor and restrict MySQL usage in shared hosting environment. The monitoring is done via resource usage statistics per each MySQL thread.


MySQL governor can also kill off slow SELECT queries.


MySQL Governor has multiple modes of operations, depending on the configuration. It can work in monitor only mode, or it can use different throttling scenarious.


MySQL Governor allows to restrict customers who use too much resources. It supports following limits:




CPU speed relative to one core. 150% would mean one and a half cores



bytes read. Cached reads are not counted, only those that were actually read from disk will be counted



bytes written. Cached writes are not counted, only once data is written to disk, it is counted


You can set different limits for different periods: current, short, med, long. By default those periods are defined as 1 second, 5 seconds, 1 minute and 5 minutes. They can be re-defined using configuration file. The idea is to use larger acceptable values for shorter periods. Like you could allow a customer to use two cores (200%) for one second, but only 1 core (on average) for 1 minute, and only 70% within 5 minutes. That would make sure that customer can burst for short periods of time.


When customer is restricted, the customer will be placed into special LVE with ID 3. All restricted customers will be placed into that LVE, and you can control amount of resources available to restricted customers. Restricted customers will also be limited to only 30 concurrent connections. This is done so they wouldn't use up all the MySQL connections to the server.