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

Use uvloop where available #5374

Closed
ichorid opened this issue Jun 13, 2020 · 3 comments
Closed

Use uvloop where available #5374

ichorid opened this issue Jun 13, 2020 · 3 comments

Comments

@ichorid
Copy link
Contributor

ichorid commented Jun 13, 2020

Moving to Asyncio enables us to use faster, uvloop reactor on those systems (Linux, Mac?) where available. Tests with Tribler exit nodes show that uvloop reduces CPU usage by 30% while also improving memory usage. This is especially important for low-tier platforms, such as ARM.

Enabling it is a matter of literally two lines of code:

import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

for systems with older uvloop version (e.g. Debian) or

import uvloop
uvloop.install()

for everything else.

@synctext
Copy link
Member

interesting. We need this indeed to build our community of users. Given the facinating findings of our bug reporter. Let's edit the next 7.6 milestone. "Amazing stability" as the first keywords of that release. No big changes for now, perfect tuning like this.

@devos50
Copy link
Contributor

devos50 commented Oct 5, 2021

I would recommend to look into this once our application tester is stable again. Then we can more easily test for unexpected behaviour/edge cases.

@qstokkink
Copy link
Contributor

We will not include uvloop. Our network activity that requires high throughput has now been implemented in Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants