nighthawk
nighthawk copied to clipboard
Run main thread and the flush worker on a distinct dedicated core
In PR https://github.com/envoyproxy/nighthawk/pull/437, we add a flush worker to periodically (every ~5 second) flush NH metrics to configured Sinks. As @oschaaf discussed in the PR, it is better to combine the main thread and the flush worker on a distinct dedicated core:
- this makes sure that the workers responsible for generating load won't be disturbed
- cpu consumption will be easily observable as spikes won't jump from core to core. chances of problematic behaviour slipping by unnoticed will be drastically lower.
Currently we don't do anything special for the main thread (which pretty much idle during load generation).
If we do this, it might be worth to reformulate this as offering a way to let NH's client use a dedicated core for relatively heavy-lifting tasks, if the luxury of a dedicated cpu core for that is an option