AWS RDS Aurora mysql Query Cache

The question:

AWS RDS mysql 5.7

Current Query Cache is by default enabled on Aurora mysql. (16GB query cache size, on 300GB of RAM). Am facing some deadlocks from Hangfire and it doesn’t show anything to having Query Cache locks.

There are 2 blog posts that seem contradictory on the Query Cache feature.

https://aws.amazon.com/blogs/database/best-practices-for-configuring-parameters-for-amazon-rds-for-mysql-part-1-parameters-related-to-performance/

https://aws.amazon.com/blogs/database/planning-and-optimizing-amazon-aurora-with-mysql-compatibility-for-consolidated-workloads/

One says enable Query Cache, the other says disable Query Cache. What is the official AWS stance on Query Cache? Is it better to just disable Query Cache in general RDS or not?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

One of those blog is about MySQL community edition and other is about Aurora MySQL. If configuring MySQL community edition, query cache should be disabled. On MySQL Aurora, it should be enabled.

Unlike MySQL community edition, where the query cache is being deprecated and disabled as of version 5.7.20, Aurora has a reworked query cache. This query cache doesn’t suffer from the limitations of the implementation in the community edition.

source


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment