Skip Navigation
Lemmy Support @lemmy.ml

Postgres using a lot of CPU since update

EDIT: It seems to have been fixed thanks to @graycube@lemmy.world. Running analyze verbose; in postgres.

After updating to 0.19.5 from 0.19.3 my postgres is often using up 500%+ of CPU according to docker stats and often going to 100% CPU on most cores according to htop. Also noticed in the uptime monitor:

htop shows one of the 5 postgres processes constantly on UPDATE. I think this might be part of the problem.

I'm not comfortable with postgres and am honestly completely in the dark how or where to mitigate or even pinpoint this issue.

Any help would be appreciated.

20 comments
  • Do you have any tweaks of pg settings? Eg. shm mem, shared_buffers etc. ?

    If not you migh want to: https://pgtune.leopard.in.ua/

    • I have. And I tried to tweak it with no avail. But it was working within acceptable levels before the update.

      • hmm, how many connections are used SELECT count(*) FROM pg_stat_activity; ?
        I am not a master postgres admin but my intuition has been that the amount of connections is a big factor in how pg behaves with cpu and mem.

20 comments