-
Notifications
You must be signed in to change notification settings - Fork 72
Description
I have been encoutering high lock wait time for the cache write query INSERT INTO "solid_cache_entries" ...
randomly. These spikes don't correlate with a surge in traffic or anything. Is there a way for me to investigate more into this and how can I improve the situation?
I have tried using UNLOGGED TABLE
as suggested here, which improved cache write perforamnce but it still didn't help.
For context the cache read query SELECT "solid_cache_entries"."key", "solid_cache_entries"."value" FROM "solid_cache_entries" WHERE "solid_cache_entries"."key_hash" IN ($1)
is run ~7700 times/s and the cache write query INSERT INTO "solid_cache_entries" ... ON CONLICT ...
is run ~550 times/s, our database server CPU usage is only ~16% when the high lock waiting time happened.