Re: GC Parameters & Emergency Collection

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


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