lightning icon indicating copy to clipboard operation
lightning copied to clipboard

autoclean performance

Open michael1011 opened this issue 10 months ago • 9 comments

The autoclean-once command is really slow and uses a lot of memory. Especially the memory consumption is concerning and could become a serious problem for bigger nodes.

image

We are running a CLN node with Postgres database and after a month of operation, I wanted to clean failed forwards from the database, because that data isn't relevant for us.

I ran autoclean-once and that command did take > 1 hour to run and allocated quite a bit of memory that wasn't released after the command was done. Also, it seems like autoclean removes rows from the database either individually or in very small batches, which is not optimal for nodes running with a synchronous replication Postgres database.

michael1011 avatar Oct 04 '23 13:10 michael1011