Project

General

Profile

Feature #10201

Dynamically changing GC tuning parameters

Added by ko1 (Koichi Sasada) over 5 years ago. Updated over 5 years ago.

Status:
Rejected
Priority:
Normal
Target version:
[ruby-core:64743]

Description

Now, MRI has several GC tuning parameters to modify GC behavior given by environment variables. However, these parameters can not be changed after launched.

We can change these parameter in runtime.
For example, mruby provides some methods to change incremental GC behavior.

  • GC.interval_ratio (getter)
  • GC.interval_ratio= (setter)
  • GC.step_ratio (getter)
  • GC.step_ratio= (setter)

I propose to add method (methods) to change such GC parameters dynamically.

One idea is:

  • GC.parameters #=> return a hash value
  • GC.parameters(foo: xxx) #=> set GC parameter foo to xxx
  • GC.parameters(foo: nil) #=> reset (to default value) GC parameter foo

Note that this API should be MRI implementation dependent.
For Environment variables, implementations can simply ignore them.
However, a ruby script using these methods can run only on supporting implementation.
So it can be compatibility issue.

Updated by matz (Yukihiro Matsumoto) over 5 years ago

Do you mean you gave up adaptive GC parameters?

Matz.

Updated by matz (Yukihiro Matsumoto) over 5 years ago

  • Status changed from Open to Rejected

After the discussion in the developers meeting on 2014-09-04, we concluded this request may conflict with future adaptive GC. So we reject this for the time being.

Matz.

Also available in: Atom PDF