Skip to content
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

CPU usage on Apple M1 is constant at 12% 2.0.6 #12678

Open
nostitos opened this issue Mar 17, 2024 · 13 comments
Open

CPU usage on Apple M1 is constant at 12% 2.0.6 #12678

nostitos opened this issue Mar 17, 2024 · 13 comments

Comments

@nostitos
Copy link

image

Not mixing, Same problem isn't present on x86.

@molnard
Copy link
Collaborator

molnard commented Mar 18, 2024

@soosr we are not doing any different on M1 in the code. Avalonia issue?

@soosr
Copy link
Collaborator

soosr commented Mar 18, 2024

@nostitos Can you verify that you installed the ARM version on your M1? x86 can also run, but will be less effective.

@nostitos
Copy link
Author

Yes it's the ARM version.

@kiminuo
Copy link
Collaborator

kiminuo commented Mar 21, 2024

I can see the same on my arm macOS machine:

Screenshot 2024-03-21 at 13 52 18

I ran WW from source code. So yes it appears there is something wrong. My guess would be that it is on the Avalonia side, but it's just a guess. If there is any idea what to test, I can test it as well. Btw, disabling GPU support in settings did not help me.

@wieslawsoltes
Copy link
Collaborator

wieslawsoltes commented Mar 21, 2024

Seems no UI updates are happening (basically 0 FPS, zero layout or render invalidations - see graph and FPS overlay info):
image

@kiminuo
Copy link
Collaborator

kiminuo commented Mar 21, 2024

My measurement was when I logged into my wallet. Could you check that as well please?

@wieslawsoltes
Copy link
Collaborator

image

@wieslawsoltes
Copy link
Collaborator

wieslawsoltes commented Mar 21, 2024

I did run profiler and seems like NBitcoin code is running in background thread:
image

@wieslawsoltes
Copy link
Collaborator

@kiminuo when logged in (the same):
image

@kiminuo
Copy link
Collaborator

kiminuo commented Mar 21, 2024

I did run profiler and seems like NBitcoin code is running in background thread:

It does. Its P2P code runs in a thread. I read that code a few times and I'm not aware why it should take significant amount of CPU but it's NBitcoin so everything is possible.

I actually waited a few minutes (like 3 I think) and on my machine it wend down from 40% to consistent 10%. However, it's weird that NBitcoin's code would take 10% of CPU on macOS arm64 and not on macOS x64 (my understanding of this issue).

@wieslawsoltes
Copy link
Collaborator

There are some exceptions happening:
image

@wieslawsoltes
Copy link
Collaborator

There are some exceptions happening: image

image

@wieslawsoltes
Copy link
Collaborator

Definitely a lot of activity from many background threads:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants