mafintosh / peerflix

Streaming torrent client for node.js
MIT License
6.19k stars 672 forks source link

Unstable Network Rate #49

Open patriceperez opened 10 years ago

patriceperez commented 10 years ago

I am experiencing bandwidth drops every 15 seconds (14-16 seconds). while runnig a regular torrent client i am running stable.

Machine Specs: -- Windows 7 x64 -- Ethernet connection -- 100 Mbps bandwidth connnection

capture

mafintosh commented 10 years ago

This is probably because of network flooding. Could you try again and lower your connection count using --connection 30?

kas84 commented 10 years ago

What about download and upload limits? That feature would be awesome!

Xstasy commented 10 years ago

+1 for upload/download limits

patriceperez commented 10 years ago

@mafintosh sorry for the delay - I am currently out of the country so i cant check at the moment, but isnt the default number of connections capped at 30?

mafintosh commented 10 years ago

@patriceperez It does some weird thing right now where the default is dependent on the number of cpu cores. Usually (cores > 1) this mean using 100 connections.

patriceperez commented 10 years ago

@mafintosh The thing is the issue is happening on several machines - one with dual-core and one with hexa-core. I should get back soon so I will check with your suggestion

mafintosh commented 10 years ago

The logic is cores > 1 ? 100 : 30 so then you're using 100 connections on both your machines. We should probably just lower the default. I'm pretty sure that is what is causing your problem.

patriceperez commented 10 years ago

got it - is that a limitation? since on a torrent client i get 1000 connections no problem

mafintosh commented 10 years ago

Normal torrent clients are probably a lot more robust in this sense right now :) At some point torrent-stream (the peerflix engine) should be able to handle this kind of thing better.

patriceperez commented 10 years ago

I would love to get into the project, however my JS knowledge is somewhat lacking at this point... will try to resolve bugs where i can for starters :smile:

kas84 commented 10 years ago

I didn't dive too much into my issue but I think my problem is my router can't handle so many connections. When I try to get to my router's webserver interface I get a lot of Bad Requests errors. And I believe that's what many people are experiencing...

patriceperez commented 10 years ago

I am sorry for the delay, i tried with --connections 30 and no difference network

Although I noticed that console is updating 10 time in succession, and when the console is "frozen" - so is the download... the script doesnt accept termination signals while being frozen... which is alarming

the only interesting mention of this number was in these under the index.js file