From owner-freebsd-threads@FreeBSD.ORG Tue Feb 10 15:08:59 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 95F7516A4CE for ; Tue, 10 Feb 2004 15:08:59 -0800 (PST) Received: from mail.asn.net (mail.asn.net [66.235.231.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 6529843D1F for ; Tue, 10 Feb 2004 15:08:59 -0800 (PST) (envelope-from kris-fbsd@asn.net) Received: (qmail 766 invoked by uid 80); 10 Feb 2004 23:08:58 -0000 Received: from 68.3.131.72 (SquirrelMail authenticated user kgale) by mail.asn.net with HTTP; Tue, 10 Feb 2004 16:08:58 -0700 (MST) Message-ID: <53632.68.3.131.72.1076454538.squirrel@mail.asn.net> In-Reply-To: <4029627F.4090602@viatech.com.cn> References: <1076398781.b793f9a0dkt@digitalme.com> <51993.68.3.131.72.1076432061.squirrel@mail.asn.net> <20040210193240.GA47392@crodrigues.org> <53224.68.3.131.72.1076449765.squirrel@mail.asn.net> <4029627F.4090602@viatech.com.cn> Date: Tue, 10 Feb 2004 16:08:58 -0700 (MST) From: "Kris Gale" To: "David Xu" User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal 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: Tue, 10 Feb 2004 23:08:59 -0000 > What's the value of your sysctl kern.threads.max_threads_per_proc and > kern.threads.max_groups_per_proc ? Mysql heavily uses system scope > thread. I set them both to 2500. Just to reiterate my problem... I wasn't having any problems with MySQL starting up new threads. The problem was that MySQL would slow to a crawl, and then become completely unresponsive. I capture the number of threads periodically so I can graph it, and what I would see when MySQL started to slow was that the number of threads would be about twice what it should have been, given the load on the web application. It appeared that threads were being created, but would hang around forever, or that all of the queries were backing up. Attempting to stop and start the MySQL daemon while the client application (comprised of several hundred httpd processes) was trying to reconnect would end up crashing the entire OS, causing the machine to reboot. This never happened when I was near the console, and none of the logs contained any crash messages. Kris