Using gzdeflate on serialized objects
Using gzdeflate( igbinary_serialize ( $object ))
seems to be extremely slow on large objects like the dashboard feeds. We probably shouldn’t do it.
n | min | p1 | p5 | median | mean | p95 | p99 | max | range | madev | stdev | |
Serialize times | 129 | 5.53 | 5.56 | 5.78 | 18.93 | 241.10 | 143.10 | 3,247.99 | 23,603.06 | 23,597.53 | 410.97 | 2,084.61 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Unserialize times | 190 | 2.34 | 2.36 | 2.47 | 7.18 | 13.61 | 62.91 | 98.62 | 125.56 | 123.21 | 11.57 | 18.78 |
Use on sites with shared hosting
On a couple of shared-hosting sites (low-end GoDaddy and low-end Greengeeks) we’ve seen some SQLite timeouts. From the statistics display, it looks like there are some extreme outliers in the times taken for various operations (lookup, save, delete). An extreme outlier is an operation that takes hundreds of milliseconds, where most operations take hundreds of microseconds.
To work around this, the latest version of the plugin changed the default timeout from 0.5sec to 5sec.
Use on a FreeBSD site
Something’s wrong on a site hosted on nearlyfreespeech.net. (They give each site its own FreeBSD jail.) Each SQLlite operation (lookup, save, etc) seems to take about 5 milliseconds. That’s obviously too long for the plugin to be useful.
Hammer on a product catalog page
I tested on an otherwise idle WooCommerce / Bookshop staging site with 1,350 products. A benchmark of product catalog page 75 out of 76 showed this number of pageviews per second, higher is better.
- 13.2 with no persistent object cache.
- 18.0 with this SQLite Object Cache (36% more than no cache).
- 15.0 with the Redis Object Cache running on localhost (25% more than no cache).
- 11.3 with the Redis Object Cache running on a dedicated machine (14% less than no cache).
These benchmarks were run on Ubuntu 22.10, WordPress 6.0.1, php 8.0.27, and SQLite 3.37.2, php-fpm 8.1, redis 6.0.16, and Apache 2.4.54. I used ab, the Apache HTTP Server Benchmarking Tool.
Benchmarking work is ongoing. If you run benchmarks please post the results in the support forum.
It’s surprising that using redis on its own dedicated machine slows things down rather than speeding them up. It’s possible I’m not measuring things correctly. And this is surely a distorted test workload. Again, benchmarking work is ongoing.
If you have benchmark results, or advice on better tests, please share them in a comment here or on the plugin’s support forum.