companion-module-bmd-atem icon indicating copy to clipboard operation
companion-module-bmd-atem copied to clipboard

High CPU Load When ATEM Mini Pro Is Connected

Open mathias-ewald opened this issue 5 years ago • 8 comments

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 avatar Mar 22 '21 21:03 mathias-ewald

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

mathias-ewald avatar Mar 29 '21 17:03 mathias-ewald

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 https://github.com/nrkno/tv-automation-atem-connection/issues/96

Julusian avatar Apr 05 '21 11:04 Julusian

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

mathias-ewald avatar Apr 09 '21 06:04 mathias-ewald

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

Julusian avatar Apr 22 '21 23:04 Julusian

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

mathias-ewald avatar Apr 23 '21 14:04 mathias-ewald

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.

jerrodh avatar Jun 16 '21 04:06 jerrodh

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

mathias-ewald avatar Oct 07 '21 09:10 mathias-ewald

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"

dickmann avatar Oct 31 '21 22:10 dickmann