-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug]: LND consumes a lot of RAM #7785
Comments
Fixed by #7767 |
I have this error after upgrading from v0.15.5 to v0.16.3:
Usually, my lnd utilizes 500MB of 2GB @Roasbeef I wonder if the latest fix addresses this issue too? Basically, was it introduced in 0.16.x ? |
Closing as the regression is fixed in #7767 which was merged. @begetan in later versions, in order to protect from certain mempool related attacks (attacker makes things difficult to confirm) we needed to start to hold extra state to be able to watch the mempool for spends. The upcoming v0.16.4 release optimizes this further. The trade off here is extra memory for increased security (ensure HTLCs can timeout, etc). Are you able to add swap to your machine? Also which Go version are you using? For v0.16.x, you can also increase this value as well to reduce CPU usage a bit: In future versions, if a user is running with a newer version of |
@Roasbeef CPU usage seems to be usual. |
The fix helped me. After about one day of running LND uses ~700M of RAM, which is great! Thank you! |
Background
After updating to 1.16.3 I noticed spike in memory usage from about 1G to 2.4G. Number of channels stayed about the same (150).
Also some commands are now slow (
lncli listchannels
takes sometimes up to a mitute, before it was almost instant). Swap is being used a lot, I think it is related.Here is pprof memory chart. It has suspicious path eating 90% of all captured memory (
cachedInputs.addInput
). It mentions mempool. May it be related to recent spike in mempool size?Your environment
lnd
1.16.3uname -a
on *Nix):Linux vps 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux
bitcoind
: 25.0Steps to reproduce
I don't know, how. I'm running this node for several years.
Expected behaviour
LND consumes <=1G of RAM.
Actual behaviour
LND consumes 2.4G of RAM.
The text was updated successfully, but these errors were encountered: