Persistent object cache read very slow
-
The metric Persistent object cache read is showing as very slow when I run my tests. There shouldn’t be any issues with the object cache. All tests I’ve performed outside of the benchmark tool shows a very fast response. I can’t seem to figure out the reason for the discrepancy.

-
A couple more notes:
- Using Redis Object Cache from Till KrΓΌss
- Redis via Unix socket on the same server
Can you try again with latest version – I had one “feature” that was giving tooo much overhead…
Thanks for the reply.
This is with version 1.6.4, PHP 8.4, Redis Object Cache 2.6.5.
well the performance of OC depends a lot on three things – plugin, its logic and underlying storage technology. If you try with “Docket cache” – you might get better results, just because of the way it works. But for heavy and busy sites – I would trust Redis way way way more. But I could not make tests run fast with it (i did try). So.. I personally dislike OC thing.. I haven’t seen huge improvement. And if anyone can prove me wrong – I am very open!:)
I am running into a similar issue, so I would like to be sure if there are improvements on my custom performance server (nginx, php-fpm and mariadb compiled from source with optimization flags), it’s simply a bug on the benchmark side or a limitation in my actual setup.
Currently testing on PHP 8.3.26 and Redis Server 8.2.2. These are some reports:
- Redis (Predis) benchmark: https://report.wpbenchmark.io/2gRxjVflyE/
- Redis (PHP-Redis) benchmark: https://report.wpbenchmark.io/I1UcQujLg7/
- Docket Cache benchmark: https://report.wpbenchmark.io/tRBXbYpbRG/
I might add, the site is meant for testing and I can tell using Redis have improved the already fast generation of the pages.
Might be relevant to point some Redis plugin constants:
define(‘WP_REDIS_CLIENT’, ‘phpredis’);
define(‘WP_REDIS_PREFIX’, ‘XXX25’);
define(‘WP_REDIS_DATABASE’, 2 );
define(‘WP_REDIS_SCHEME’, ‘unix’ );
define(‘WP_REDIS_PATH’, ‘/tmp/redis.sock’ );
Also worth mentioning, OPCACHE and OPCACHE.JIT are enabled and configured.-
This reply was modified 8 months ago by
Dade.
Same here.
I just got a new 4005 server and everthing is almost at 10/10, expect for object cache read which is at 5/10.How is it measured? What’s the point of reference of 10/10?
Object Cache scoring has been changed.. it is impossible to do trusted testing.. So β if you have OC β then you will get high score. Object Caching heavily depends on caching plugin. Some “in memory” object cache plugins will always be fast..
Thanks for taking a look into it Anton.
I have just tesed, with the following report: https://report.wpbenchmark.io/plHYnBPlke/
While obviously I am happy with the score, I might ask a few questions.
If I understand correctly, you just raised the threshold for test “Persistent object cache read”, is that right? If so, my main concern was the OC reads at 4,2s, do you currently consider this stat also not reliable?
Thanks for taking care of this tool, it’s always good to fine-tune Dedicated Servers or VPS meant to server WordPress
Dade, may I ask what OC plugin you used to get 10/10 for object cache read?
Thank you
Alex@dade88 – well, might set less interactions later.. There’s a huge difference in OC plugins. Take “Docket cache” – and it will be super fast. But it is using filesystem to store cache and during operations – holds it in memory. While Redis-plugin – will actually do connect to Redis server and do separate calls. Of course it will be slower, but in terms of reliability on busy sites – I would trust Redis more. And that’s the reason, why I don’t thinks OC tests are very reliable. π
@antonaleksandrov Actually reading your message I am wondering how a Docket Cache in RAM disk would compare to Redis plugins, if I have some (unlikely) spare time I will test and share the results. I was particularly intrigued by the results because they were essentially the same when using PHPRedis instead of Predis, but also when using Docket Cache itself
@wav3front Redis Object Cache by Till Kruss (I was lazy to try other Redis plugin by Pantheon). Also consider there has been a lot of tuning on the dedicated server itself.
The topic ‘Persistent object cache read very slow’ is closed to new replies.