This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Memory residence


The resident set size for small processes may also be affected
by the overly large GC root size.  The GC will normally run once
at program startup.  That should be cheap, but I think it currently
still touches all static data.

I think there are plans to fix that, but it hasn't yet been fixed.
It will also affect the footprint of larger applications, though
for different reasons.

Hans

> -----Original Message-----
> From: Andrew Haley
> Sent: Tuesday, May 24, 2005 8:35 AM
> To: shudo@computer.org
> Cc: java@gcc.gnu.org
> Subject: Re: Memory residence
> 
> 
> shudo@computer.org writes:
>  > Generally speaking, AOT compilers like GCJ are known to be
>  > advantageous to JVMs which interpret and/or compile Java 
> bytecode.  > I observed memory occupation of Java programs 
> with GCJ 4.0, gij and  > JDK 5.0 on a Linux box.  > 
>  > 
>  > The first Java program is very simple one which just 
> pauses for 60 sec:  > 
>  >   public class Pause {
>  >     public static void main(String[] args) {
>  >       try { Thread.sleep(60000); } catch 
> (InterruptedException e) {}
>  >     }
>  >   }
>  > 
>  > Memory occupation of the program (and a runtime) shown by 
> 'ps' command  > is as follows:  > 
>  >   [gcj -O2]
>  > 
>  >   USER       PID %CPU %MEM    VSZ   RSS TTY      STAT 
> START   TIME COMMAND
>  >   shudo    22322  5.0  2.4  34512 12560 pts/6    Sl+  
> 05:07   0:00 ./Pause
>  > 
>  >   [gij]
>  > 
>  >   USER       PID %CPU %MEM    VSZ   RSS TTY      STAT 
> START   TIME COMMAND
>  >   shudo    22329  4.0  2.0  37580 10640 pts/6    Sl+  
> 05:07   0:00 gij Pause
>  > 
>  >   [JDK 1.5.0_03]
>  > 
>  >   USER       PID %CPU %MEM    VSZ   RSS TTY      STAT 
> START   TIME COMMAND
>  >   shudo    22246  1.8  1.9 262316  9848 pts/6    Sl+  
> 05:05   0:00 java Pause
>  > JDK 1.5 showed the least number in RSS.
>  > 
>  > 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]