# linux: Spawn at least two background threads \(\#44110\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9db0d662518c0c56547e1330d4cd63ab86c8355e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9db0d662518c0c56547e1330d4cd63ab86c8355e

Requested commit: 9db0d662518c0c56547e1330d4cd63ab86c8355e

Commit: 9db0d662518c0c56547e1330d4cd63ab86c8355e

Tree: 875eec1a7b2cb164ee33ffd68578ab72531abb01

Author: Agus Zubiaga

Committer: GitHub

## Message

```
linux: Spawn at least two background threads (#44110)

Related to https://github.com/zed-industries/zed/pull/44109,
https://github.com/zed-industries/zed/issues/43884,
https://github.com/zed-industries/zed/issues/43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A
```

## Parents

- [b07389d9f3b1e1c2cf5c275302438061d372a226](https://git.cafe/gitcafe/zed/commit/b07389d9f3b1e1c2cf5c275302438061d372a226?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9db0d662518c0c56547e1330d4cd63ab86c8355e?format=markdown)
