|
From: Andreas R. <and...@gm...> - 2005-01-19 18:41:26
|
John,
>>> Note how we allocate 76 objects, do a young space GC, then have two
>>> survivors, finally we reach the 200K minimum GC
>>> threshold and do a full GC followed by growing young space. However
>>> this process is very painful.
>>
>> By saying we want some slack growHeadroom*3/2 - (self sizeOfFree:
>> freeBlock) we avoid the above problem.
>
> I see. Yes this makes sense. (btw, I'm not sure if these parameter choices
> are best but I guess since they aren't worse than what's there they must
> be good enough ;-)
I take this back. The longer I'm looking at these changes the more
questionable they look to me. With them, unless you do a manual full GC at
some point you keep growing and growing and growing until you just run out
of memory. I *really* don't like this.
The current machinery may be inefficient in some borderline situations but
it works very well with the default situations. With these tenuring changes
we risk to make the default behavior of the system to be one in which we
grow endlessly (say, if you run a web server or something like this), for
example:
queue := Array new: 20000.
index := 0.
[true] whileTrue:[
(index := index + 1) > queue size ifTrue:[index := 1].
queue at: index put: Object new.
].
You keep this guy looping and the only question is *when* you are running
out of memory (depending on the size of the object you stick into the
queue), not if. Compare this to the obscure circumstances in which we get a
(hardly noticable) slowdown with the current behavior. So I think some way
for bounding growths like in the above is absolutely required before even
considering that change.
> > statMarkCount:
> Actually this is the number of times around the marking loop,
> I don't think it's same as the survivor count plus roots.
That's right, the number of times around the loop is essentially
fieldCount(roots+survivors). But my point still stands that it is easily
computed and that we really don't need to explicitly count that loop.
Cheers,
- Andreas
|