Subject: Re: memory allocation beyond 1GB datasize in linux emulation?
To: Marko =?ISO-8859-1?Q?Sch=FCtz?= <schutz_m@usp.ac.fj>
From: David Brownlee <abs@NetBSD.org>
List: netbsd-help
Date: 05/25/2006 09:20:02
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-618027240-1148545202=:209
Content-Type: TEXT/PLAIN; charset=en_US.UTF-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Thu, 25 May 2006, Marko Sch=FCtz wrote:

> I want to allow the datasize of a linux binary to grow up to 1800MB.
>
> As root I set the hard limit on datasize to 2048m, but when I then su
> to my user account and check the hard limit I find it's only 1024m. I
> tried defining a login class that has a datasize of 2048m and use
> 'su -c ...', but it didn't do it.
>
> I ended up running the binary as root. Watching 'top' I saw it grow to
> a size of ~1047M and then it reported that memory allocation failed.
>
> I'd be thankful for any hints on this...

 =09I'm running some large linux tomcat processes under NetBSD-3
 =09and found the following useful in kernel config:

options         NPROC=3D4096
options         MAXUPRC=3D1024
options         NOFILE=3D512
options         NMBCLUSTERS=3D8192
options         NVNODE=3D131072           #  128K
options         DFLDSIZ=3D536870912       #  512M
options         MAXDSIZ=3D2146435072      # 2047M


 =09Along with the following JAVA_OPTS (MaxPermSize and normal java VM
 =09are counted separately, so this config ends up with about 1.5G of
 =09datasize use)

-Xms900m -Xmx900m -XX:MaxPermSize=3D400m -Djava.awt.headless=3Dtrue -Dfile.=
encoding=3DUTF-8 -Djava.net.preferIPv4Stack=3Dtrue
--=20
 =09=09David/absolute       -- www.NetBSD.org: No hype required --
--0-618027240-1148545202=:209--