From owner-freebsd-threads@FreeBSD.ORG Mon Jan 26 21:49:00 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A615816A528 for ; Mon, 26 Jan 2004 21:49:00 -0800 (PST) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E7D143FE2 for ; Mon, 26 Jan 2004 19:47:01 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (sccrmhc13) with ESMTP id <2004012703170001600gm48se>; Tue, 27 Jan 2004 03:17:00 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])i0R3H1Nb040876; Mon, 26 Jan 2004 22:17:01 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)i0R3Gs1k040875; Mon, 26 Jan 2004 22:16:54 -0500 (EST) (envelope-from rodrigc) Date: Mon, 26 Jan 2004 22:16:54 -0500 From: Craig Rodrigues To: Julian Elischer Message-ID: <20040127031654.GA40814@crodrigues.org> References: <4011546D.9010904@intalio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: freebsd-threads@freebsd.org Subject: Re: "maxthr" state X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 05:49:01 -0000 On Fri, Jan 23, 2004 at 03:25:19PM -0800, Julian Elischer wrote: > > > On Fri, 23 Jan 2004, Alex Boisvert wrote: > > > > > Nevermind, I discovered the kernel sysctl > > "kern.threads.max_threads_per_proc" with default value 150. I bumped > > the value to 300 and the app runs fine. (We simulate 250 clients with > > 250 connections or threads, hence the need for a large value...) > > yes, the number could be made bigger but we didn't want to make it > too easy for wildly out-of-control threadded programs to > kill the system while the threading system is still "young".. 150 is a perfectly reasonable number to start with, but I can see it could be a problem later on when KSE goes "live". Due to programming languages like Java, there are a lot of threads-happy coders out there (unfortunately). I ran into this problem a few years ago when working in a group that had a multithreaded Java server on AIX. On AIX 4.2, it would crash because the max threads per process was 256, but on AIX 4.3, the limit was 32768 and things were fine. Not pretty, but this gives you an idea of the kind of multithreaded code that is being written out there.... people may complain why their multithreaded Java apps don't work nicely on FreeBSD. :( -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org