[MXS-2778] Memory leak Created: 2019-11-22 Updated: 2019-12-31 Resolved: 2019-12-31 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Viktor Soroka | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Hetnzer EX42-NVMe bare-metal servers, Ubuntu 18.04.3 LTS, docker 19.03.4~3-0~ubuntu-bionic |
||
| Attachments: |
|
| Description |
|
I have two maxscale 2.4.4 instances, both was started at the same time, both are getting the same amount of traffic (load balancing), and the memory consumption differs more than twice and is slowly growing. maxscale instances connected to galera cluster 10.3.18-MariaDB-1:10.3.18+maria~bionic-log Config:
|
| Comments |
| Comment by Viktor Soroka [ 2019-11-23 ] | ||||
| Comment by Johan Wikman [ 2019-11-27 ] | ||||
|
crocodylus Do you mean by both are getting the same amount of traffic (load balancing), and the memory consumption differs more than twice and is slowly growing that the memory consumption of one of the instances is twice that of the other, or that the memory consumption of both has doubled since they were started? | ||||
| Comment by Viktor Soroka [ 2019-11-27 ] | ||||
|
I have added fresh screenshots. For the first instance the memory consumption is 77Mb->95Mb->113Mb, for the second one is 135Mb-152Mb->170Mb. | ||||
| Comment by Johan Wikman [ 2019-11-27 ] | ||||
|
From the MaxScale log, what does the line
say? Note that the amount is only what could be used, not what is used. Please execute
What kind of numbers do you have for QC cache size? | ||||
| Comment by Viktor Soroka [ 2019-11-27 ] | ||||
|
first node: 2019-11-19 22:25:24 notice : Using up to 9.40GiB of memory for query classifier cache Id 0 Id 1 Id 2 Id 3 second node: 2019-11-19 22:25:24 notice : Using up to 9.41GiB of memory for query classifier cache Id 0 Id 1 Id 2 Id 3 | ||||
| Comment by Johan Wikman [ 2019-11-27 ] | ||||
|
Ok, so it seems that in the case of the first node, the Query Classifier Cache uses in total (across all threads) some 60MB of memory and in the case of the second node, some 120MB of memory. The number of unique canonical statements differ also significantly; in the case of the first node there are some 18-thousand and in the case of the second node there are some 25-thousand. For instance, the unique statements
correspond all to the one canonical statement
| ||||
| Comment by Johan Wikman [ 2019-11-27 ] | ||||
|
You can put a cap on the amount of memory used for the query classifier cache as explained here: https://mariadb.com/kb/en/mariadb-maxscale-24-mariadb-maxscale-configuration-guide/#query_classifier_cache_size | ||||
| Comment by markus makela [ 2019-12-02 ] | ||||
|
If the memory growth doesn't stop even when the query_classifier_cache_size is set to a lower value (e.g. 100MB), please let us know. | ||||
| Comment by markus makela [ 2019-12-31 ] | ||||
|
Closing as Cannot Reproduce. |