Theseus
Theseus copied to clipboard
Add a benchmarking mode
Currently, benchmarking fundamental subsystems (e.g. the task subsystem) is hard. It'd be nice to have a configuration option to run a benchmarking application rather than the shell at startup. The mode would minimise the number of tasks spawned before the benchmark is run, improving the accuracy of benchmarks.
Ideally, there'd also be some automation to repeat benchmark runs, calculating averages, standard deviations, etc.
Which of the subsystems are fundamental? Is it all the crates in the kernel directory?
I think flamegraph seems like a good choice of benchmarking tool. It can help us see at a glance where performance bottlenecks exist in the OS. Do you agree with my recommendation?
Which of the subsystems are fundamental? Is it all the crates in the kernel directory?
Mostly just the task subsystem. It's hard to test because everything is a task, and so any tasks not relevant to the benchmark impact the benchmark. For example, in #759 the benchmark tasks have to be pinned to core 3 so that they don't yield to the shell
task.
I think flamegraph seems like a good choice of benchmarking tool. It can help us see at a glance where performance bottlenecks exist in the OS. Do you agree with my recommendation?
Flamegraph relies on perf
or dtrace
depending on the OS, neither of which are available on Theseus. Porting them would be non-trivial.
I found another benchmarker: bencher. It seems to be very lightweight with minimal dependencies (if any at all). Would this be a good choice?