Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump gc threshold #3908

Merged
merged 4 commits into from
Jul 9, 2024
Merged

bump gc threshold #3908

merged 4 commits into from
Jul 9, 2024

Conversation

jasonwilliams
Copy link
Member

@jasonwilliams jasonwilliams commented Jul 9, 2024

As mentioned in #3896, Boa's GC threshold is set too low. This was causing too many GC collections before the interpreter even started running.

We see an improvement to the 2.

Benchmark main: ./target/release/boa
  Time (mean ± σ): 2.2 ms ± 0.2 ms [User: 0.6 ms, System: 0.1 ms]
  Range (min … max): 2.0 ms … 3.4 ms 827 runs
Benchmark PR: ./target/release/boa
  Time (mean ± σ):       2.1 ms ±   0.1 ms    [User: 0.6 ms, System: 0.1 ms]
  Range (min … max):     1.9 ms …   2.8 ms    924 runs

Looking at the traces:

Before:
image

After (there are no GC collections in this trace)
image

1MB seems like a good start, we can always bump it higher or adjust after this, V8's nursery size before GC kicks in seems to be between 1-8MB,

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.51%. Comparing base (6ddc2b4) to head (438838e).
Report is 202 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3908      +/-   ##
==========================================
+ Coverage   47.24%   51.51%   +4.26%     
==========================================
  Files         476      467       -9     
  Lines       46892    44724    -2168     
==========================================
+ Hits        22154    23039     +885     
+ Misses      24738    21685    -3053     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@raskad raskad requested a review from a team July 9, 2024 21:51
Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, non-blocking though.

core/gc/src/lib.rs Outdated Show resolved Hide resolved
@raskad raskad added this pull request to the merge queue Jul 9, 2024
@raskad raskad added this to the v0.19.0 milestone Jul 9, 2024
Merged via the queue into boa-dev:main with commit 38d0324 Jul 9, 2024
14 checks passed
@jasonwilliams jasonwilliams deleted the bump-gc-threshold branch July 15, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants