Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2002 15:42:25 -0500
From:      "Ken Menzel" <kenm@icarz.com>
To:        "Aaron Wohl" <freebsd@soith.com>
Cc:        <freebsd-stable@FreeBSD.ORG>
Subject:   Re: MAXDSIZ and pthreads large ram etc
Message-ID:  <013c01c2b043$f6448be0$ecdb7bd1@kenxp>
References:   <20021224215413.B597F17A32@www.fastmail.fm> <200212242312.gBONCjqD044717@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Aaron and Matt,
   I first saw this problem about two years ago when MAXDSIZ was made
tunable in the loader.  Now any value over  MAXDSIZ="(2047*1024*1024)"
causes a threaded program to SIGABRT. (This is the the value I use).
I had tracked it down to the exact set of changes but could not
identify what caused it, and 2G is OK for me so I did not pursue it.
Like Matt Says you real limit is 3G anyway and memory addressing above
4G has been discussed in other threads (see the archives).

I used to be able to set MAXDSIZE to 3000.  Anyway if you are
interested in trying to track down exact cause I did save the commit
that caused it and I can rollback to before the change and see it
fixed then apply the set of changes.  It was a very large commit dated
Date: Fri, 2 Nov 2001 17:41:10 -0800 (PST), by Paul Saab.

I can send the original commit e-mail to anyone interested.  But
since 2G worked for me that was where I left it.  I could also submit
it as a bug if anyone thinks this is really a bug.

Hope this helps.
Ken
----- Original Message -----
From: "Matthew Dillon" <dillon@apollo.backplane.com>
To: "Aaron Wohl" <freebsd@soith.com>
Cc: <freebsd-stable@FreeBSD.ORG>
Sent: Tuesday, December 24, 2002 6:12 PM
Subject: Re: MAXDSIZ and pthreads large ram etc


>     A user process has a 3G address space.  The kernel takes the
rest.
>     On a 4G machine you cannot make the kernel any smaller without
creating
>     serious resource problems elsewhere.
>
>     MAXDSIZ does not encompass all the memory a program uses.
MAXDSIZ
>     and mmap()'d memory are orthogonal data spaces.  The larger you
>     set MAXDSIZ, the less VM is available for mmap().  MAXDSIZ
really only
>     represents the program's heap (space available to malloc()).
>
>     Thread stacks are allocated with mmap(), and shared libraries
are mapped
>     using mmap().  It is highly likely that you are increasing
MAXDSIZ to
>     the point where the threaded programs you are running are unable
to map
>     their thread's stacks.
>
> -Matt
> Matthew Dillon
> <dillon@backplane.com>
>
>
> :Anyone using a lot of address space per process (over
768megabytes)?
> :
> :For a machine with 4 gigabytes of ram im trying to up the amount of
data
> :a process can address.  If I increase MAXDSIZ at about 2048mbyte
pthreads
> :stops working.  Creating threads starts to fail.  4096mb seems to
wrap
> :the limit 0 zero.  The kernel builds and boots but anything (sh)
you try
> :to run quits out of memory.
> :
> :Im currently using:
> :options         MAXDSIZ="(768*1024*1024)"
> :
> :Anyone got more than that to work?  mysql uses pthreads much above
768mb
> :pthread create starts to fail.  This is on an AMD or intel
processor with
> :4.7 stable latest stuff checked out.
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?013c01c2b043$f6448be0$ecdb7bd1>