Ethernet usage prioritising for tvheadend
Added by Wim K almost 4 years ago
Hi,
I've got a RPI4, 4GB, raspbian OS, to which a external HDD is connected and at the same time the Pi is running tvheadend, oscam, qbittorrent. The whole network is gigabit, NAS is formatted EXT4, when copying files I get 60-100 Mb/s.
Recently I was copying a large amount of files across the network to the "NAS" (the external HDD connected to the pi), while tvheadend was recording a tv-show. The result was that the quality of the recording was bad. Unfortunately I don't have these recordings anymore, but I suspect the copying of the files was consuming so much bandwidth that there was data loss (conclusion drawn from looking at data from nethogs and htop, but maybe I'm wrong here??).
So I was thinking about prioritizing the network bandwidth so that tvheadend would always hava the highest priority and thus this problem would not occur anymore.
I read about tc, but there are also simpler options like trickle and there may be others.
I'm a bit of a newbie, so before going down the completely wrong road, my question is: what's the best way to accomplish what I have in mind?
Thanks,
Wim
Replies (6)
RE: Ethernet usage prioritising for tvheadend - Added by Dave H almost 4 years ago
There's a program called ionice, that's a bit like nice but for disk i/o.
You could try running tvh with real time disk priority and do your file copies with idle priority.
I've never used it and certainly don't know whether it's the best way; I just offer it as a possible solution.
edit: I just read the manual a bit more. It looks like real time class is not a good idea since it means having to run tvh as root. So use best effort class for tvh. I see there are also priority levels within classes so some experimentation and/or thought may be required.
RE: Ethernet usage prioritising for tvheadend - Added by Wim K almost 4 years ago
Hi Dave,
Thanks for the suggestion.
That would work for file-copying but not for qbittorrent or other processes. I think it would be best to be able to prioritize the ethernet bandwidth itself, in my case.
Wim
RE: Ethernet usage prioritising for tvheadend - Added by Dave H almost 4 years ago
Ah, OK. A quick google shows something called trickle. Maybe that will work for you?
RE: Ethernet usage prioritising for tvheadend - Added by saen acro almost 4 years ago
DSCP settings is already implemented to TVH for network streaming QOS, but for recording on local storage need other priorities.
RE: Ethernet usage prioritising for tvheadend - Added by Wim K almost 4 years ago
Hi saen acro,
Recording on local storage on Pi4, is that dependend on network bandwidth or disk i/o (being different things)?
(I thought because the pi divides bandwidth between usb- and ethernet ports it was all about network bandwidth).
Wim
RE: Ethernet usage prioritising for tvheadend - Added by saen acro almost 4 years ago
Limit bandwith of ethernet port, pi control devices not by hardware.
Pi4 can be good clent but is crap hardware,
take some jaguarboard or similar and forget about ARM "productivity".