Process spawning performance in Rust | Kobzol’s blog
As part of my PhD studies, I’m working on a distributed task runtime called HyperQueue. Its goal is to provide an ergonomic and efficient way to execute task graphs on High-Performance Computing (HPC) distributed clusters, and one of its duties is to be able to spawn a large amount of Linux processes efficiently. HyperQueue is of course written in Rust1, and it uses the standard library’s Command API to spawn processes2. When I was benchmarking how quickly it can spawn processes on an HPC cluster, I found a few surprising performance bottlenecks, which I will describe in this post. Even though most of these bottlenecks are only significant if you literally spawn thousands of processes per second, which is not a very common use-case, I think that it’s still interesting to understand what causes them. Note that this is a rather complex topic, and I’m not sure if I understand all the implications of the various Linux syscalls that I talk about in this post. If you find something that I go
As part of my PhD studies, I’m working on a distributed task runtime called HyperQueue . Its goal is to provide an ergonomic and efficient way to execute task graphs on High-Performance Computing (HPC) distributed clusters, and one of its duties is to be able to spawn a large amount of Linux processes efficiently. HyperQueue is of course written in Rust 1 , and it uses the standard library’s Command API to spawn processes 2 . When I was benchmarking how quickly it can spawn processes on an HPC cluster, I found a few surprising performance bottlenecks, which I will describe in this post. Even t
related reading
- Writing an OS in Rustos.phil-opp.com
- Spinlocks Considered Harmfulmatklad.github.io
- Async Rust Is A Bad Languagebitbashing.io
- Using Threads to Run Code Simultaneously - The Rust Programming Languagedoc.rust-lang.org
- Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Danceprobablydance.com
- async/await on embedded Rust - Ferrous Systemsferrous-systems.com
- (Quite) A Few Words About Asyncyoric.github.io
- A Concurrency Cost Hierarchytravisdowns.github.io
- Introduction - Asynchronous Programming in Rustrust-lang.github.io
- How (and why) we rewrote our production C++ frontend infrastructure in Rustblog.nearlyfreespeech.net
- (Re)writing an interpreter in Rust – Danny van Kootendannyvankooten.com
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org