3

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?

2
  • If you have a case where the QC is benefiting your app, start a new Question explain how it is being helpful. There may be a workaround.
    – Rick James
    May 22, 2023 at 19:01
  • It was the other way around, we were concerned that QC was affecting our app, but AWS was telling us to leave it.
    – Max
    May 26, 2023 at 2:42

2 Answers 2

3

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

1
  • cheers thanks for your response.
    – Max
    Jul 6, 2022 at 1:19
2

At time of writing this information is quite buried in AWS docs, but I think its worth noting that despite the fact they recommend leaving this setting on and point out that Aurora - AWS removed this functionality from Aurora MySQL 3:

The query cache is removed from community MySQL 8.0 and also from Aurora MySQL version 3.

source

So if you have any intent to upgrade to version 3, you face a major performance cliff if you do not optimise your application to avoid relying on this cache. Since this version is equivalent to MySQL 8 Community Edition, which offers a great many new features over 5.7, I am surprised AWS doesn't make this clearer.

1
  • thanks RubberDucky!
    – Max
    Apr 19, 2023 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.