[mythtv-users] Preventing a file transfer from saturating the network

Karl Newman newmank1 at asme.org
Tue Dec 23 17:45:49 UTC 2014


On Tue, Dec 23, 2014 at 9:09 AM, Gary Buhrmaster <gary.buhrmaster at gmail.com>
wrote:

> On Tue, Dec 23, 2014 at 4:55 PM, Simon Hobson <linux at thehobsons.co.uk>
> wrote:
> .....
> > A fourth option (which requires a capable switch) is to configure 2off
> gigabit NICs as a trunk to give a 2Gib/s link to/from the switch, which
> means you'd need two transfers to/from two separate devices to be able to
> saturate it - a single device on a gigabit link will only be able to use
> 1/2 the 2G link. The first option is simpler though.
>
> This is not assured to work.  In order to assure in-order packet delivery,
> proper switches will hash various values in the packet and deliver packets
> from one stream across only one link.  If you get "lucky" (luck has nothing
> to do with it, but for those not steeped in the details, it feels like
> magic)
> the two streams may use different links.  If not, you have exactly the
> same issue (all traffic on one link).  With enough traffic, from enough
> different sources, it seems balanced, but with traffic from only a few
> sources, not so much.
>
> But the real issue here is that at this point you have a symptom,
> without understanding the root cause.  There can be many causes
> of losing packets, from CPU limitations, to TCP/UDP packet buffer
> sizes, to ethernet device "issues", to disk limitations, to switch
> (lack of) buffer, head-of-line blocking, etc.  Until one actually does
> the diagnosis to understand what is going on, you may mitigate
> against an issue you are not having.  I have no doubt that some
> of the proposed alternatives have solved specific issues for some
> of the posters, but that may not be the issue the OP is having.
>

If he just wants to limit the bandwidth used by the file copy process
(assuming slower performance is not a problem) then the underlying cause
shouldn't *necessarily* matter so much. It seems like there should be some
equivalent of ionice for network bandwidth. I did a quick search and came
across Trickle (http://monkey.org/~marius/pages/?page=trickle), which runs
in user space. Not sure if it would work for cp, but it might be worth
investigating. There were some other more involved solutions using iptables
and tc but the simplest workable solution is usually best.

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20141223/31183613/attachment.html>


More information about the mythtv-users mailing list