getAlby / nostr-wallet-connect

Nostr Wallet Connect (NIP-47) application to allow apps to connect to your node
https://nwc.getalby.com
Apache License 2.0
103 stars 31 forks source link

High CPU Utilization #205

Closed horologger closed 8 months ago

horologger commented 8 months ago

The team evaluating NWC under Start9 noticed high(near 100%) CPU utilization after installing and starting NWC.

htop reveals that the offending process is /bin/main which is the NWC starting app.

I've verified this on.

v0.4.1 Start9(x86) Pure hw v0.4.1 Start9(arm) VM on M1 mac v0.4.1 Umbrel(arm) Raspberry Pi-4 hw v0.3.0 Umbrel(arm) Raspberry Pi-4 hw

I didn't go back to test earlier versions.

Hopefully it isn't a bunch of busy-waiting...

bumi commented 8 months ago

thanks for raising this! do you use any special config?

horologger commented 8 months ago

No. LND and their default RELAY. I have tested using a non-default relay and found that the QR connection code included it as expected. Their are some other ENV vars but none seemed important enough to include in the config screen(Start9 packaging). Not sure if LND and CLN are RPC compatible, but was trying to test CLN and couldn't figure out where to get the cert file(when C-Lightning is installed/mounted as a dependency on Start9). Another issue entirely and the base NWC may need coding adjustments to use CLN.

bumi commented 8 months ago

Yes, we would need to write a CLN adapter for the app. LND and CLN are not compatible.