Subject: Re: How to globally increase maximum data segment size?
To: Andrew Doran <ad@netbsd.org>
From: Chris <humptymoo@gmail.com>
List: netbsd-users
Date: 06/19/2007 11:04:46
On 19/06/07, Andrew Doran <ad@netbsd.org> wrote:
> On Tue, Jun 19, 2007 at 10:01:14AM +0100, Chris wrote:
>
> > I'm trying to run a Java application, but it fails with an out of
> > memory exception. On a Linux box, I
> > can see that it's using almost 1Gb of memory:
> >
> >                                   VIRT   RES    SHR
> > 27726 root      25   0 1021m 558m  14m S    0 22.0  96:02.11 java
> >
> > I've tried to increase the various limits on my NetBSD box using
> > /etc/login.conf, but it appears
> > that the hard limits compiled into the GENERIC kernel (it's netbsd-4
> > from a recent daily build),
> > are too low. Reading options(4) I see that I can set various options
> > such as MAXDSIZ and
> > build a custom kernel. I was wondering what options I would need to
> > set, and what to set the
> > to, in order to ensure that a process like the one shown above would
> > run on my NetBSD box.
>
> Are you running a native JVM or a Linux JVM? Have you tried altering the
> memory options to Java (for example -ms64m -mx256m)?
>
> Andrew
>

Hi Andrew,

I'm using a Linux JVM (pkgsrc/lang/sun-jdk15), as I had problems with
socket exceptions when I tried the native JVM. I set JAVA_OPTS to
"-Xms256m -Xmx1024m", but I still ran into an out of memory exception.
Oddly, on the Linux box there are no JAVA_OPTS or CATALINA_OPTS set in
any shell config files or in any of the scripts used to start Tomcat
(this is a sprawling webapp that I'm trying to fire up). I'm now
building a new kernel with MAXDSIZ set to "2147483648U" in the hope
that I can get things going!

Regards,

Chris

-- 
We are all worms, but I do believe that I am a glow-worm.
Sir Winston Churchill