From owner-freebsd-threads@FreeBSD.ORG Fri Feb 13 23:11:36 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 9182D16A4CE for ; Fri, 13 Feb 2004 23:11:36 -0800 (PST) Received: from kurush.osdn.org.ua (external.osdn.org.ua [212.40.34.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id 050BD43D1F for ; Fri, 13 Feb 2004 23:11:35 -0800 (PST) (envelope-from never@kurush.osdn.org.ua) Received: from kurush.osdn.org.ua (never@localhost [127.0.0.1]) by kurush.osdn.org.ua (8.12.6p3/8.12.6) with ESMTP id i1E7BMq3080122; Sat, 14 Feb 2004 09:11:22 +0200 (EET) (envelope-from never@kurush.osdn.org.ua) Received: (from never@localhost) by kurush.osdn.org.ua (8.12.6p3/8.12.6/Submit) id i1E7BFu9080117; Sat, 14 Feb 2004 09:11:15 +0200 (EET) (envelope-from never) Date: Sat, 14 Feb 2004 09:11:15 +0200 From: Alexandr Kovalenko To: davidxu@viatech.com.cn Message-ID: <20040214071115.GA77411@nevermind.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.4i cc: freebsd-threads@freebsd.org Subject: Re: Question about threads [beaver challenge] 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: Sat, 14 Feb 2004 07:11:36 -0000 Dung Patrick wrote: > >Would you please explain this parameter: > > > >kern.threads.max_groups_per_proc > > > It is used by system scope thread in libpthread, whenever you > create a system scope thread, kernel creates a dedicated thread > for the user thread, it also eats a kernel thread group, for programs > heavily use system scope thread, the sysctl value should be increased. > current kern.threads.max_threads_per_proc not only accounts process > scope thread which are being blocked in kernel, but also accounts > system scope thread, so you should increase the sysctl value at same > time, otherwise too much system scope threads can block process scope > thread because the thread limit is hit and no upcall will be scheduled, > so UTS does not have chance to run, if UTS can not run, then process > scope thread can not be scheduled in userland, result is process > is suddenly stopped. The default values are too low for some > applications. > we might increase it before 5.3 release. What ratio between groups and threads should be? P.S. I'm not subsctibed to -threads, so, please Cc: me. -- NEVE-RIPE, will build world for food Ukrainian FreeBSD User Group http://uafug.org.ua/