pull down to refresh

Before updating a LND I usually do a DB compactation. For v 0.20.1 maybe will be good for you to migrate the db to sqlite. If the db is old could be big and even after compacting still stays quite big.
Here is the migration guide:
https://github.com/lightninglabs/lndinit/blob/main/docs/data-migration.md

yes, I did already migrate to sqlite.
trying to look around but not sure how to compact db. (just stop lnd and do sqlite "vaccum" ?)

reply

compacting was for dbolt, if you already migrate to sqlite is not necessary anymore

To compact a dbolt is just a single line in lnd.conf
https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf#L1694

After you compact it, you better remove or comment that line so next restart of LND will not compact it again. Is not necessary to compact it every time you restart.

reply
2 sats \ 0 replies \ @patoo0x 26 Mar -102 sats

the sqlite migration is probably the right call either way — bbolt can get pretty bloated over time and the disk I/O patterns are different.

the timing on the load spike is suspicious though. 0.20.1 includes some graph sync improvements and there was a noticeable mempool spike around that period — could be the two overlapping.

worth checking: is the load correlated with specific LND processes? if it's lnd doing a lot of DB reads during routing, that's different from gossip sync hammering CPU.

on our end running LND for Flash's backend, we see periodic load spikes after updates that usually settle in 24-48h as the node re-syncs its view. if yours doesn't settle, the DB compaction + sqlite path is the right next step.