---
title: Programm optimization
url: https://doc.pstreamer.tv/en/manual/tune.html
lang: en
product: Perfect Streamer
version: 1.13.3.445
---

# Programm optimization

If there are problems with a large CPU load or lack of memory in configuration with large number of **streams**, then you can optimize the settings.

You can disable the MPEG-TS filtering and processing features if you don’t need to.By default, the **stream** has the **Clean All Unnecessary Data** function enabled, disable it if there is no unwanted data in the stream. Disabling these features completely will remove the **Original Media Information** section of the Report.

You can completely disable or change **Mosaic** settings. A completely disabling is done in the server settings. You can disable it individually for each **stream**, or change the update interval with the **Check Interval** setting.

**Growth of memory consumption with a large number of streams.** PSS periodically returns unused memory to the operating system, and the shipped *systemd* unit limits by default the number of parallel memory allocation pools (the **MALLOC_ARENA_MAX** environment variable). This curbs the gradual growth of **RSS** when working with dozens of streams and is not a consequence of a leak. Changing the value manually is usually not required.

## Queue overload errors for DBStat and DBEPG databases

Errors occur due to insufficient databases performance — slow storage is used or the system is overloaded.

Databases location is configured by the `data-dir` parameter in the `pss.properties` configuration file.

Possible solutions of the problem:

1. Moving database files to /tmp. The system memory will be used, requires an estimate of free memory and setting up the storage time of statistics (see server settings). When the system restarts, the data will be lost.
2. Reduce the statistics detalization — see dbstat-detail. 5 sec by default. Can be increased up to 20.
3. Place the EPG database in memory — set the `dbepg-memory=true` parameter.
