Redox OS Unlocks Faster VM Performance, "Slightly Faster" Than Linux In Some Benchmarks

Written by Michael Larabel in Operating Systems on 4 September 2024 at 02:12 PM EDT. 31 Comments
OPERATING SYSTEMS
The Rust-written Redox OS open-source operating system has managed to address a performance bottleneck allowing this platform to perform much faster now when running as a virtual machine (VM) and for some synthetic benchmarks even able to run "slightly faster" than Linux.

The Redox OS project published their August 2024 status report. Arguably most exciting from there is their work on achieving greater VM performance. Due to a "huge bottleneck" in their context switching code around reading system time, their VM performance is now much faster although no speed-ups for running Redox OS on bare metal hardware.

No benchmark numbers were provided at this time but they are talking up big gains as well as increased competitiveness to Linux when running within a VM. The August 2024 report states:
"Thanks to the recent kernel proflling implementation, 4lDO2 discovered that a huge bottleneck in the context switching code, was simply reading the system time. That involves reading hardware registers from the HPET, which although reasonably fast on real hardware, is particularly slow on VMs as it requires expensive VM exits. This cost is now avoided by using the TSC using KVM’s paravirtualized system time API, resulting in a massive speedup.

Thus all system tasks have a much better performance now, from more IO throughput to network speed. We are doing benchmarks to determine the scale of this improvement.
...
Running in a VM, Redox is now becoming slightly faster than Linux at certain synthetic benchmarks, for example the same-core context switch latency when using POSIX pipes (tested with mitigations=off). More exciting optimizations are coming, both to reduce context switch overhead further towards the hardware limit, and to reduce unnecessary context switches overall."

It looks like I'll need to work on some Redox OS VM benchmarking soon...

Redox OS on a laptop


Redox OS has also seen increased testing recently, continued work toward POSIX-compatible paths, better Relibc support for its libc implementation, more programs running on Redox OS, and build system improvements. There are also documentation additions and other work over the past month.

More details on the Redox OS efforts during the month of August can be found via the Redox-OS.org blog.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week