WIP Introduce support for pinning specific analysis threads to a logical CPU core#137
WIP Introduce support for pinning specific analysis threads to a logical CPU core#137methodmissing wants to merge 1 commit intomozilla-services:mainfrom
Conversation
51a336a to
699df4b
Compare
|
I have a number of comments/questions/concerns.
|
699df4b to
3c3b9de
Compare
0f93973 to
99d6823
Compare
|
Apologies for not circling back earlier. Tracked the performance issues we've seen down to IO throttling and crufty LPEG in an input plugin which stalled the rest of the pipeline for us significantly.
Two things that would have helped with debugging (happy to PR if any makes sense):
Thoughts? |
|
Thanks for the update.
Debugging comments
|
|
Sounds great - with |
|
Having the This would produce a hindsight.cfg something like this (the plugin cfg would simply have an explicit thread specification): -- assume 4 actual CPUs
analysis_threads = 64
analysis_cpu_affinity = {[0] = 0, [62] = 3, [63] =3}
-- thread 0 on CPU0, threads 62, 63 on CPU3, analysis threads 1-61 will accept dynamically loaded
-- plugins and will run on any available CPU For the input/output plugin configuration we could add a I realize this is a lot more work, please feel free to open a feature request issue. |
References https://eli.thegreenplace.net/2016/c11-threads-affinity-and-hyperthreading/ with hyperthread behaviour seen in our environment and http://man7.org/linux/man-pages/man2/sched_setaffinity.2.html
to flesh out
cpu_affinity = truedirective in the plugin config would pin to that. Maybe that's not a great defaultThat way auxiliary / less important plugins can still migrate between remaining cores, but we guarantee resources for the most important ones.
@Shopify/moneyscale