I'm running a Kubernetes Cluster with MariaDB
10.3.20 and Vitess 6. Everything is running fine, but the memory usage in the
Master nodes is always around 90%. I don't have OOM right now, but I was keen to understand this high memory usage.
Currently, each node (master and replica) has the same configuration of 10GB RAM and 10 CPU cores. The MariaDB configurations, for now, are the default ones (
innodb_buffer_pool_size has 128MB, I will try to update to 70% of the node memory), except for the number of
max_connections which is set to
The data inside database is bellow 1GB and 5 tables.
SELECT peak is around 700 queries per seconds,
INSERT peak is around 200 QPS and
UPDATE 100 QPS.
Masters are receiving only writes (
DELETE) and replicas are receiving only reads (
Below are two charts for memory usage (the top ones are masters, the ones at the bottom are replicas).
The master's memory does an interesting "pattern" every week, not sure why.
I've tried to understand this behavior, reading MariaDB Memory Allocation, but couldn't anything that could explain this.