-
Notifications
You must be signed in to change notification settings - Fork 29
[WIP] Ractor harness #375
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
Draft
luke-gruber
wants to merge
25
commits into
main
Choose a base branch
from
ractor-harness-luke
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] Ractor harness #375
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9a48fe5
to
607cd5b
Compare
910d5f9
to
c1c1654
Compare
You no longer have to do -Iharness/harness anymore when invoking like `ruby benchmarks/fib.rb`.
If your ruby's bundler is different from the saved result in `Gemfile.lock`, bundler autoswitches by starting a new process. When it does this it sometimes doesn't pick up the old LOAD_PATH and results in a LoadError. Switch to use `Bundler.setup`, which is a simpler process and uses the current bundler.
Ex: ./run_benchmarks sudoku --harness=ractor
Add JSON benchmarks: parse_float parse_string Add to ractor harness, make it possible to use gemfiles in different directories and make it easy to do so. This way we don't have to create directories for each benchmark. Improve run_benchmarks.rb, allow it to take a regular expression for --name_filters option Ex: $ WARMUP_ITRS=10 ruby run_benchmarks.rb --category=ractor-only --name_filters=/json/ Allow it to take --skip-yjit option to only run with interpreter.
To use, do: NO_VIEWER=1 HARNESS_CHAIN="vernier,ractor" ruby run_benchmarks.rb --harness=chain --skip-yjit psych-load This runs vernier profiling for a ractor benchmark. You can also use perf like this, but it's untested right now.
I just copied the code over to the ractor directory because it would too hard otherwise. You can run it with: $ WARMUP_ITRS=5 ruby run_benchmarks.rb --category=ractor-only --skip-yjit optcarrot
Measures time taken to acquire and release the GVL over and over. Right now it's quite a large overhead when we have a few ractors.
contains 2 implementatsion. One using Process.fork, the other using Ractors
40880ac
to
fe13558
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was also working on a ractor harness at the same time as Jean 😄
We can incorporate ideas from both imo.