[mythtv-users] Getting slower

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Aug 3 10:33:41 UTC 2020


On Mon, 3 Aug 2020 12:26:28 +0800, you wrote:

>Stephen thanks for input
>
>> There are lots of things that can affect the startup time for
>> mythfrontend.  In my case, I have a huge database, and I have been
>> attributing slow startup to that.  My mother's system has a much
>> smaller database and mythfrontend starts faster there than on mine,
>> but there is still a significant wait, and I am not sure there is any
>> good reason for it.  But finding the source of the slowness will
>> probably need more detailed debug output.
>> 
>> In your case, some questions to rule out some obvious things.
>> 
>> Is your local network IPv6 capable?  Does it have IPv6 connection to
>> the Internet with delegated IPv6 addressing so that your devices have
>> global unicast IPv6 addresses?  The "ip addr" command on Linux will
>> show IPv6 addresses marked as "scope global" if you do have delegated
>> IPv6 addressing.
>
>There is no ipv6 on my network

You are very likely wrong about that.  Unless you have manually
disabled IPv6, it will be working but only using link-local addresses,
and so can only be being used for connections between devices on the
same subnet.  Windows, Linux and Mac all do this.  If you look at the
output of the "ip addr" command, you will see "inet6" lines, with the
link-local addresses, which start with "fe80:".  Those lines should
end with "scope link".

The log you posted shows mythfrontend listening on IPv6.  That does
not mean that it is actually doing IPv6 connections though - that
would only happen if you gave it link-local IPv6 addresses to connect
to.  So unless you have done that, the fact that things are listening
on IPv6 sockets is of no consequence.  It certainly will not be
causing delays.

>> Do you run a local DNS server for your network?  How are the IP
>> addresses of your devices specified to MythTV - do you use hostnames
>> or IP addresses?
>
>I do run a local DNS server. I found dnsmasq does what I want. All mythtv refs are by IP not by name.

So that is irrelevant also, as you are not doing DNS lookups.

>> Do you have any hard drives on the mythfrontend or mythbackend PCs
>> that stop rotating and sleep when they are not being used?  Do they
>> need to be started for MythTV to use?
>
>The main disk is m2 - hdparm says about 2500 M/S
>/store is a SATA SSH. hdparm says about 530 M/S
>
>I run trim once per day (at 4 ayem)

Ok, that is not the problem then.  Even if SSDs do go into low power
modes (and I have not checked if they do), the startup times will not
be significant.

So then, how do we find out what is causing the delays?  The first
thing I can think of is to run Wireshark on either the frontend or
backend box and have it capture all traffic between the frontend and
backend.  A simple "host <IP address> capture filter should be all
that is needed.  Then start mythfrontend exactly at a known time and
see when the traffic from mythfrontend happens and what ports it is
going to, as well as the content.  To start mythfrontend at a specific
time, you can do it from a command prompt, rather than the GUI, like
this:

sleepuntil 22:25; mythfrontend

You can get the sleepuntil script from my web server:

http://www.jsw.gen.nz/mythtv/sleepuntil

You can also increase the logging of mythfrontend:

mythfrontend.real --setloglevel debug

And also the verbosity - see the output of these for the options:

mythfrontend.real -h
mythfrontend.real -v help


More information about the mythtv-users mailing list