Skip to content
Snippets Groups Projects
Commit 5f91ee6e authored by Ribbon's avatar Ribbon :speech_balloon:
Browse files

Apply 3 suggestion(s) to 1 file(s)

parent d46e5a5d
No related branches found
No related tags found
1 merge request!407Add the August 2024 report
Pipeline #15967 failed
This commit is part of merge request !407. Comments created here will be created in the context of that merge request.
...@@ -16,13 +16,13 @@ If you would like to support Redox, please consider donating or buying some merc ...@@ -16,13 +16,13 @@ If you would like to support Redox, please consider donating or buying some merc
## Massive Performance Improvement On Virtual Machines ## Massive Performance Improvement On Virtual Machines
Thanks to the recent kernel profilling implementation 4lDO2 discovered that the system time was triggering a context switch to get the host system time per second and sync, causing a big bottleneck in all tasks of the system. This context switch was disabled by using paravirtualization on [TSC](https://en.wikipedia.org/wiki/Time_Stamp_Counter) using [KVM](https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine). 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](https://en.wikipedia.org/wiki/Time_Stamp_Counter) using [KVM's](https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine) 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 making benchmarks to determine the scale of this improvement. Thus all system tasks have a much better performance now, from more IO throughput to network speed. We are making benchmarks to determine the scale of this improvement.
This improvement is not applicable to Redox running on real hardware, however. This improvement is unfortunately not applicable for Redox running on real hardware. However, most recent CPUs support an *invariant TSC*, in which case the logic would be very similar to the paravirtualized logic, after the frequency has been determined at boot time by calibration. This will be implemented in the future, but for now, the real HPET is reasonably fast.
Redox is becoming faster than Linux in some virtual machine workloads (with all exploit mitigations disabled, apples-to-apples comparison), more exciting optimizations are coming. 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.
## Testing Redox ## Testing Redox
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment