From owner-freebsd-stable Tue Dec 24 15:12:48 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 A708137B401 for ; Tue, 24 Dec 2002 15:12:46 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5429643E4A for ; Tue, 24 Dec 2002 15:12:46 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gBONCjOM044718; Tue, 24 Dec 2002 15:12:45 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gBONCjqD044717; Tue, 24 Dec 2002 15:12:45 -0800 (PST) (envelope-from dillon) Date: Tue, 24 Dec 2002 15:12:45 -0800 (PST) From: Matthew Dillon Message-Id: <200212242312.gBONCjqD044717@apollo.backplane.com> To: "Aaron Wohl" Cc: freebsd-stable@FreeBSD.ORG Subject: Re: MAXDSIZ and pthreads large ram etc References: <20021224215413.B597F17A32@www.fastmail.fm> 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 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