[SERVER-82055] Investigate and fix slow bulkWrite response cursor population on mongod Created: 10/Oct/23  Updated: 29/Oct/23  Resolved: 17/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Task Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Sean Zimmerman
Resolution: Fixed Votes: 0
Labels: milestone-4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-82056 Investigate and fix slow bulkWrite ad... Closed
is related to SERVER-76662 bulkWrite perf testing against vector... Closed
is related to SERVER-82054 Investigate and fix slow bulkWrite re... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-10-30
Participants:

 Description   

According to the flame graph, about 4% of the bulkWrite operation's time is spent in populating the cursor response on mongod (when a bulkWrite with 1000 insert operations is run). When I eliminated this method (by returning an empty cursor response instead here) I saw the corresponding improvement.

Consider ways to optimize this method. And if possible, consider omitting success responses from the response and use a counter n instead, as the existing insert codepath does.

See SERVER-76662 for flame graphs.



 Comments   
Comment by Githook User [ 16/Oct/23 ]

Author:

{'name': 'seanzimm', 'email': 'sean.zimmerman@mongodb.com', 'username': 'seanzimm'}

Message: SERVER-82055: Avoid cursor data structures in bulkWrite until necessary
Branch: master
https://github.com/mongodb/mongo/commit/8ec8294b5525e138ed6d41ad5f987a62495d959c

Generated at Thu Feb 08 06:48:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.