Re: GC Parameters & Emergency Collection

Posted by BogdanM on
URL: http://elua-development.15.s1.nabble.com/GC-Parameters-Emergency-Collection-tp2846858p2865786.html

OK, this is what I was talking about:

http://lua-users.org/lists/lua-l/2008-05/msg00229.html

(it might be worth to follow the whole thread that starts here: http://lua-users.org/lists/lua-l/2008-05/msg00023.html)

You can probably see now that there are different parameters that can be configured for the patch, with different time/space results: when it runs (on allocation failure/on low memory mark/before any allocation (quite extreme)) amd how it runs (step or full). And probably other parameters that I can't find at this late time :)

Best,
Bogdan

On Tue, May 12, 2009 at 12:44 AM, Bogdan Marinescu <[hidden email]> wrote:

I agree.  Does the performance hit only show up during a GC (emergency or no)?  I've not clocked any of this yet.

Yes, the performance hit happens only during GC, which becomes a visible problem when GC is called too often. But hey, at least your program is running :)
 
In practice I would say since we have a fixed amount of memory, it's really undesirable to fail simply because a garbage collection event wasn't called in time.  

Definitely.
 
The other side is that if the penalty is only at GC time, people could disable collection during time-critical operations.  

Definitely, part II :)
 
I haven't taken a deep look to understand how every part of the patch works yet, but I see that it does provide a configurable of a memory limit.  Maybe another interesting tunable might be how many GC steps to take when an emergency GC is called (i.e.: just enough for the allocation pending, full gc, or something else?)  I'm also still curious about the idea of running GC in fixed timesteps,   

I did quite a few tests with Robert's patch a while ago, I really need to look for my messages related to this subject on the Lua list and repost them here. They're quite interesting.

 
In the interests of pragmatism, I don't think I'd pursue anything more detailed here unless I run up against some situation where it doesn't work as desired. I think, overall, a default of sane incremental collection (maybe with the GCPAUSE set to 110) and a backstop emergency GC should be a good solution for most cases.

I'd say a configurable emergency GC should be a good solution for most cases. That is, the user should be able to define how the emergency GC will run, which will give him a choice between speed and memory usage. Not hard to do, fortunately. Again, things will probably be more clear after I post the results of Robert's patch here.

Best,
Bogdan




_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev