Skip to content

Commit 5d71e37

Browse files
authored
TCR-839: Expand information on setting Governor limits
1 parent 42c4ec2 commit 5d71e37

File tree

1 file changed

+56
-1
lines changed
  • docs/cloudlinuxos/cloudlinux_os_components

1 file changed

+56
-1
lines changed

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3651,14 +3651,69 @@ MySQL Governor allows setting the burstable limits for accounts. To provide that
36513651
* `long` on the contrary, should not be more than the LVE limit
36523652
* setting the `middle` and `long` limits less than the LVE limit prevents abuse of other processes in the account (Apache, PHP) by MySQL
36533653
3654+
**Coefficients for calculating limits**
3655+
3656+
MySQL Governor limits should be calculated based on the corresponding LVE limits using the following coefficients:
3657+
3658+
*CPU limits:*
3659+
3660+
| Limit level | Formula | Description |
3661+
|---|---|---|
3662+
| `current` | `LVE_CPUSPEED + 1` | Slightly above the LVE CPU limit to avoid bottlenecks |
3663+
| `short` | `LVE_CPUSPEED × 0.95` | Short-term burst allowance |
3664+
| `middle` | `LVE_CPUSPEED × 0.87` | Medium-term average |
3665+
| `long` | `LVE_CPUSPEED × 0.75` | Long-term sustained maximum |
3666+
3667+
*IO limits:*
3668+
3669+
| Limit level | Formula | Description |
3670+
|---|---|---|
3671+
| `current` | `LVE_IO + 1` | Slightly above the LVE IO limit |
3672+
| `short` | `LVE_IO × 0.83` | Short-term burst allowance |
3673+
| `middle` | `LVE_IO × 0.76` | Medium-term average |
3674+
| `long` | `LVE_IO × 0.59` | Long-term sustained maximum |
3675+
3676+
**How IO limits are calculated**
3677+
3678+
:::warning Important
3679+
The MySQL IO value tracked by MySQL Governor is the **combined total of read and write operations**. For example, if a user's LVE IO limit is 100 MB/s, the corresponding MySQL IO total is 200 MB/s (100 MB/s read + 100 MB/s write).
3680+
:::
3681+
3682+
In the MySQL Governor configuration (`/etc/container/mysql-governor.xml`), the `read` and `write` limits are specified separately. The coefficients above are applied to each limit individually.
3683+
36543684
**Example of choosing MySQL Governor limits**
36553685
3656-
* With the default LVE SPEED limit is `100`, the possible values of the MySQL Governor CPU limits can be 100/95/87/75. I.e., we admit the short-term exceeding of the limits for processing SQL requests.
3686+
* With the default LVE SPEED limit of `100`, the corresponding MySQL Governor CPU limits are `101/95/87/75` (applying the coefficients above). We admit the short-term exceeding of the limits for processing SQL requests.
36573687
* If you face spike CPU consumption with these limits, it is recommended to reduce the excess of the `current` and `short` limits over the LVE limit. For example, to the values 150/110/100/90.
36583688
* If the average level of CPU consumption is too high, then it is recommended to reduce the `middle` and `long` limits, too. For example, to the values 150/100/80/50.
36593689
* Then MySQL processes will fall into LVE and be limited by LVE limits more often.
36603690
* The same clues are applicable to the IO limits – the `current` and `short` IO limits for MySQL Governor can exceed IO LVE limits, but the `middle` and `long` cannot.
36613691
3692+
**Configuration example**
3693+
3694+
For a user with a 400% LVE CPU (SPEED) limit and a 100 MB/s LVE IO limit, the MySQL Governor limits would be configured as follows:
3695+
3696+
<div class="notranslate">
3697+
3698+
```
3699+
<user name="USERNAME" mode="restrict">
3700+
<limit name="cpu" current="400" short="380" mid="348" long="300"/>
3701+
<limit name="read" current="104857600" short="87031808" mid="79691776" long="61865984"/>
3702+
<limit name="write" current="104857600" short="87031808" mid="79691776" long="61865984"/>
3703+
</user>
3704+
```
3705+
</div>
3706+
3707+
You can verify the applied limits using `dbctl list`:
3708+
3709+
<div class="notranslate">
3710+
3711+
```
3712+
[root@server ~]# dbctl list
3713+
user cpu(%) read(MB/s) write(MB/s)
3714+
USERNAME 400/380/348/300 100/83/76/59 100/83/76/59
3715+
```
3716+
</div>
36623717
36633718
#### Starting and stopping
36643719

0 commit comments

Comments
 (0)