What is the role of Queue Size in solving reading performance issues?
Posted by Oleh Muliarchuk on 25 February 2020 12:17

The Queue Size option defines the maximum video buffer size on the playout server. 

It is being set up on the Playback tab of Playout configuration:

The Queue Size is specified in frames.

As a pre-read buffer, it holds frames to be output that are rendered in advance, not adding any additional delay to output.

The Queue Size may play a significant role in compensating reading performance issues. 

150 frames for 25 fps means that reading issues less than 6 sec in total will be compensated from the buffer. In case issues take longer than 6 sec (150 frames) they might become visible as frames will be read directly from the disk. It can be verified by PERF read messages in the log. Each PERF message contains information about the frame read time in ms. This message does not appear when the time to get next frame is below the specified threshold.

The PERF read message appears in the log when the time to read the next frame from disk exceeds the frame duration (40 ms in case of 25 fps). In case such messages appear seldom, the performance read issues are compensated by the mentioned pre-read buffer. If PERF read messages appear in the log often, this signals that pre-read buffer may be depleted at some point (reading speed is below the real time) and this may affect the playout.

The above idea can be illustrated by the log example:

2019-07-01T18:22:41.951Z (9096) PERF: Read 48 ms (R,P,D): V(P,48,0) ANC(D,0,0) A0(P,0,0), id {E4018210-E9F3-46A0-AFDE-B094E1C76EDA}
2019-07-01T18:22:41.951Z (9092) PERF: Read 73 ms (R,P,D): V(P,73,0) ANC(P,0,0) A0(P,0,0), id {02772728-DA0A-4767-B132-774E2030FC1B}

V(P,48,0) – means that reading from proxy took 48 ms. In case of reading directly, the message would be V(D,48,0).

This pre-read buffer also reserves memory from RAM to hold uncompressed frames data. For example, for 150 frames - 150*width*height*2 bytes.

150*1920*1080*2=593 MB.

The Queue Size also reserves some GPU memory when the Cinegy Titler templates are used. It is the same 150 frames, but the memory usage will depend on the number of graphic layers and their complexity for each frame.

For high-resolution content (4K, 8K) it is recommended to reduce the default queue size to the values more appropriate for GPU RAM (e.g. 25).

(0 vote(s))
Not helpful

Comments (0)