Project

General

Profile

Improve startup time

Added by Sébastien Aubry over 7 years ago

Hi,
On my setup, TvHeadend takes a very long time to start (10 to 30 minutes!). Once started, everythings works fine.
It is quite an old (installed several years ago, upgraded from OpenElec to LibreElec) and active setup (~60 recordings per day), but the HTPC itself is not slow. I suspect some operations may have a non-linear complexity or may not be optimized. For instance, I have 2879 files inside the dvr/log directory. Some of them are almost one year old.

Attached is my last startup log (29 minutes, from 23:19 to 23:48).

My HTPC is always on, so this is not so annoying, but I would like to understand.
Do you have any idea about how to decrease the startup time? I can run tests if needed in order to understand where we lose time.
I am using HTS Tvheadend 4.1.2415 inside LibreELEC Tvh-addon v8.1.109.

Thanks


Replies (3)

RE: Improve startup time - Added by Sébastien Aubry over 7 years ago

Hi,
I reduced the startup time to about 1 second by just deleting all the old files from the service.tvheadend42/imagecache/meta (230 000 files!) and service.tvheadend42/dvr/log (about 10 000 files) directories. :)

RE: Improve startup time - Added by Robert Cameron over 7 years ago

Sébastien Aubry wrote:

Hi,
I reduced the startup time to about 1 second by just deleting all the old files from the service.tvheadend42/imagecache/meta (230 000 files!) and service.tvheadend42/dvr/log (about 10 000 files) directories. :)

A note regarding deleting the DVR log files: this is how Tvheadend knows whether it's recorded something before. If you delete the log files, then anything that was in those logs as being previously recorded will no longer present as such.

It's not a big deal, but just a convenience issue that may frustrated you later.

RE: Improve startup time - Added by Sébastien Aubry over 7 years ago

Hi,
Thank you for the info. Should there be any automatic cleaning of these two directories (which can become very big with the years), when a recording is not found anymore and is older than the retention time (30 days by default)?
Regards

    (1-3/3)