lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, 02 Jun 2010 16:31:44 +0300, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

Is there a situation where user would like to specify gcpauseminor?
That is, where a well chosen default would be inappropriate?

For all GC parameters there are cases where "well chosen" defaults are
inappropriate. For most cases, moreover, the default are "appropriate",
but certainly not optimal in any sense.  (Not to mention that we cannot
be sure that the defaults are really "well chosen"...)

I agree. A lot of parameters and controls for GC is nice.
Especially if these parameters are not too
opaque to try and reason how exactly GC will behave and what values
to use (without spending too much time in the lgc.c).

User might want to tune GC to meet his requirements:
*) allowed delay (gcstepmul, if ephemerons are not used)
*) cpu overhead -- gcpause
*) memory overhead -- ??. A complex function of gcpause and gcstepmul
*) lifetime of garbage -- ??

If allowing user to change any of the parameters will not help him
meet the requirements, probably it is better to hide it, like
it is done with GCSTEPMUL right now (i'd call that parameter
"well chosen").

On a practical note, what about allowing to specify minor collection
pause as an absolute value (in bytes), in addition / in place of
the current percentage? Say, by interpreting values < 0 as a byte count.