From owner-freebsd-threads@FreeBSD.ORG Fri Jun 17 15:23:48 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 E6C7D16A41C; Fri, 17 Jun 2005 15:23:48 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE23543D4C; Fri, 17 Jun 2005 15:23:48 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 84A281F8A5B; Fri, 17 Jun 2005 08:23:48 -0700 (PDT) Received: from [192.168.2.5] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j5HFNjWT007154; Fri, 17 Jun 2005 08:23:47 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <42B2EAFE.6010800@elischer.org> Date: Fri, 17 Jun 2005 08:23:42 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Andriy Tkachuk References: <200506161309.51431.ant@emict.com> <20050616141857.GA63602@stack.nl> <42B1F414.9040203@freebsd.org> <200506171359.01441.ant@emict.com> In-Reply-To: <200506171359.01441.ant@emict.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: David Xu , freebsd-threads@freebsd.org Subject: Re: more than 2k threads with -lpthread or -lthr X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2005 15:23:49 -0000 Andriy Tkachuk wrote: > On Friday 17 June 2005 00:50, David Xu wrote: > >>Here two sysctl also have to tuned to numbers larger than 2000 for >>libthr and libpthread: >>kern.threads.max_groups_per_proc >>kern.threads.max_threads_per_proc > > > Also i want to note, that i didn't change this sysctls. > Theirs default values are: > > kern.threads.max_threads_per_proc: 1500 > kern.threads.max_groups_per_proc: 1500 > > and i make 5000 threads with -lpthread. in libpthread, if threads are not in the kernel then they do not count towards these limits.. they are only in the kernel if they are waiting on a kernel resource (e.g. a file or socket etc.) in libthread all threads will count owards this limit. this is the difference between the two libraries. One tries to be more careful with kernel resources and the other is a lot simpler to get right :-) > > The only sysctls i change in order to work with such > number of threads are kern.maxfiles and kern.ipc.maxsockets, > but they are not about threads. > > Regards, > Andriy Tkachuk. > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"