
Issue #21022 has been updated by peterzhu2118 (Peter Zhu). Status changed from Closed to Open
That mentions 1-2 %. Assuming that the ultimate target is to be able to use different GC, which in theory might compensate for the performance hit, I think that could be sensible trade off
Right, I agree that it's a small performance penalty. However, we don't have another production ready GC implementation yet, so for most users, they won't be able to take advantage of this feature and will instead just be taking a 1-2% performance penalty for no reason.
BTW in that ticket, there is also mentioned "loading Ruby's current GC using RUBY_GC_LIBRARY_PATH". Should I have the default GC available somewhere as some .so file when compiling with the --with-modular-gc option?
There will always be a copy of the default GC baked into the Ruby binary, so even if you compiled with `--with-modular-gc` and didn't specify a `RUBY_GC_LIBRARY` environment variable, it will load the default GC.
Fedora is binary distribution. Therefore having build time option is not helpful for our users.
We're aware that this is not the ideal design, and this is on purpose. As I've stated above, this is an experimental feature and is not production ready, so we make it optional until we have a faster and more stable implementation. We'll work on a better integration and delivery method (e.g. through a gem) once we have a performant and stable alternate GC implementation.
It seems that ATM, it will be better to keep this option disabled for Fedora.
Absolutely. It's experimental and we turn it off by default because of the performance penalty and potential instability. ---------------------------------------- Bug #21022: The --with-modular-gc= option is cumbersome https://bugs.ruby-lang.org/issues/21022#change-111429 * Author: vo.x (Vit Ondruch) * Status: Open * ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM +GC [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- Just experimenting a bit with the `--with-modular-gc=` if it is worth of enabling in Fedora, but I somehow cannot wrap my head around that. What is the intended configuration? From Fedora POV, we have Ruby installed somewhere in `/usr`, which can only be managed by RPM. I don't think that we would like to package any additional GC. But if we wanted, we would likely installed it outside of the default Ruby directory structure. We would also like our users to experiment. So they would ideally have their GC built somewhere in their HOME. In that case, I'd expect that something like `RUBY_GC_LIBRARY=/home/johndoe/path/to/gc/gc.so ruby -e 'puts "Hello custom GC"'` would be command to run. But it does not seems that the current configuration option / env variables have anything like this in their mind. Actually I wonder why the GC is not packaged as gem? Maybe RubyGems are late to the party to load the GC early enough. But they still would be nice method of distribution. From #20860 I understand that the MMTk is experimental. But from the Ruby 3.4, the Modular GC seems to be as something users might want. -- https://bugs.ruby-lang.org/