[SERVER-39959] Make pooled js scope re-use time based Created: 05/Mar/19  Updated: 29/Oct/23  Resolved: 06/Mar/19

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

Type: Improvement Priority: Major - P3
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
related to SERVER-39962 Update linux baton to minimize alloca... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2019-03-11
Participants:
Linked BF Score: 0

 Description   

Current js scope reuse is based on the number of times used. I.e. a scope will be re-used 10 times, then thrown away. This is suboptimal for workloads that don't perform large scans.

Switching to a time based reuse strategy gives the same benefits as a low reuse count (limiting memory consumption and avoiding accumulating too much debris in the scopes), while improving performance for those more targeted workloads



 Comments   
Comment by Githook User [ 06/Mar/19 ]

Author:

{'name': 'Jason Carey', 'username': 'hanumantmk', 'email': 'jcarey@argv.me'}

Message: SERVER-39959 Make js scope reuse time based

Current js scope reuse is based on the number of times used. I.e. a
scope will be re-used 10 times, then thrown away. This is suboptimal for
workloads that don't perform large scans.

Switching to a time based reuse strategy gives the same benefits as a
low reuse count (limiting memory consumption and avoiding accumulating
too much debris in the scopes), while improving performance for those
more targeted workloads
Branch: master
https://github.com/mongodb/mongo/commit/a6a424f3961bec9e2311fa78a10e563d98ed2e88

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