These are chat archives for anacrolix/torrent

13th
Apr 2018
deranjer
@deranjer
Apr 13 2018 00:55
@anacrolix Exactly how much bandwidth should adding each torrent in take up? I'm testing my software and when I start it up from stop, it is adding (currently) 60 torrents in at once from the database, and it completely drops my internet for at least 20 seconds...
Matt Joiner
@anacrolix
Apr 13 2018 02:17
@elgatito I'll take a look at that soon. @deranjer You're probably getting a storm of activity, DHT, and dialling peers in particular. are you also setting priorities upon adding those torrents?
deranjer
@deranjer
Apr 13 2018 02:36

@anacrolix Yes, I am doing that as well... I am also noticing that when I am running I get a few slowdowns and dropout on my network in general that seem to clear up after stopping goTorrent. Also every 4 seconds I am running a bunch of commands on the torrents to get the stats for the client as well.

Here are the commands I am running when starting goTorrent: https://github.com/deranjer/goTorrent/blob/master/engine/engine.go#L191
And here is the loop I am running every 4 seconds or so: https://github.com/deranjer/goTorrent/blob/master/engine/engine.go#L234

Matt Joiner
@anacrolix
Apr 13 2018 02:37
you can't stream on-demand? that will significantly reduce your network overhead. also global connection limit will help you too. are you adjusting your ulimit to cope with so many connections?
i'm not sure it was entirely completed: anacrolix/torrent#55. have you run some profiling to identify any problem areas?
deranjer
@deranjer
Apr 13 2018 02:41
Not sure how that would work.. when goTorrent starts up it has to re-add ALL of the user defined priorities for EVERY file so when it starts downloading again, otherwise bad user experience.. even if "completed" if I don't set the file prio it will start downloading files the user DID NOT want downloaded but still have loaded in the client... But not sure how streaming on-demand would work.
I will need to look into ulimit, haven't checked that yet!
Matt Joiner
@anacrolix
Apr 13 2018 02:42
the client shouldn't download anything until you set the priorities. i think you need to avoid using downloadall, it just causes you problems. also a lot of clients have a limit on concurrent active torrents, you might want to try queuing the rest?
deranjer
@deranjer
Apr 13 2018 02:43
Okay, but thought I had to use downloadall since I wanted file priorities, not piece priorities..
Matt Joiner
@anacrolix
Apr 13 2018 02:44
no. download all uses piece priorities. its' only there for backward compatibility. don't use it in conjunction with files priorities
deranjer
@deranjer
Apr 13 2018 02:45
Okay, thank you I will research this more.. can you also point me to more documentation on ulimit? I don't see it in godoc...
Matt Joiner
@anacrolix
Apr 13 2018 02:54
it's a unix thing, i guess you're not on a platform that needs it
or you'd have already hit teh limit
deranjer
@deranjer
Apr 13 2018 02:56
most of my testing is on windows, but I can do a ulimit on my linux test box, trying to keep it all as platform independent as possible.
Matt Joiner
@anacrolix
Apr 13 2018 07:04
@elgatito well spotted, I have a fix for it.
Denis
@elgatito
Apr 13 2018 08:22
... ListenHost: 0.0.0.0, ListenPort: 0
Error creating bit client: &errors.errorString{s:"subsequent listen: listen tcp6: address 0.0.0.0: no suitable address found"}
have to understand new addr/port settings..
Denis
@elgatito
Apr 13 2018 08:31
how should it look like to make auto assign? (like with 0.0.0.0:0) ?
Matt Joiner
@anacrolix
Apr 13 2018 10:04
Ah, that isn't valid for IPv6, try using an empty string