[Glass] Garbage Collection , maintenance gem and typical seaside app

James Foster james.foster at gemtalksystems.com
Thu May 8 08:46:30 PDT 2014


Hi Mariano,

Good questions. In addition to reading all the chapters I’d suggest that you watch a few videos on GC (#19-22) at https://programminggems.wordpress.com/2010/02/05/scaling-objects-videos/. Further comments below...

On May 8, 2014, at 8:24 AM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:

> Hi GemStoners,
> 
> I tried not to pay attention that much in the first steps on my GemStone project. But now, it is time to investigate this. I have read all the chapters about GC, but I have a few questions. 
> 
> From what I understand, I am running one admingcgem and one reclaimgcgem which start automatically with the stone. Since my repository/app is still small, I think that's enough for the moment. 
> 
> Now, what what I understand, the reclaim part is worthless if there is no "mark" part.

The reclaim gem(s) also consolidate objects from sparse pages, especially when objects are modified and the old versions are no longer referenced, so the reclaim part is not “worthless”!

> I do know I have #markForCollection, but the first question is:  Does GemStone ever run internally/automatically a full mark pass?

No, this is resource intensive and left to the discretion of the system administrator.

> Like in Pharo..like besides having #garbageCollection, Pharo itself sometimes run the GC. So...GemStone does that or if I don't invoke it (as a sysadmin), it will never be? 

It will never be invoked automatically.

> GLASS comes with nice seaside scripts to start/stop gems and also a maintenance gem which calls WAGemStoneMaintenanceTask. This class, from what I can see, it does seaside session expiration and MFC. So....second question... if I have this VM running...then I wouldn't need to explicitly run a MFC as part of a cron job, right?

Right.

> I have been facing/reading a problem in which some seaside gems (or maintenance VM) could hold into objects preventing them from being GCed. As a workaround, Dale suggested to reset gems every in a while or increase the   GEM_TEMPOBJ_POMGEN_PRUNE_ON_VOTE=90;  which in my case it is already 90. So ok...imagine I have a daily script / cron that resets all seaside gems and maintenance gem. That's all I would have to do right? because soon after (less than 1 hours), my maintenance gem will run MFC and then at some point the reclaim GC will do their work. I am correct?
> Even if that's try, if I run the "reset" of the seaside gems at a strange hour (like 4 am), I may want to even force a MFC and a #reclaimAll, right? Even if I know they would happen automatically in the future, I may prefer to pay its cost/time at 4 am. Would this make sense?

Yes, this is a common approach.

> Finally...what's your opinion about epochGC for a typical Seaside app? I know there is a lot of trade-offs and it depends on the app...but as a general option, I found it strange to be disabled by default in GLASS. 

By default the MFC runs frequently, so there is no need for the EpochGC.

> Thanks for the clarification, 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140508/b7887be6/attachment-0001.html>


More information about the Glass mailing list