Issues with low cache hit ratio in D9

Created on 9 December 2020, almost 4 years ago
Updated 7 October 2024, about 2 months ago

Hi,

I've been trying to figure this out for a while now with no success, so hopefully you can provide some valuable insights :)

Our platform uses GraphQL and Redis and since we upgraded do D9 our cache hit ratio went waaay down to 20% or less.

I've been trying to debug this and got to a point where I just issue a single graphql request over and over again to see what happens and use redis cli monitor to see what's going on.

As far as I can see (at least on this request) there are hundreds of these entries cachetags:config:field.* such as drupal.redis.9.0.9..ac9491ca4fcc64451a506c053106451111ecfa7173a07e39c42fecaf20db6167:cachetags:config:field.storage.taxonomy_term.field_content_type and so on. All of them return nil from Redis always. This means that in a request sending 900 calls to redis only 70 come back with something and the other 800+ are all cache tag ones like the ones above.

I dug a dig deeper and I can see those aren't called when using Database cache backend and upon closer inspection there seems to exist a checksum service doing this in the Redis module.

My question is, why would this always be returning null? This seems to be causing issues to my cache hit ratio (if this can be extrapolated to other requests).

Thanks!

💬 Support request
Status

Active

Version

4.0

Component

Code

Created by

🇦🇺Australia kyuubi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany IT-Cru Munich

    @kyuubi do you remember which drupal/graphql module version you used at this time?

    Maybe this issue is not related to 8.x-4.x-dev.

Production build 0.71.5 2024