lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.63k stars 2.07k forks source link

[bug]: Running LND becomes very slow on macOS (arm64) compared to Linux (ubuntu 22.04 aarch64) #8671

Open mohamedawnallah opened 4 months ago

mohamedawnallah commented 4 months ago

Background

Recently, I've observed that running LND on macOS (M1 - arm64) is significantly slower compared to running it on Linux (Ubuntu 22.04 aarch64). Here are videos demonstrating the difference:

https://github.com/lightningnetwork/lnd/assets/69568555/c8053e71-7794-4929-b415-31eaff134007

https://github.com/lightningnetwork/lnd/assets/69568555/06636c9f-f8ce-48b6-823b-1ad4075a635d

You can find the logs from both environments below:

Also here are the lnd and bitcoin configurations used for both the environments (the passwords included are just for testing):

Context

Both instances are connected to the same chain backend (Bitcoin Core). The tests appear to be independent of computing resources. The LND instance on macOS was a fresh start, but the slow runtime persisted even after multiple attempts (e.g., testing cache or other factors).

Your Environment

Ubuntu (Linux)

macOS

Chain Backend

Expected Behavior

Both environments should have similar runtime performance.

Actual Behavior

The runtime on macOS (M1 - arm64) is significantly slower compared to Linux (Ubuntu 22.04 aarch64).

Smiril commented 4 months ago

did "Siri" learn from this app?

mohamedawnallah commented 4 months ago

did "Siri" learn from this app?

Not sure I understand the context of this question!

guggero commented 4 months ago

I think this might be due to the FSYNC behavior of MacOS. See https://news.ycombinator.com/item?id=30370551.