[SERVER-74558] Profile whether the memory usage check in the $percentile accumulator is a problem Created: 02/Mar/23  Updated: 27/Oct/23  Resolved: 13/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Backlog - Query Integration
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-74801 Complete TODO listed in SERVER-74558 Closed
Assigned Teams:
Query Integration
Participants:

 Description   

Currently, the check is done on each input, which isn't really necessary as all our memory usage is a "best effort" estimation and the limits are usually in terms of MB while the changes in usage are likely to be in bytes.

If asking for memory usage shows up in profiles, consider:

  1. doing it less frequently
  2. reporting the memory stats from the "incorporate" calls (and do whatever optimizations possible on the side of the algorithm implementation)


 Comments   
Comment by Irina Yatsenko (Inactive) [ 13/Mar/23 ]

I don't think it's going to be a problem. The early profiling on a collection with 1e7 documents shows:

0.12%     0.12%  mongod              [.] mongo::TDigest::memUsageBytes

I'm going to close this ticket on the assumption that as we finalize the accumulator and keep profiling it, if the memory check becomes more prominent, we'd notice.

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