-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Product Performance
-
ALL
-
Hi,
I've been studying the mongodb scaling impact on a high core count machines. I've observed that the server doesn't scale linearly once it crosses 20 threads. This was tested against Mongodb v5.0.3 and YCSB client (readonly tests). Here is my observation,
Clients/Threads | 1 | 2 | 4 | 8 | 10 | 20 | 30 | 40 | 80 |
Throughput per thread | 1.00 | 0.99 | 0.98 | 0.94 | 0.94 | 0.80 | 0.59 | 0.43 | 0.19 |
First row is self-explanatory. The second row show per thread throughput over single thread throughput. Also see the attachment showing the graph. In order to understand the issue, I collected some off-cpu data events. This data showed a lock/pause is the cause of scaling issue in two functions, viz. 1) mongo::ServiceContext::makeOperationContext() and 2) mongo::ServiceContext::__delistOperation(). I've also attached flamegraph showing these bottlenecks.
Unfortunately, I can't contribute to the project with actual code-contribution due to restrictions on my side but I can submit the issues hence this report. I'm hoping someone from the mongodb community will take a look at this issue and provide a solution.
I hope this helps as a a good starting point for further analysis.