maximum memory for gcj-compiled executable?

Lars Andersen lars@rimfaxe.com
Thu Apr 3 12:54:00 GMT 2003


> First of all, I don't claim that live data is sharply below 
> 10 MB at all
> time. I debug used/free heap at short intervals, and there is always a
> lot free. This is a peculiar program : it recieves a http request once
> every 30secs. (Not average, literally every 30secs). Plus, it 
> sends out
> a http request every 10 minutes. This might or might not start a short
> period of activity. The program sleeps thru periods of inactivity.

> > > There are also some known reasons that heap size is 
> > currently suboptimal, but these 
> > > shouldn't normally add more than 10MB or so to the heap:
> > > 
> > > 1) The root size is way too big. This has been discussed 
> > here before, and I think we agree 
> > > on at least an approach for fixing it. This causes the collector to
> > > grow the heap to much to compensate for the root scanning time. 
> > > (You can tune the collector to compensate, but then it runs slowly.)
> > > 
> > > 2) Under win32, it tends to scan system malloced memory as roots. 
> > >
> > > This is a misfeature, since it can't be relied on. My 
> > current version 
> > > attempts to fix it, but the fix is heuristic, since I 
> > don't know of a
> > > way to identify malloced memory sections. (The fix works well on a
> > > small toy example :-) .) This affects only Windows.
> > 

OK, I have done some more investigating :
Profiled under j2sdk1.4.1 / linux all night long. Heap usage never above
2MB.
Running on linux, gcj compiled, heap size stabilizes on 6MB after a
short while, around 2MB used.
Running on win32, gcj compiled, heap size stabilizes on 8MB after a
short while, around 3MB used.
Now comes the strange part. Overall memory usage keeps growing!
On linux it is about 1kb per http request processed, on win32 it's
48KB(!) per request!
heap size remains the same.
Why is it eating up my memory??? It must be something.
OK, i'm spooked here, does anyone know whats going on?
A test on a win32 machine reported 152MB memory usage in task manager!,
after running only 24 hours.
/Lars Andersen 


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /