Slow performance with little or no CPU / Disk I/O or memory pressure

I have HAOS running as a VM on Proxmox, on an AMD Ryzen 5 (4 core / 8 thread) host. The VM currently only has 2 cores assigned to it and 4 GB of RAM with a 32 GiB NVMe drive.

Everything used to be lightning quick but the slow down happened when upgrading to 2024.2 and has continues since then. There is virtually zero load on the VM or host and I can call the ‘recoder.purge’ service successfully and repack the 1 GB SQLite database in about 15 seconds:
image

The resulting impact on the host is barely discernible for the couple of seconds that it runs:

Accessing the UI via either browser from my PC or mobile device results in it pausing when selection certain dashboards that include statistics graphs. Entities however also sometimes take unusually long to respond, as long as 10s or more.

My understanding is that MariaDB may be quicker but generally most people have recommended against migrating and that SQLite should be performant enough.

How can I debug this? I have 15 per minute automations which don’t appear to be producing any kind of delay.