Server: Ended clip takes up entire CPU core if not cleared or stopped explicitly on CasparCG 2.2

Created on 26 Sep 2018  路  2Comments  路  Source: CasparCG/server

Expected behaviour

CPU utilization doesn't go up when a clip ends (in fact a lower CPU usage is expected).

Current behaviour

in CasparCG 2.2 on Ubuntu, when a clip plays out until its end an entire cpu core goes up to 100% the exact moment the clip ends. In htop it looks like this:

image

When enough layers are occupied by ended clips the entire CPU maxes out:

image

CPU goes back down when you give an explicit STOP or CLEAR command on the layer where an ended clip is present.

It is the same on Windows with the difference that cores aren't occupied so drastically. However, a significant increase in CPU usage can be observed in the task manager for each clip that ends.

On both our Ubuntu and Windows test system it takes about eight ended clips to max out the entire CPU (while playing the load is about 30%)


Steps to reproduce

  1. Play a clip and let it run its course
  2. Monitor CPU usage. On Ubuntu when the clip ends a single core goes up to 100% (when monitoring in htop at least).
  3. If you let multiple clips end on separate layers, more and more cpu cores will be taken completely.
  4. Issuing an explicit CLEAR or STOP on the respective layers will bring CPU utilization back down.

The process is the same on Windows except that the CPU increase observed in the task manager is more gradual and distributed over separate cores.

Environment

Issue is observed on both an ubuntu and a windows 7 system:

System 1

CasparCG Server version:
2.2.0 727542fc4 Beta 9
video-mode 1080i5000    

Operating system:
Ubuntu 18.04

Graphics driver:
Nvidia 390.42  (for GTX1050)

Decklink drivers:
Blackmagic Design BlackmagicIO driver 10.10a3

System 2

CasparCG Server version:
2.2.0 727542fc Beta 9
video-mode 1080i5000    

Operating system:
Win 7 x64

Graphics driver:
Nvidia 391.01 (for GTX660)

Decklink drivers:
none
typbug

All 2 comments

Playing back 10 AMB clips simultaneously on a Windows machine I observed a jump in CPU from 45% playing back to 80% with ended clips. This jump did not occur when playing back a looping clip, and it also did not occur when pausing the layer.

Clearing the entire channel fixes the CPU usage as well.

Fixed in master

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saltomodules picture saltomodules  路  5Comments

ronag picture ronag  路  7Comments

premultiply picture premultiply  路  6Comments

pkeuter picture pkeuter  路  3Comments

malmgrenola picture malmgrenola  路  5Comments