users@glassfish.java.net

Re: System.gc() considered harmful

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Mon, 14 Jun 2010 15:37:40 +0200

thanks for the heads up Tim. How about we add it as a comment?
Let's discuss this further when the issue is filed.
-Alexis

On 14 juin 2010, at 15:33, Tim Quinn wrote:

> One aspect to keep in mind...
>
> Windows systems have the problem that open files cannot be deleted or renamed. Open files - typically JARs - can be left open by frameworks, application code, or bugs in the app server. Sometimes these dangling open files are held open by unreachable object references that have not yet be GCed. So, on Windows, GlassFish will sometime try to run the GC to clean up these dangling references and, thereby, close the open files.
>
> We need to be careful making a blanket statement - and changing the default setting for GlassFish - about this.
>
> - Tim
>
> On Jun 14, 2010, at 3:32 AM, Alexis Moussine-Pouchkine wrote:
>
>> This makes sense.
>> Please file an issue @ https://glassfish.dev.java.net/issues/enter_bug.cgi?issue_type=DEFECT in the "performance" category.
>> I'll vote for it!
>>
>> cheers,
>> -Alexis
>>
>> On 11 juin 2010, at 21:59, glassfish_at_javadesktop.org wrote:
>>
>>> I recommend that glassfish have the switch to disable explicit garbage collection with System.gc() included in the default installed setup. I inherited code with an explicit gc() call, and I suspect a 3rd party library was also calling it.
>>>
>>> -XX:+DisableExplicitGC
>>>
>>> This blog entry sums it up nicely: http://java-n-stuff.blogspot.com/2009/08/turn-on-disableexplicitgc-now.html
>>>
>>> With this and some other performance tuning glassfish is running much better for me.
>>> [Message sent by forum member 'culli']
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=473951
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
>
>
> Tim Quinn | Principal Member of Technical Staff | +1.847.604.9475
> Oracle GlassFish Engineering
> Lake Forest, IL
>