Inconsistent performance on pagespeed
I have a site in production which is having heavy oscillation in performance seemingly at random.
For example here is a scan with extremely good performance
https://pagespeed.web.dev/analysis/https-codicerisparmio-it/k5gancc7ra?form_factor=mobile
and a scan fresh of this morning
https://pagespeed.web.dev/analysis/https-codicerisparmio-it/xl21vfq5ik?form_factor=mobile
I tried practically everything: caching aggressively through redis, changing settings in cloudflare, tweaking mariadb config, optimizing the js and css and while this helped swinging the score toward the upper limit it still swings down heavily toward 60 at random. I ran various profilers but all I could gather was that the problem isn't the db since the queries are executed extremely fast.

2 Replies
Could it be session garbage collection?
https://tideways.com/profiler/blog/php-session-garbage-collection-the-unknown-performance-bottleneck
benjamin
Tideways
PHP Session Garbage Collection: The unknown performance bottleneck
Here is one performance setting in your PHP configuration you probably haven't thought about much before: How often does PHP perform random garbage collection of outdated session data in your application? Did you know that because of the shared nothing architecture PHP randomly cleans old session data whenever session_start() is called? An opera...
I will try and let you know
Doesn't seem to affect redis at all.