harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.
Date Thu, 14 Sep 2006 05:35:50 GMT
Just a wild idea: a smart JIT could hint a GC during allocation if an
object is expected to be short-lived so the GC could allocate it in a
special space, recycled quickly and frequently. I guess it could be
not too expensive estimation for optimizing JIT, based on performed
escape analysis or such. Or the contrary, JIT also may hint that a
particular object is potencially long-lived one (say values assigned
to static fields).
I'm not a GC guy, maybe there are similar techniques already investigated :)


2006/9/14, Leo Li <liyilei1979@gmail.com>:
> Hi,all:
>    As we all know, java objects are allocated on heap instead of stack,
> thus there is a problem about how to garbage collect short-lived objects
> quickly.
>    In a recent real project I involved, a server built on java tries to
> send thousands of messages to client per second. A lot of short-lived
> messages is created as objects and discarded. (Although I can recycle these
> memory, there is still a byte array created during per call of nio read and
> write.) Since current GC strategy adopted by current RI starts to work only
> when the memory allocated approaching the limit of java heap, the work of GC
> is huge and will raise a wave on the server performance. Furthermore, after
> a long run, although I know GC will merge memory, the operating system
> reports there is memory fragment and in the worst case the OS will even
> report real memory is exhausted.
>    Of course it is possible to limit the java heap so as to force gc
> frequently as a workround, is it preferrable to collect short-lived objects
> quickly such as adopt aged-related object queues as one of the gc strategy?
>   What about the VMs here, drlvm or J9?
>
> Leo Li
> China Software Development Lab, IBM
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message