From owner-freebsd-stable Mon Dec 30 12:41:28 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7686737B401 for ; Mon, 30 Dec 2002 12:41:25 -0800 (PST) Received: from hercules.icarz.com (ns1.icarz.com [207.99.22.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55C3043ED1 for ; Mon, 30 Dec 2002 12:41:24 -0800 (PST) (envelope-from kenm@icarz.com) Received: from kenxp (netb-236.icarz.com [209.123.219.236] (may be forged)) by hercules.icarz.com (8.11.6/8.10.1) with SMTP id gBUKfHr17989; Mon, 30 Dec 2002 15:41:17 -0500 (EST) Message-ID: <013c01c2b043$f6448be0$ecdb7bd1@kenxp> From: "Ken Menzel" To: "Aaron Wohl" Cc: References: <20021224215413.B597F17A32@www.fastmail.fm> <200212242312.gBONCjqD044717@apollo.backplane.com> Subject: Re: MAXDSIZ and pthreads large ram etc Date: Mon, 30 Dec 2002 15:42:25 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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" To: "Aaron Wohl" Cc: 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 > > > > :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