From owner-freebsd-java@FreeBSD.ORG Thu Dec 11 15:52:10 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEE2216A4CE for ; Thu, 11 Dec 2003 15:52:10 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3310A43D67 for ; Thu, 11 Dec 2003 15:50:22 -0800 (PST) (envelope-from freebsd-java@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AUaZY-0001Qt-00 for ; Fri, 12 Dec 2003 00:50:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-java@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUaQv-0001Ke-00 for ; Fri, 12 Dec 2003 00:41:25 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AUaQv-0005QQ-00 for ; Fri, 12 Dec 2003 00:41:25 +0100 From: Dan Nelson Date: Thu, 11 Dec 2003 17:41:23 -0600 Lines: 28 Message-ID: References: <2946E9F05C8DD511A7DC0002A5608CE4DB2015@gbchm201.exgb01.exch.eds.com> <030b01c3c007$9c619210$0200a8c0@veggy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 X-Accept-Language: en-us, en In-Reply-To: <030b01c3c007$9c619210$0200a8c0@veggy.org> Sender: news Subject: Re: How's linux-ibm-jdk14 in the memory footprint department? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2003 23:52:11 -0000 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