Node performance tuning¶
Recommendations for installations with a large number of streams, where CPU or memory becomes scarce.
CPU load¶
Enable MPEG-TS filtering and modification (MPEG-TS filtering) only where they are actually required: by default all filters are disabled, and every enabled filter adds processing to the hot path of the stream. The same applies to the in-depth analyses (In-depth analyses).
The mosaic decodes frames of all streams. It can be disabled entirely in the server settings, selectively for individual streams (“Generate mosaic”), or refreshed less often by increasing “Check interval (s)”. Note that the check interval is shared — it also governs the re-checking of sources and the return to the primary input (Source redundancy), so increasing it slows down the input redundancy response as well.
The current per-stream load is shown in the statistics window (the “Profiler” section) and on the “System Monitor” screen (System Monitor).
Memory¶
Perfect Streamer periodically returns unused memory to the operating system, and the supplied systemd unit limits by default the number of parallel memory allocation arenas (the MALLOC_ARENA_MAX environment variable). This restrains the gradual growth of resident memory when dozens of streams are running; the growth in itself is not a consequence of a leak. Changing the value manually is normally not required.
Statistics and EPG databases¶
Queue overflow errors of the statistics database or of the EPG database occur when disk performance is insufficient: the databases reside on slow storage, or the system is overloaded.
The location of the databases is set by the data-dir parameter of the pss.properties configuration file (by default — the configuration directory). Possible solutions:
Move the databases to fast storage (SSD) with the
data-dirparameter. Placing them in/tmpconsumes system memory: this requires an estimate of the free memory and an adjustment of the statistics retention period; the data is lost on reboot.Reduce the statistics detail — the
dbstat-detailparameter (interval in seconds, 5 by default; up to 30 is allowed).