Sioro-Neoku / go-peerflix

Go Peerflix
MIT License
470 stars 119 forks source link

Peerflix (well anacrolix torrent client actually) kills my TV STB stream #11

Closed CrazyLemon closed 8 years ago

CrazyLemon commented 8 years ago

So i opened this issue in case someone else wonders why TV isn't working when you run go-peerflix. The issue is too many connections (default 80) are made and modem (provided by the ISP) can't handle that many connections (in my case) and the result is that TV stream stops working.

Sioro-Neoku commented 8 years ago

Try this, it should help: https://github.com/Sioro-Neoku/go-peerflix/pull/13

CrazyLemon commented 8 years ago

During my testing of this issue i already disabled seed with "-seed false" argument. And i also tried and set connections to 40 and it does not kill the stream afterwards. So yeah, i'm just gonna use modified anacrolix torrent client for peerflix.

anacrolix commented 8 years ago

You could lodge an issue upstream to make this configurable.

anacrolix commented 8 years ago

Out of interest, have you tried this with TCP disabled? One of the claimed advantages for uTP is that this shouldn't be an issue for the circumstance you described.

CrazyLemon commented 8 years ago

I did not. How would i do that? If you mean disabling tcp on my eth adapter i'm not sure i want that :)

Sioro-Neoku commented 8 years ago

Basically this branch: https://github.com/Sioro-Neoku/go-peerflix/tree/disable-tcp

(Have not tried it myself.)

anacrolix commented 8 years ago

You could add DisableTCP: true, here https://github.com/Sioro-Neoku/go-peerflix/blob/dba525fda9c39c83b7f043854913e7765ac7b6f9/client.go#L52

CrazyLemon commented 8 years ago

So i did try it with https://github.com/Sioro-Neoku/go-peerflix/commit/3df88b535252d9170d8e082e89fa25b33d76640e and with https://github.com/anacrolix/torrent/blob/master/client.go#L91 (i did change that to 40 in my previous build) and it seems to work. I was watching traffic with nethogs and on openwrt router. Nethogs did not detect any traffic (so tcp was disabled). Max number of connections was 80 while testing with 2 different torrents. The speed was jumping non stop but the TV did not have any issues. Well one minor, switching channels felt slower than usual.

Sioro-Neoku commented 8 years ago

I'll add a flag to disable tcp from the command line.

Sioro-Neoku commented 8 years ago

@CrazyLemon https://github.com/Sioro-Neoku/go-peerflix/pull/17 does this look good for you?

CrazyLemon commented 8 years ago

@Sioro-Neoku I have absolutely no clue about Go so i can't really say anything definitively :) But i did try and build #17 and no luck. I tried -tcp false and -tcp "false" i can still see traffic using nethogs (tcp traffic only).

---edit-- I forgot something so nevermind for the comment above.. will try something and reply back after i test.

anacrolix commented 8 years ago

DisableTCP won't disable TCP for other sources, like HTTP trackers, although you should see very little traffic for those.

CrazyLemon commented 8 years ago

@Sioro-Neoku nope.. #17 does not work for me. I launched it again with updated repos. Tried -tcp false and -tcp "false" with no luck. I can see tcp traffic but i can't see number of connections in your tcp-bool branch. Did you try it? I'm running a build from master and the number of connections is also missing. Just fyi.