Issue
Often the limits for LVE and DB Governor are set incorrectly while it's an important step to lower server load and restrict users.
Solution
General principles of choosing the limits:
-
current
andshort
can be more than the LVE limit and should not be less - setting the
current
andshort
limits more than the LVE limit prevents bottlenecks in SQL request processing -
middle
limit can be more or less that the LVE limit -
long
on the contrary, should not be more than the LVE limit - setting the
middle
andlong
limits less than the LVE limit prevent abuse of other processes in the account (Apache, PHP) by MySQL
Example of choosing MySQL Governor limits
- With the default LVE SPEED limit is
100
, the possible values of the MySQL Governor CPU limits can be 250/150/110/90. I.e., we admit the short-term exceeding of the limits for processing SQL requests. - If you face spike CPU consumption with these limits, it is recommended to reduce the excess of the
current
andshort
limits over the LVE limit. For example, to the values 150/110/100/90. - If the average level of CPU consumption is too high, then it is recommended to reduce the
middle
andlong
limits, too. For example, to the values 150/100/80/50. - Then MySQL processes will fall into LVE and be limited by LVE limits more often.
- The same clues are applicable to the IO limits – the
current
andshort
IO limits for MySQL Governor can exceed IO LVE limits, but themiddle
andlong
cannot.
It should be set with this way:
current=LVE_CPUSPEED*2.5
short=LVE_CPUSPEED*1.5
middle=LVE_CPUSPEED*1.1
long=LVE_CPUSPEED*0.9
Useful links
https://docs.cloudlinux.com/cloudlinux_os_components/#mysql-governor-limits
Comments
0 comments
Please sign in to leave a comment.