Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2003 17:41:23 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        freebsd-java@freebsd.org
Subject:   Re: How's linux-ibm-jdk14 in the memory footprint department?
Message-ID:  <bravb4$kbp$1@sea.gmane.org>
In-Reply-To: <030b01c3c007$9c619210$0200a8c0@veggy.org>
References:  <2946E9F05C8DD511A7DC0002A5608CE4DB2015@gbchm201.exgb01.exch.eds.com> <030b01c3c007$9c619210$0200a8c0@veggy.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Nicolas Gieczewski wrote:
> Thanks for the suggestion. I could only get it down to about 152 MB 
> with an initial heap size of 8 MB and a maximum size of 16 MB. I 
> believe this is probably too small, though (actually, I have no idea, 
> guess I'll have to see how often the GC is kicking in). Even though 
> not all of the 152 MB (or 203 MB, for that matter) are in main memory 
> at any given time, don't they become unavailable to the OS, anyway? 

Definitely not.  Note that java will mmap any .jar files you use, so 
things like rt.jar will add 30MB to your process size right off the bat. 
    Very little of it will actually get paged in from disk, though, and 
what little does get paged in will be shared across all java processes. 
  I don't know where the rest of the 100 or so MB is going, but the most 
important thing to watch is the RSS value and whether you are swapping 
or not.  I did a simple test of running /usr/local/jdk1.4.2/bin/jar on a 
little file and pausing it so I could see the stats in top:

   PID USERNAME  PRI NICE   SIZE    RES STATE TIME   WCPU    CPU COMMAND
24511 dan        97    0   198M  7460K STOP  0:00  0.00%  0.00% jar

Note that the process space is almost 200MB, but really under 8MB is 
being used.  My guess is the extra space has something to do with 
threads, or maybe a sparse array was allocated (like what rpc.statd does).


-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bravb4$kbp$1>