Dedicated eth interface for tvheadend
Added by allio xyzzy over 5 years ago
I use tvheadend on an i3 6100 running Ubuntu 18.10 with an onboard Intel I219-V gigabit NIC. As well as serving TV it is my general fileserver/NAS and a bunch of other things. My tuner is an HDHomeRun Connect.
For a while I've noticed that when I transfer files at a high speed (generally 60MB/s or more) off the server, the picture breaks up. I initially blamed my router, but then realised it happens even with a different router. Further testing (i.e. doing transfers between client PCs and bypassing the server) revealed it's the server's ethernet interface that is getting overloaded, not the router.
I've now upgraded to gigabit internet so even running a speed test or downloading very fast on my server causes the picture to break up. I need to solve this!
It seems like the easiest way to achieve an uninterrupted picture would be to give tvheadend (which, in conjunction with a HDHomeRun, appears to be quite sensitive to heavy network traffic) its own dedicated ethernet interface. However I can't see an obvious way to bind tvheadend to a specific eth network. Does anyone know how to do this? Is it a tvheadend thing or a general linux thing?
Alternatively - does anyone have an ethernet card which can handle 1GBps transfers at the same time as receiving a HDHomeRun signal without breaking up? If my problems are simply due to a crappy onboard NIC, maybe I just need to replace it and be done with it...
Replies (4)
RE: Dedicated eth interface for tvheadend - Added by Em Smith over 5 years ago
I'm surprised that the picture breaks up. However, if your HDHomeRun is near your PC, you could buy a USB Ethernet (or PCI if you have spare ports) and connect a cable direct from the PC to the HDHomeRun bypassing everything. The HDHomeRun (and most modern Ethernet) is auto-selecting so you don't need a special crossover cable. The HDHomeRun should then self-assign an address 169.254.x.y, subnet 255.255.0.0.
(I don't have an HDHomeRun but the manuals state they support this).
To answer your other question about autoscheduling on +1 channels, this should be fixed on 4.3 if you tick the box "attempt to find better time slots" in config->recording->dvr profiles.
RE: Dedicated eth interface for tvheadend - Added by allio xyzzy over 5 years ago
Thanks for the reply. Great idea about connecting the Homerun directly, but I would lose the ability to access it directly via the rest of the network - not something I do often but it's nice when I need it.
Seeing I'd need a second ethernet port anyway, I think I'll go ahead and buy a new PCIe ethernet card and hope that solves the problem with the Homerun connected to the router as normal. If not, I'll try your suggestion.
The +1 channels bug was fortunately fixed a number of years ago is my report still showing as active? If so I really need to close it...
RE: Dedicated eth interface for tvheadend - Added by Joe User over 5 years ago
These kinds of problems can be difficult to diagnose and hard to even speculate about when one doesn't have all the information.
"transfer files" - meaning uploading to server or downloading from server or both? (Simultaneously reading/writing to disk?)
"picture breaks up" - when viewing on some separate client only or also when just recording?
A few things to look into:
I would not necessarily rule out router/switch. I have seen numerous times now that some router/switches do not work well with mixed environments. (the hdhomerun is 100Mb) I have a 100Mb STB which runs off an NFS mount (nfsroot) from my 1Gb connected server. I had similar problems to you sometimes. For a log time I assumed it was just the old (2.4) kernel running on the STB which was not working well running over NFS. One day I swapped some devices around between routers and all of a sudden all my problems disappeared. Putting the STB back on the original router confirmed the issue - the switch on the router was "starving" the 100Mb connection when servicing 1Gb connections. Since then I have seen the same problem with other networks. Not saying it is your problem, but something to check. You may be able to test this by using a separate client to watch video directly from the hdhomerun and doing a speed test to it at the same time.
A quick look on that NIC brings up some bug reports (although not exact problem as yours) and updating BIOS and/or drivers may help.
[[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1785171]]
Sometimes disabling "offloading" to problematic NICs helps them to perform better. And with a mixed 100Mb/1Gb issue, it may even help with a good NIC...
[[https://michael.mulqueen.me.uk/2018/08/disable-offloading-netplan-ubuntu/]]
You can try temporarily disabling it to see if it helps. Of course it probably will reduce the performance of 1Gb transfers, so you will have to decide if it is worth it...
I have also seen some motherboards which do not handle well receiving high speed network AND writing it to a disk at the same time. Usually one would not even really notice, but live video is very sensitive to any delays and the problem is clearly seen.
RE: Dedicated eth interface for tvheadend - Added by Joe User over 5 years ago
Also, if you do get a new NIC, I would first test to see if it works fine by itself (disabling the onboard NIC) before trying to use two NICs (much simpler to configure...)