These are chat archives for anacrolix/torrent

11th
Jul 2018
Matt Joiner
@anacrolix
Jul 11 2018 03:07
@elgatito thanks
i just found a big performance issue in DHT
Matt Joiner
@anacrolix
Jul 11 2018 03:13
causes it to freeze up for long periods of time with newly added torrents
you have removed setProxyUrl which was adding a transport if proxyurl was passed
it's not trackers' requests
Matt Joiner
@anacrolix
Jul 11 2018 04:46
ok, is it still there for peers tho?
i'll fix that
Denis
@elgatito
Jul 11 2018 04:47
yes, peers are using proxyurl as it is
we were just adding a transport for httpClient
Matt Joiner
@anacrolix
Jul 11 2018 04:51
i think i'd prefer to have the tracker proxy set seperately
i might change teh ClientConfig.HTTP name to reflect that it's the tracker client
Denis
@elgatito
Jul 11 2018 04:53
sounds reasonable
Matt Joiner
@anacrolix
Jul 11 2018 04:53
alternatively, a NewDefaultClientConfigWithProxy but that's a bit lame
the reason i don't like hte SetProxyURL is it sets the url in 2 places (once in the tracker client, and the other is ok). if you provide your own tracker client, it will clobber anything you did
Denis
@elgatito
Jul 11 2018 04:55
or you can make SetProxyUrl exported
or split or something else )
Matt Joiner
@anacrolix
Jul 11 2018 04:55
yeah but it still has that problem
i think it's better just to modify the HTTP field directly, and i'll rename it to reflect that it's specifically for trackers
Denis
@elgatito
Jul 11 2018 04:57
up to you, fine to split proxy setters for httpClient and listeners
Matt Joiner
@anacrolix
Jul 11 2018 05:06
"go.torrent dev 20150624"
damn, that's old
Denis
@elgatito
Jul 11 2018 05:10
that is from where?
Matt Joiner
@anacrolix
Jul 11 2018 05:11
it's teh extended handshake message version string we send
i mean really i doubt anybody has ever acted on it, but peers might change behaviour if they know of bugs or something
they'd probably tell me if they cared
Denis
@elgatito
Jul 11 2018 05:11
:)
Matt Joiner
@anacrolix
Jul 11 2018 05:11
:P
ok i pushed the clarification on proxy
i renamed it to fit my naming scheme, and removed old references
Denis
@elgatito
Jul 11 2018 05:14
ok, so I should set modify http client on my side before initiating client, right?
Matt Joiner
@anacrolix
Jul 11 2018 05:17
yes
altho it'll still work, it'd be a race condition if you had trackers running and modified the client at the same time
altho not a very bad one
there's an issue with some changes i made to extended messages atm, just working through it, came up in my production
Denis
@elgatito
Jul 11 2018 05:20
proxy is now working fine, both with trackers and networking. thanks
Matt Joiner
@anacrolix
Jul 11 2018 05:20
ok great
have u tested if utp works through proxy? or does it get ignored?
coz i wired it up but i have no idea how that even works
Denis
@elgatito
Jul 11 2018 05:22
"utpMultiMsgRecvs": 0,
"utpNonUtpPacketsDropped": 0,
"utpSingleMsgRecvs": 0,
"utpSocketNonUtpPacketsReceived": 0,
"utpSocketUtpPacketsReceived": 0
Matt Joiner
@anacrolix
Jul 11 2018 05:23
i suppose that answers it
Denis
@elgatito
Jul 11 2018 05:23
i'm not sure my proxy is allowing utp traffic)
Matt Joiner
@anacrolix
Jul 11 2018 05:23
it'll just look like udp
but i think traditional proxies don't do udp
socks i think it was yeah?
Denis
@elgatito
Jul 11 2018 05:23
I have cnfigured dummy socks5 proxy
Matt Joiner
@anacrolix
Jul 11 2018 05:23
ah ok
i guess if someone needs it we'll hear about it :P
Denis
@elgatito
Jul 11 2018 05:24
sure
mem  := buffer.New(32*1024)
file := buffer.NewFile(100*1024*1024, someFileObj)) // you'll need to manage Open(), Close() and Delete someFileObj

// Buffer composed of 32KB of memory, and 100MB of file.
buf := buffer.NewMulti(mem, file)
Denis
@elgatito
Jul 11 2018 10:51
all that looks too much overcomplicated...
Matt Joiner
@anacrolix
Jul 11 2018 11:50
it's not really what i think we need either
what we want is write-combining
the recent request strategy changes will mean that data should arrive in roughly disk order, so some minor memory overhead should allow merging writes
i'll roll something by hand, i don't think it will be too difficult, i just need some good performance feedback from people on windows/android etc.
Denis
@elgatito
Jul 11 2018 14:58
i'm testing on my windows desktop, with wired 100mb connection
writing to the disk, waiting for a minute or so - https://paste.ubuntu.com/p/39S4cQRyBb/
speed about 10-50kb/s
Denis
@elgatito
Jul 11 2018 15:05
same torrent, after restart, about 400kb/s - https://paste.ubuntu.com/p/9BdhQhyWFw/
wow
github.com/anacrolix/torrent.(*Torrent).writeChunk/success        9m36.4429404s     2667   0s          216.139085ms   36.2446743s
just to be sure, switched to memory storage and getting 5MB/s easily
now I have a test host :)
Denis
@elgatito
Jul 11 2018 15:15
one more disk storage - https://paste.ubuntu.com/p/3GBWc292z8/
strange that every second I update debug page - the "max" is increased by 1 second, like one perf counter is stale
Matt Joiner
@anacrolix
Jul 11 2018 22:17
Okay this is great feedback
The max writeChunk counter?
Matt Joiner
@anacrolix
Jul 11 2018 22:53
On Windows I'm certain the cost overhead is mainly OpenFile
if you profile you could confirm that