[MXS-4900] maxctrl show qc_cache can easily overwhelm MaxScale Created: 2023-12-14 Updated: 2023-12-28 Resolved: 2023-12-28 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | QueryClassifier, REST-API |
| Affects Version/s: | 6.4.13, 22.08.11, 23.02.8, 23.08.4 |
| Fix Version/s: | 6.4.14, 22.08.12, 23.02.9, 23.08.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | MXS-SPRINT-198 | ||||||||
| Description |
|
The maxctrl show qc_cache is a slightly dangerous command to run in production as it causes the whole cached to be copied into memory multiple times. The peak memory usage will be more than three times the configured cache size and with the default cache size, this amounts to 45% of the total system memory. A non-default value that exceeds 30% of the system memory is almost guaranteed to cause an OOM scenario. A better alternative for dumping the whole cache is described in MXS-4899 but the REST-API endpoint that the maxctrl command calls should limit the number of entries to some predetermined size. |
| Comments |
| Comment by markus makela [ 2023-12-28 ] |
|
The maxctrl show qc_cache now, by default, limits the output to the top 20 highest used cache entries. The new --top option for the command allows the number of entries to be changed. |