harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From will pugh <willp...@sourcelabs.com>
Subject Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Mon, 31 Jul 2006 15:56:03 GMT
What does matter is whether you are using more virtual memory than you 
have physical memory.  The second you get in a spot where you have to GC 
and go through the entire object tree, you need to load in every page.  
If you have space for N pages in memory, and have objects allocated on 
N+1 pages in virtual memory, you are going to do a ton of paging, and 
baiscally make your machine unusable.  My understanding is that one of 
the important reasons for having a Max on the allocation availble to a 
VM from the beginning was to make sure the heap never used more than 
physical memory.

Zones sound like an interesting strategy, but I'm not sure they help you 
much with wanting make the default memory option "unlimited".  
Generational is good at reducing the number of full GCs you do, but does 
not necassarily eliminate them.

The zones strategy you suggest may work well with apps that have a lot 
of class loaders and allocate somewhat evenly across them, but I think 
it may cause a lot of overhead.  Would your approach be generational?  
Would you need Write Barriers for both references from other generations 
as well as other Class Loaders?

If you were to have a Web Application, would you basically need a write 
barrier for every string you allocate, since the String Class is loaded 
in a parent class loader?  If so, this may cause more overhead than you 
would want for the stated benefit.

    --Will

Alex Blewitt wrote:

> On 30/07/06, will pugh <willpugh@sourcelabs.com> wrote:
>
>> Isn't Full GCs a big problem?  If have a bunch of pages in virtual
>> memory, and need to do a full heap walk.  Won't you basically have an
>> exercise in page faults?
>
>
> Realistically, doesn't that happen for any full GC though, regardless
> of how they're laid out? Even if the JVM requests a single large
> contiguous space, it will still be treated as many pages by the OS,
> and you'll get a similar amount of page faults. It doesn't matter what
> virtual address space they're mapped into.
>
> One of the suggestions I put forward elsewhere was having several
> zones (one per classloader); the advantage would then be you could GC
> each zone separately, and potentially at different intervals.
>
> Alex.
>
> ---------------------------------------------------------------------
> 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
>

---------------------------------------------------------------------
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