Bug #3867
If cache scheme = "sync" and stream profile = "pass", tvheadend will cause excessive I/O and leaks memory
0%
Description
Choosing "sync" for cache scheme and "pass" for stream profile (i.e. recording in .ts) will cause excessive I/O and tvheadend will beging to leak memory.
Just recording < 10 seconds of a transmission will take over a minute (on a WD Red). If a longer recording is make, it will also apparent quite soon that tvheadend is also leaking memory - probably trying to cache the recording, but it is still way more than the recording should take, even if it was in RAM in entirety.
For example: I made a 1 hour recording with the faulty setup, and 4-5 hours after the recording, only 800MB of it was written (it would take ~2.8GB when finished) and tvheadend was consuming 13GB of memory. After a while tvheadend started to eat my swap too (I have 16GB of RAM), so I killed tvheadend.
I can reproduce this on a clean setup on Arch Linux, with GIT (4.1-2134~g0bc30b9), but I've also seen this on 4.0.9. I can provide debug logs if needed.