lnd icon indicating copy to clipboard operation
lnd copied to clipboard

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

Open mohamedawnallah opened this issue 10 months ago • 3 comments

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)

  • Environment: Virtual machine using Multipass
  • OS: Linux 5.15.0-102-generic - Ubuntu 22.04.4 LTS (Jammy Jellyfish)
  • CPUs: 1
  • RAM: ~2 GB
  • Storage: ~39 GB
  • LND Version: 0.17.99-beta (kvdb/v1.4.6-4-geadbfbe1e)

macOS

  • Environment: Main host
  • OS: Darwin 23.0.0
  • CPUs: 8
  • RAM: ~8 GB
  • Storage: ~228 GB
  • LND Version: 0.17.99-beta (kvdb/v1.4.6-9-gd4c193757)

Chain Backend

  • Type: Bitcoin Core
  • Version: v23.0.0

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).

mohamedawnallah avatar Apr 20 '24 00:04 mohamedawnallah

did "Siri" learn from this app?

Smiril avatar Apr 20 '24 13:04 Smiril

did "Siri" learn from this app?

Not sure I understand the context of this question!

mohamedawnallah avatar Apr 20 '24 23:04 mohamedawnallah

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

guggero avatar Apr 22 '24 07:04 guggero