3 ms·
Have you benchmarked MPSC-per-core and SPSC-per-pair-of-cores against any of the three concurrent queues in the article?
by jbapple 10y ago
Have you benchmarked MPSC-per-core and SPSC-per-pair-of-cores against any of the three concurrent queues in the article?
- arielweisberg 10y agoI haven't benchmarked them comparatively, but when I benchmarked and profiled VoltDB there was very little time spent on CAS failures according to flight recorder. It could be the profiler is a wrong so maybe instrumenting makes more sense just to fully prove the point. A single queue is only being asked to handle low hundreds of thousands of events per second which isn't that much. This occurs because there is substantial (for some definition of substantial) work associated with each task. If you are looking up a value in a hash map then yes it matters, but if you are doing something more substantial it doesn't matter. The research is definitely interesting and it solves real world problems, but I don't think you necessarily need to move to groups of input task queues directly. If you look at the graph it's at five million operations/second and 1 CAS with two threads. If you aren't going to push more than 1 million ops through a single queue/core I think you will be fine.