Skip to content

Conversation

luke-gruber
Copy link
Collaborator

I was also working on a ractor harness at the same time as Jean 😄

We can incorporate ideas from both imo.

@luke-gruber luke-gruber marked this pull request as draft August 8, 2025 18:31
@luke-gruber luke-gruber force-pushed the ractor-harness-luke branch 2 times, most recently from 9a48fe5 to 607cd5b Compare August 12, 2025 15:39
luke-gruber and others added 22 commits October 10, 2025 11:19
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
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