From owner-freebsd-java@FreeBSD.ORG Fri Dec 12 07:14:13 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 271E516A4CE for ; Fri, 12 Dec 2003 07:14:13 -0800 (PST) Received: from mail.remarkablehost.com (ns1.remarkablehost.com [208.186.168.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 3823743D35 for ; Fri, 12 Dec 2003 07:14:10 -0800 (PST) (envelope-from nicolas@nixsoftware.com) Received: (qmail 27723 invoked by uid 110); 12 Dec 2003 15:14:09 -0000 Received: from unknown (HELO ash) (200.82.85.47) by ns1.remarkablehost.com with SMTP; 12 Dec 2003 15:14:09 -0000 Message-ID: <04d601c3c0c2$cfc357e0$0200a8c0@veggy.org> From: "Nicolas Gieczewski" To: References: <2946E9F05C8DD511A7DC0002A5608CE4DB2026@gbchm201.exgb01.exch.eds.com> Date: Fri, 12 Dec 2003 12:15:14 -0300 Organization: Nix Software Solutions MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 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: Fri, 12 Dec 2003 15:14:13 -0000 Many thanks to Thomas and Dan for their replies. The actual RSS has = always been around 16 MB, but I was thinking the difference between VSZ = and RES was going into the swap area. Obviously a lack of knowledge on = memory management on my part. I'll have to read some stuff on this. Thanks again, Nick ----- Original Message -----=20 From: "Sparrevohn, Thomas" To: "'Dan Nelson'" ; Sent: Friday, December 12, 2003 08:02 Subject: RE: How's linux-ibm-jdk14 in the memory footprint department? Yes - I looked at It and it seems that while it uses a large address = space the RSS stays around 21MB-41MB for j2ee as an example. There are a = potential problem with the way it is done that would occur if a very = large library was used. Has anybody looked at deferred loads? -----Original Message----- From: owner-freebsd-java@freebsd.org = [mailto:owner-freebsd-java@freebsd.org] On Behalf Of Dan Nelson Sent: 11 December 2003 23:41 To: freebsd-java@freebsd.org Subject: Re: How's linux-ibm-jdk14 in the memory footprint department? 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=20 > believe this is probably too small, though (actually, I have no idea,=20 > guess I'll have to see how often the GC is kicking in). Even though=20 > not all of the 152 MB (or 203 MB, for that matter) are in main memory=20 > at any given time, don't they become unavailable to the OS, anyway?=20 Definitely not. Note that java will mmap any .jar files you use, so=20 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=20 what little does get paged in will be shared across all java processes.=20 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=20 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=20 being used. My guess is the extra space has something to do with=20 threads, or maybe a sparse array was allocated (like what rpc.statd = does). --=20 Dan Nelson dnelson@allantgroup.com