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

CPU Intensive on RPi #1179

Closed
santiac89 opened this issue Aug 26, 2017 · 3 comments
Closed

CPU Intensive on RPi #1179

santiac89 opened this issue Aug 26, 2017 · 3 comments
Labels

Comments

@santiac89
Copy link

@santiac89 santiac89 commented Aug 26, 2017

What version of WebTorrent? 0.98.19

What operating system and Node.js version? OSMC 2017.07-1 and Node v8.2.1

What actually happened?

I'm working on an app to use my RPi as a Media Center and use webtorrent library to download files to later see them on my TV. My app includes an API to also be able to start torrents from the browser. What happens is that when downloading any torrent the RPi CPU goes 100% every time even if I disable all my other app features.
Is this a common behavior for a RPi downloading torrents using this library or I'm missing something?

Also, all my videos gets broken, can this be related to the stress the RPi is having?

Edit: Forgot to mention, I've configured the app to download all my files to an external USB drive. I think that this can be affecting it also.

I leave my app repo just in case https://github.com/santiac89/odin

@ojoel

This comment has been minimized.

Copy link

@ojoel ojoel commented Oct 11, 2017

How many connections? Each connection has a transfer overhead and a processing load.

@santiac89

This comment has been minimized.

Copy link
Author

@santiac89 santiac89 commented Oct 13, 2017

How many connections from where?

@stale stale bot added the stale label May 3, 2018
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 4, 2018

WebTorrent has CPU utilization issues. It has no notion of a resource queue – it tries to do everything at once, as fast as possible, which leads to lots of CPU contention.

One workaround you can try is to lower the maxConns property to the WebTorrent constructor, which will limit the number of connections to peers (and therefore the total amount of work done). More info in the docs.

Follow #903 for updates on the CPU issue.

@feross feross closed this May 4, 2018
@webtorrent webtorrent deleted a comment from stale bot May 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 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.