Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webseed download speed not reported #1006

Closed
vankasteelj opened this issue Jan 1, 2017 · 17 comments
Closed

webseed download speed not reported #1006

vankasteelj opened this issue Jan 1, 2017 · 17 comments

Comments

@vankasteelj
Copy link

@vankasteelj vankasteelj commented Jan 1, 2017

Webseed download is considered "unverified", I believe. Because if I make my own downloadSpeed method, based on client.received instead of client.downloaded, I get the actual information. Note that Windows is registering the speed too.

The first issue: Is this a desired behavior? I somewhat doubt it, because qbittorrent, for example, does account that webseed speed. And also: it does download things, yet it isnt registered by the downloadSpeed. Note that this happens in webtorrent-desktop too.

The second issue is more like a real bug, apparently : when I try to load my torrent, it starts downloading, but it does a rangerError loop and make the browser crash. See the error trace:
nw_2017-01-02_00-22-16
Note that this doesnt happen in webtorrent-desktop, it does do weird things but doesn't crash. Maybe it's dumping unverified bytes without writing them?

The (copyright-free) torrent I'm using, for reference.

  • WebTorrent version: 0.98
  • Node.js version: 7.1.0
  • Browser name/version (if using WebTorrent in the browser): nwjs 18.6
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 29, 2017

Re: RangeError: Array buffer allocation failed

Are you on a 32-bit system, or compiling your NW.js app as a 32-bit app? This issue could be caused by that, and lots of users ran into this exact error in WebTorrent Desktop before we switched to providing both 32-bit and 64-bit installers. See #895 (comment)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 29, 2017

Re: web seed download speed

We use the total downloaded bytes to determine the download speed, you can see that here: https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L916-L917 No idea why you're seeing the behavior you describe. Maybe it's related to the exception you're getting ("RangeError: Array buffer allocation failed")?

@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 29, 2017

We use the total downloaded bytes to determine the download speed

That's still for torrent, not for the client. Torrent is reporting wrong information, client is getting it right

Are you on a 32-bit system, or compiling your NW.js app as a 32-bit app?

Yes, a 32-bit app. But does it mean a PC with less than 4GB of ram won't be able to use webseeds?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 29, 2017

That's still for torrent, not for the client. Torrent is reporting wrong information, client is getting it right

I don't understand how that's possible. Look at the code: https://github.com/feross/webtorrent/blob/master/lib/torrent.js#L916-L918 We add the same downloaded amount to both the torrent and client's speed.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 29, 2017

Yes, a 32-bit app. But does it mean a PC with less than 4GB of ram won't be able to use webseeds?

The amount of RAM in the system isn't the issue. Virtual memory backed by disk exists. The issue is that 32-bit apps don't have enough address space to refer to memory beyond 2GB. Normally WebTorrent shouldn't ever allocate that much RAM, but it can sometimes burst above that amount for brief times especially when downloading fast or with many torrents.

There's not an easy way to ensure that systems with low memory won't run out. WebTorrent will operate normally until it tries to allocate memory and it suddenly fails. At that point the app will be in an indeterminate state and it's not clear how to recover.

You should really offer a 64-bit version of your app, since 95% of users have 64-bit systems these days. See real-world stats in the issue I linked.

@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 29, 2017

webseeds on that torrent were maxing out my connection, yes, somewhere near 35-40mbps

@ROBERT-MCDOWELL

This comment has been minimized.

Copy link

@ROBERT-MCDOWELL ROBERT-MCDOWELL commented Jan 30, 2017

these real-world stats are faked, like browsers stats. it's not true. For example, major of countries still are using internet under 128Kb and a 32bit tablet or computers.

@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 30, 2017

yes but with 128kbps Internet, they don't have a need for webtorrent, and if they do decide to allocate 100% of their brandwidth for downloading torrents, they still won't max out their ram due to an important amount of data flowing through P2P. So I think it doesnt matter.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 31, 2017

@madovsky Steam is not faking their stats. Please don't make pointless accusations without any proof. http://store.steampowered.com/hwsurvey

@feross feross closed this Jan 31, 2017
@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 31, 2017

eeeerrrrrr! I still encounter the speed issue

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 31, 2017

@vankasteelj I can't reproduce the issue. Not sure what I else I can do. If you can locate the bug, let's fix it. Can you add console.logs to your program to see what the values for torrent.downloadSpeed and client.downloadSpeed are at different points in time.

@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 31, 2017

that's what I did before opening this ticket^^

if I make my own downloadSpeed method, based on client.received instead of client.downloaded, I get the actual information

reproducable on webtorrent-desktop too, with the torrent linked above: open it, it will load the video, but say 0.01kbps or so, while it's actually going several mb per second (through webseeds)

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 31, 2017

@vankasteelj The torrent link 404s for me now.

@ROBERT-MCDOWELL

This comment has been minimized.

Copy link

@ROBERT-MCDOWELL ROBERT-MCDOWELL commented Jan 31, 2017

well feross, first of all, you should accept different opinion in a real open source community.
secondly, who is valve corporation who own Steam?
https://en.wikipedia.org/wiki/Valve_Corporation
and third, that's not because you sold one of your project millions to yahoo that you must not respect developers here.
do you have any proof that Steam publishes real stats?
nevermind, you can close my comment another time, I don't care

@vankasteelj

This comment has been minimized.

Copy link
Author

@vankasteelj vankasteelj commented Jan 31, 2017

I consider the bug as reported, feel free to take it into account or not.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 1, 2017

@vankasteelj Thanks for reporting. Sorry we couldn't get this figured out. If you find another link to the torrent file that demonstrates the issue, please share.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.