Skip to content

Conversation

@cgwalters
Copy link
Collaborator

I saw this go by
https://www.reddit.com/r/rust/comments/v8e9fa/local_async_executors_and_why_they_should_be_the/
and I think it's a good argument why not to use the multithreaded
tokio by default.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Jun 24, 2022
Pairs with ostreedev/ostree-rs-ext#321
and bootc-dev/containers-image-proxy-rs#32

I saw https://www.reddit.com/r/rust/comments/v8e9fa/local_async_executors_and_why_they_should_be_the/
go by and I think it's a good argument why one should use single-threaded
tokio by default.

Specifically for rpm-ostree, this takes the daemon down from:

```
[root@cosa-devsh ~]# cat /proc/1759/task/*/comm
rpm-ostree
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
tokio-runtime-w
gmain
gdbus
pool-/usr/bin/r
[root@cosa-devsh ~]#
```

To:

```
[root@cosa-devsh ~]# cat /proc/1437/task/*/comm
rpm-ostree
tokio-runtime-w
gmain
gdbus
pool-/usr/bin/r
[root@cosa-devsh ~]#
```

Which seems way better.  A lot less thread stack spam in `t a a bt` in gdb
and in coredumps.
I saw this go by
https://www.reddit.com/r/rust/comments/v8e9fa/local_async_executors_and_why_they_should_be_the/
and I think it's a good argument why not to use the multithreaded
tokio by default.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters merged commit 11e0529 into bootc-dev:main Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants