Companion uses 45% of CPU every 30 seconds

Our church is using Companion to control 3 Streamdecks we use with vMix for live-streaming. They are functioning very well. However, Companion v 3.4.3 appears responsible for 3 PowerShell tasks that take 45% of the available CPU every 30 seconds. This is causing total usage to exceed 100% causing video frame stutter. The tasks go away if I kill Companion. I’m not sure if we had a problem with version 2.X
Is there some way I can kill the 3 PowerShell tasks? They don’t seem to be needed to make the Streamdecks work. Windows 10 v 22H2 64-bit
Thanks, Roy

Companion v3 onwards uses multiple processes, for things such as the main Companion process, renderers, and each Connection has its own process, which is why there are multiple processes. You shouldn’t be just killing the processes as that will result in core parts of Companion failing, or connections you are using.

As for the CPU usage with the vMix module, going from v2 to v3 we’ve added a significant number of variables (as v2 is incredibly old, so a lot has happened since), and variables are particularly resource intensive as with larger vMix productions with lots of inputs it’s common to have thousands, if not tens of thousands, of variables. To help minimize this performance impact please make sure you go into the config for that connection in Companion and limit variables you do not use (for example, if you only reference inputs by name, and not number or GUID, you can disable number and GUID), additionally ensure the Limit Input Variable Types option is ENABLED as this will further reduce the load when processing variables.

Work is being done to add more granular controls over what variables are to be generated, as well as internally within Companion to lower the overhead, which will likely be implemented in Companion v4 which is currently in beta.

Thanks for the reply. I will review the variables, but I don’t think it will address my problem.

Is there a Companion process that runs every 30 seconds?
If so, what does it do? Why does it need so much CPU resources? Can it be stopped?
The Streamdecks functions well immediately after a button push. It doesn’t require a 30 second poll. Nothing is changing in my setup once powered up.

Does this 30 second process exist in Version 2?
While I like the additions in V3 (more addresses), I can give up the other functionality to Companion from corrupting my output video.

In 3.4.0-3.4.2 we were polling the system hostname every 30s, which was reported to cause this issue on some machines.
But that was scaled back in 3.4.3 to just run a few times at startup.

Could that be what you are seeing? Does it keep doing it every 30s, or is it just for the first minute or two after launch?
Do those processes go away, or remain for the whole time companion is running?

BINGO! We are running v3.4.2 Our problem is that it is happening every 30 seconds, as mentioned in the subject line. I may have an opportunity to stop by the church today to do the update.

We saw the announcement of the availability of the update last year, but there didn’t seem to be a need for changing a working system. (At that time, we didn’t know Companion was causing our problem.)

Thanks!

I’ve installed version 3.5.3 and it is working very well without the continuous high load every 30 seconds. Many thanks for your assistance.

I also appreciate this forum. I had been delayed in using the Facebook version because I didn’t want to join Facebook.

All’s good now.
Roy