[SERVER-61996] Improve performance of DocumentStorage::appendField Created: 11/Dec/21  Updated: 29/Oct/23  Resolved: 22/Dec/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0, 5.2.1

Type: Bug Priority: Major - P3
Reporter: Henrik Edin Assignee: Dan Larkin-York
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.2
Sprint: Execution Team 2021-12-27
Participants:
Linked BF Score: 15

 Description   

Some tsbs_query workloads such as high-cpu-all spend a lot of time in bucket unpacking. Timeseries bucket compression made this slower but the slowest part of bucket unpacking is DocumentStorage::appendField where around 25% of CPU time is spent.

We should look into how we can make this faster. At least not re-hash the same field name over and over again.



 Comments   
Comment by Githook User [ 20/Jan/22 ]

Author:

{'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}

Message: SERVER-61996 Reserve memory for MutableDocument in BucketUnpacker::getNext()
Branch: v5.2
https://github.com/mongodb/mongo/commit/cbb0c786e336f837085795bb0469b47f3f029398

Comment by Dan Larkin-York [ 04/Jan/22 ]

jonathan.streets I didn't notice the sys-perf-5.2 tag. Yes, this will need to be backported.

Comment by Githook User [ 22/Dec/21 ]

Author:

{'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}

Message: SERVER-61996 Reserve memory for MutableDocument in BucketUnpacker::getNext()
Branch: master
https://github.com/mongodb/mongo/commit/d269dd586a99b2e6c05710543c66f958afa7ffe4

Generated at Thu Feb 08 05:53:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.