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

High CPU Load When ATEM Mini Pro Is Connected #127

Open
mathias-ewald opened this issue Mar 22, 2021 · 8 comments
Open

High CPU Load When ATEM Mini Pro Is Connected #127

mathias-ewald opened this issue Mar 22, 2021 · 8 comments
Labels
bug Something isn't working needs-support-in-lib Slower tasks that require understanding 'new' parts of the protocl

Comments

@mathias-ewald
Copy link

The CPU load caused by companion is around 1-2% when there's not device connected. As soon as I add the ATEM Mini Pro, CPU load rockets to a bit above 30% and stays there forever.

I am not sure if there's a legit reason for that or it should be considered a bug.

Screenshot 2021-03-22 at 22 17 12

Screenshot 2021-03-22 at 22 12 32

@mathias-ewald
Copy link
Author

Nobody? Companion is eating my MacBook alive and I am the only one with that problem?

@Julusian Julusian added bug Something isn't working needs-support-in-lib Slower tasks that require understanding 'new' parts of the protocl labels Apr 5, 2021
@Julusian
Copy link
Member

Julusian commented Apr 5, 2021

I am running companion of Linux not Mac, but am only seeing an increase of about 2-4%.
When I have a chance I shall do some tests to see if I get a larger difference on another machine.

What version of companion are you running?

This could be related to nrkno/sofie-atem-connection#96

@mathias-ewald
Copy link
Author

It does run better on Linux, I can confirm that:

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                
  22660 mewald    20   0   11.9g 114840  75364 S 104.7   0.5   1087:32 VBoxHeadless                                                                                                           
  78042 root      20   0 2197380 296788  32344 S   4.7   1.2   0:04.25 node                                                                                                                   
   2345 mewald    20   0 1890240  77716  45688 S   1.0   0.3  17:01.14 Xorg                                                                                                                   
  21933 mewald    20   0  519384  58648  38244 S   1.0   0.2   0:30.31 gnome-terminal-                                                                                                        
    993 root      20   0    9612   6124   4504 S   0.7   0.0   0:58.13 bluetoothd                                                                                                             
  25857 mewald    20   0 5239764 327184  50508 S   0.7   1.3   3:33.33 code

On Mac, I am running v2.1.2

@Julusian
Copy link
Member

I have just taken a quick look at this on an M1 mac, and looks better in the 2.2 betas.
I am seeing about 20-25% cpu in 2.2 compared to 30-35% cpu in 2.1.3

If I run up a connection outside of companion it is about ~5% cpu.

I don't have any ideas right now on where the extra cpu is going, I shall pick this up another day to try and figure out why

@mathias-ewald
Copy link
Author

Thanks for being persistent with the problem! Tbh, for something like connecting to the ATEM and sending a command every once in a while, I would expect to see companion in the output of top at all ;)

@jerrodh
Copy link

jerrodh commented Jun 16, 2021

For what it’s worth, I’m also seeing exactly this:

M1 Mac Mini running Big Sur
Companion 2.1.2
x32, atem, Visca (x2), propresenter, unifi, and generic-wake-on-lan modules loaded
~33% CPU usage with atem module enabled
~5% CPU usage with atem module disabled

No curious log items or unexpected behaviors — all seems to work, just with bafflingly-high CPU usage specifically related to the ATEM module being enabled.

@mathias-ewald
Copy link
Author

Apparently, smoking up a 3rd of a mac book pro isn't much of a deal for most folks here 😂

@dickmann
Copy link

Same issue here, fresh install of latest companion brings 35% CPU load for companion process only. Making my fans spin like crazy if I open additional apps... Can this issue be fixed soon, please?!? MacOS BigSur 11.6 on 2020 Macbook Pro 13"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-support-in-lib Slower tasks that require understanding 'new' parts of the protocl
Projects
None yet
Development

No branches or pull requests

4 participants