Is it normal for rust to only compile on every second CPU thread?

So I was installing cargo-edit, and when it was compiling it I got bored and opened htop and saw that only even numbered threads are doing most of the work as seen in the screenshot below

I'm not really bothered by it but I just got curious so I decided to ask

Well yes, totally. Not everything in a dependency graph can be parallelized, only those crates which do not depend on each other can be built in parallel. If there are fewer such crates than CPUs/cores, then you won't see all CPUs being used.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.