docker-podsync
docker-podsync copied to clipboard
Memory over consumption
Podsync is using too much RAM on my NAS even when not updating feeds (my feeds are programmed to be updated during the night).

I tried to reproduce that, but I can't. This is what I did:
Environment:
- Raspberry Pi 4B 4GB
- Raspbian GNU/Linux 11 (bullseye) 32bit (should be armv7l)
- Updated as of yesterday
- Docker version 20.10.16, build aa7e414 (installed from Docker repo itself)
Testscenario: A minimal config file for podsync:
[server]
port = 8080
data_dir = "/data"
hostname = "http://localhost"
[database]
badger = { truncate = true, file_io = true }
[tokens]
youtube = "$YTTOKEN"
[feeds]
[feeds.testfeed]
url = "https://www.youtube.com/user/bbcnews"
page_size = 1
update_period = "100h"
quality = "high"
format = "audio"
clean = { keep_last = 1 }
[downloader]
self_update = true
Run the container:
docker run --name=test -p 8080:8080 -d -v /tmp/config.toml:/app/config.toml:ro ghcr.io/tuxpeople/podsync:pr55-v2.4.2
I saw the this while monitoring the system:
First, yt-dlp used 100% CPU (=1 core). Then ffmpeg came and used 100% CPU while yt-dlp went down. After a while, both disappeared. Obviously, that was the initial download of the file from the test feed. After that, I barely noticed anything from that container. Sometimes, podsync came near the top of top, but with 0,2-0,3% mem.
I then took a look at docker stats:

I then installed glances, this is what it looks like:

As I understand from this: At the moment I took the screenshot, podsync used 0.3% CPU, 0.5% mem. In absolute numbers, it used 788M VIRT and 19.9M RES. The following is from the top man page:
VIRT -- Virtual Image
The total amount of virtual memory used by the task. It
includes all code, data and shared libraries plus pages that
have been swapped out and pages that have been mapped but not
used.
RES -- Resident size
The non-swapped physical memory a task has used.
Thank you. It helped me to understand few issues in my config.toml file (who is not very well documented in the podsync GitHub project):
- i should set up the data_dir variable to /data (instead of /app/data) and the same for volume binding
- i should have set up the badger database section that I missed in my initial set up (i am not very clear on what it is doing though as it is declared as optional in podsync project)
Having doing that the memory is ok now. Thanks a lot for your help! Laurent