[SERVER-74876] Evaluate which immer memory policy to use Created: 15/Mar/23  Updated: 18/Jan/24  Resolved: 29/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0, 5.0.25, 6.0.14

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: lib-immer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Assigned Teams:
Storage Execution
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0, v5.0
Sprint: Execution Team 2023-03-20, Execution Team 2023-04-03
Participants:

 Description   

By default it looks like immer is using reference counting, a memory allocator with an internal free list and a spinlock for locking.

We should probably not use a free list and let tcmalloc handle free'd memory efficiently. We should investigate what the lock is used for and determine what is the correct lock primitive for our needs.



 Comments   
Comment by Githook User [ 18/Jan/24 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-74876 Set memory_policy for containers backed by immer library

(cherry picked from commit 060e4839b6f44abfedb3cd38d836095df73a7ade)

GitOrigin-RevId: 63dc63ba0013e26ff678cf0b49f3ece7e7199eda
Branch: v5.0
https://github.com/mongodb/mongo/commit/e402d246796b8030782ad4bfeef98ce4ea49e1c3

Comment by Githook User [ 17/Jan/24 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-74876 Set memory_policy for containers backed by immer library

(cherry picked from commit 060e4839b6f44abfedb3cd38d836095df73a7ade)

GitOrigin-RevId: f13ee1e523a8d497f08d104f92c340956e1d2ad9
Branch: v6.0
https://github.com/mongodb/mongo/commit/286bec3f314b0e19bf1076c389106d90d1a4f4f7

Comment by Githook User [ 29/Mar/23 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-74876 Set memory_policy for containers backed by immer library
Branch: master
https://github.com/mongodb/mongo/commit/060e4839b6f44abfedb3cd38d836095df73a7ade

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