[SERVER-80296] Refactor command request processing path to reduce BSON parsing passes Created: 21/Aug/23 Updated: 01/Feb/24 Resolved: 01/Feb/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Alex Li |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | perf, perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-poc, perf-tiger-project-candidates, perf-tiger-q4, perf-tiger-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Service Arch 2023-10-02, Service Arch 2023-10-16, Service Arch 2023-10-30, Service Arch 2023-11-13, Service Arch 2023-11-27, Service Arch 2023-12-11, Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
There are several calls to BSONObj::getField that are made by functions called by ExecCommandDatabase::_initiateCommand and ExecCommandDatabase::run. They come from the following places:
Additionally, there are two manual loops over BSONOjb fields:
Finally, we invoke 2 IDL parser in addition to the one for the command
Example of the request fields that can be consolidated in an IDL definition:
Note: There may be opportunity to align with the request fields defined in src/mongo/idl/generic_argument.idl. On the other hand, a more narrow parser for this error handling will be better then a wider parser handling all generic request fields. POC: https://github.com/markbenvenuto/mongo/tree/tiger_perf_bson |
| Comments |
| Comment by Githook User [ 01/Feb/24 ] |
|
Author: {'name': 'Alex Li', 'email': '98560274+lia394126@users.noreply.github.com', 'username': 'lia394126'}Message: GitOrigin-RevId: ee00ae5a48ea5261b342241d770f3d05c284fc88 |
| Comment by Mark Benvenuto [ 11/Sep/23 ] |
|
blake.oler@mongodb.com Benchmarking with POC is in PERF-4537 |
| Comment by Blake Oler [ 29/Aug/23 ] |
|
mark.benvenuto@mongodb.com have you done any benchmarking to show performance gains here, or is this just a theoretical gain at the moment? |