I have MS Azure MySQL Flexible server running in Azure with 4vCPU and 32GB of RAM. It
It consumes all memory it gets and definitely is choking at lower configurations than 32GB, which seems to be an overkill for the use. Most of the workload is inserting/updating data.
I've tried to understand what exactly is using my memory and was playing with innodb_buffer_pool_sizeinnodb_buffer_pool_size assuming it is a problem but even at 32GB host and innodb_buffer_pool_sizeinnodb_buffer_pool_size = 6.5GB memory is quickly drained.
Basic memory troubleshooting guidelines does not give me a clear answer. I suspect tmp_tablestmp_tables but can't figure out how to determine where exactly is the rest of the memory allocated.
Microsoft Support is not helpful with telling me solutions or recommendations from documentation which does not work.
Here it is what the basic memory allocation check shows:
I tried most of the checks based on the other similar threads. I tried to reduce the size of the memory in host but with 16GB the system ran out of memory seen by missing metrics in Azure.
This is an Azure PaaS service, but I guess it runs on Linux, storage is provided as part of the service.
SELECT COUNT(*), sum(data_length), sum(index_length), sum(data_free) FROM information_schema.tables; | COUNT(*) | sum(data_length) | sum(index_length) | sum(data_free) |
|---|---|---|---|
| 668 | 106841464051 | 17000455168 | 776994816 |
SHOW GLOBAL STATUS; SHOW GLOBAL VARIABLES; SHOW FULL PROCESSLIST; Only my session now on process list
STATUS; SHOW ENGINE INNODB STATUS; 