Performance issue of PhpRedis::getMultiple

Created on 4 April 2023, about 2 years ago
Updated 2 June 2023, almost 2 years ago

Problem/Motivation

During profiling of the project, we found #Drupal\redis\Cache\PhpRedis::getMultiple function in Drupal causing slow page load times and high server resource usage. We noticed this issue in the new relic. Are there any suggested ways to improve the performance of Redis?

💬 Support request
Status

Fixed

Version

1.6

Component

Code

Created by

🇮🇳India sumit-k

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

Comments & Activities

  • Issue created by @sumit-k
  • Status changed to Fixed almost 2 years ago
  • 🇨🇭Switzerland berdir Switzerland

    Redis::getMultiple() shows up because it's called a lot and does external network requests. If you'd test with MySQL as cache backend, you'd likely see that time move over to MySQL.

    Check that you are using apcu to have Drupal use the in-memory cache for config and other frequently accessed bins. Check how many cache get requests you have, for which bins and from where. You might be able to optimize something with a static cache or similar.

    There's the new experimental relay integration that might be more efficient. See the README.Relay.md in the development snapshot (8.x-1.x-dev)

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024