Project

General

Profile

Actions

Bug #4854

open

OTA EPG grabber memory usage

Added by Peter Bašista over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
EPG
Target version:
-
Start date:
2018-01-14
Due date:
% Done:

0%

Estimated time:
Found in version:
4.3-912~g5fe3ebd48
Affected Versions:

Description

Hi,

I would like to ask about the expected memory usage of the tvheadend's OTA EPG grabber.

I am running tvheadend 4.3-912~g5fe3ebd48 on a set-top-box with 1 GiB of memory. I have ~4000 mapped TV channels. Normally, tvheadend uses ~500 MiB of virtual memory, while ~250 MiB of it is present in RAM (resident set size).

When I run the OTA EPG grabber, it eventually causes tvheadend to be killed by the kernel's OOM killer. It takes about 2-3 hours of EPG data scanning until it happens. It is always reproducible.

I would like to ask whether such a behavior is expected. I would assume that the EPG data that has been grabbed so far should regularly be flushed to the on-disk database. Then, I think, it should not be necessary to have a lot of memory in order to grab EPG data from many channels.

The OOM event happens when tvheadend starts to save the EPG data to disk. I am not familiar with how that works exactly, but I would assume it should not require significantly more memory than what is already used by the EPG data which is being flushed to disk.

Unless, of course, the entire EPG database would have to be rebuilt in memory at first. That would explain the rather high memory requirement. In such case, the obvious follow-up question is, whether it could be improved. I believe that there are smart ways to handle "large" databases on disk with little memory. Maybe they should at least be considered.

Actions

Also available in: Atom PDF