[GH-ISSUE #142] Super high cpu usage #101

Closed
opened 2026-02-28 14:30:37 +03:00 by kerem · 14 comments
Owner

Originally created by @erikc96 on GitHub (Aug 23, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/142

I just caught Psst using 90% of my cpu on an m1 mac. Is this not typical?

Originally created by @erikc96 on GitHub (Aug 23, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/142 I just caught Psst using 90% of my cpu on an m1 mac. Is this not typical?
kerem closed this issue 2026-02-28 14:30:37 +03:00
Author
Owner

@jpochyla commented on GitHub (Aug 23, 2021):

No it is not typical. Do you have a reproducible example?

<!-- gh-comment-id:904034049 --> @jpochyla commented on GitHub (Aug 23, 2021): No it is not typical. Do you have a reproducible example?
Author
Owner

@Kethku commented on GitHub (Aug 24, 2021):

Did you build it in release mode?

<!-- gh-comment-id:904964416 --> @Kethku commented on GitHub (Aug 24, 2021): Did you build it in release mode?
Author
Owner

@Kethku commented on GitHub (Aug 24, 2021):

On windows, psst uses .1% of my cpu while playing. In contrast, spotify sticks right around 1.7% to 2%. I definitely do not incounter 90% usage

<!-- gh-comment-id:904965556 --> @Kethku commented on GitHub (Aug 24, 2021): On windows, psst uses .1% of my cpu while playing. In contrast, spotify sticks right around 1.7% to 2%. I definitely do not incounter 90% usage
Author
Owner

@jpochyla commented on GitHub (Aug 25, 2021):

I've pushed a little optimization commit, ambient playback now takes about 3% on macOS MB Air. Of course this all depends on a lot of details, and Psst is not optimized much, there should be a lot of low-hanging fruit still.

<!-- gh-comment-id:905579192 --> @jpochyla commented on GitHub (Aug 25, 2021): I've pushed a little optimization commit, ambient playback now takes about 3% on macOS MB Air. Of course this all depends on a lot of details, and Psst is not optimized much, there should be a lot of low-hanging fruit still.
Author
Owner

@pablodz commented on GitHub (Aug 26, 2021):

image

0.00%

<!-- gh-comment-id:905992437 --> @pablodz commented on GitHub (Aug 26, 2021): ![image](https://user-images.githubusercontent.com/28235457/130884526-5f10094b-ca97-45c1-b1b5-94bf41bbb12b.png) 0.00%
Author
Owner

@Kethku commented on GitHub (Aug 26, 2021):

Repeat of https://github.com/jpochyla/psst/issues/12

<!-- gh-comment-id:906091155 --> @Kethku commented on GitHub (Aug 26, 2021): Repeat of https://github.com/jpochyla/psst/issues/12
Author
Owner

@Kethku commented on GitHub (Aug 26, 2021):

@erikc96 could you run a profiler on the app when it is using all that cpu to get an estimate of where that cpu time is going?

<!-- gh-comment-id:906091341 --> @Kethku commented on GitHub (Aug 26, 2021): @erikc96 could you run a profiler on the app when it is using all that cpu to get an estimate of where that cpu time is going?
Author
Owner

@ceifa commented on GitHub (Sep 1, 2021):

30% CPU running version e6e3cfa from snap:

image

@erikc96 could you run a profiler on the app when it is using all that cpu to get an estimate of where that cpu time is going?

How do I do that?

<!-- gh-comment-id:910603331 --> @ceifa commented on GitHub (Sep 1, 2021): 30% CPU running version e6e3cfa from snap: ![image](https://user-images.githubusercontent.com/26205666/131729291-82dd0c8d-9943-44ec-99c1-7ee2696e5276.png) > @erikc96 could you run a profiler on the app when it is using all that cpu to get an estimate of where that cpu time is going? How do I do that?
Author
Owner

@jpochyla commented on GitHub (Sep 1, 2021):

@ceifa can you try the latest master? Ambient playback CPU usage should be much lower.

<!-- gh-comment-id:910673453 --> @jpochyla commented on GitHub (Sep 1, 2021): @ceifa can you try the latest master? Ambient playback CPU usage should be much lower.
Author
Owner

@ceifa commented on GitHub (Sep 1, 2021):

On current master version running the release mode:
image

But now "pulseaudio" takes a lot of CPU...

Running spotify:
image

<!-- gh-comment-id:910730937 --> @ceifa commented on GitHub (Sep 1, 2021): On current master version running the release mode: ![image](https://user-images.githubusercontent.com/26205666/131741583-9ac9fd61-82c0-48c0-b22b-8976ee68320f.png) But now "pulseaudio" takes a lot of CPU... Running spotify: ![image](https://user-images.githubusercontent.com/26205666/131742359-8c07fb6c-b449-4e97-a0d2-83902d9a5001.png)
Author
Owner

@pablodz commented on GitHub (Sep 1, 2021):

But now "pulseaudio" takes a lot of CPU...

Did you read about pipewire? it handles better CPU usage than pulseaudio.

<!-- gh-comment-id:910737490 --> @pablodz commented on GitHub (Sep 1, 2021): > But now "pulseaudio" takes a lot of CPU... Did you read about pipewire? it handles better CPU usage than pulseaudio.
Author
Owner

@ceifa commented on GitHub (Sep 6, 2021):

Did you read about pipewire? it handles better CPU usage than pulseaudio.

Never did, but I will take a look, thanks for the hint!

<!-- gh-comment-id:913805904 --> @ceifa commented on GitHub (Sep 6, 2021): > Did you read about pipewire? it handles better CPU usage than pulseaudio. Never did, but I will take a look, thanks for the hint!
Author
Owner

@pablodz commented on GitHub (Sep 8, 2021):

Did you read about pipewire? it handles better CPU usage than pulseaudio.

Never did, but I will take a look, thanks for the hint!

Yes, check the graph in p10 https://elinux.org/images/5/55/Pipewire-slides.pdf

<!-- gh-comment-id:915366452 --> @pablodz commented on GitHub (Sep 8, 2021): > > Did you read about pipewire? it handles better CPU usage than pulseaudio. > > Never did, but I will take a look, thanks for the hint! Yes, check the graph in p10 https://elinux.org/images/5/55/Pipewire-slides.pdf
Author
Owner

@jpochyla commented on GitHub (Sep 14, 2021):

High PulseAudio CPU usage is caused by the small buffer size we use now, will be solved when we switch to cpal for the audio output. Anyway that seems unrelated to the original issue, so let's close this, if you don't mind!

<!-- gh-comment-id:919278383 --> @jpochyla commented on GitHub (Sep 14, 2021): High PulseAudio CPU usage is caused by the small buffer size we use now, will be solved when we switch to `cpal` for the audio output. Anyway that seems unrelated to the original issue, so let's close this, if you don't mind!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#101
No description provided.