Node performance tuning¶
Recommendations for installations with a large number of streams, when CPU or memory runs short.
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 also slows down the source redundancy response.
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 by default the supplied systemd unit limits 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; this growth in itself does not indicate 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 the disk is not fast enough: 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/tmpuses system memory: estimate the free memory and adjust 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).