From owner-freebsd-questions@FreeBSD.ORG Wed Apr 20 17:25:42 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2EAA16A4CE for ; Wed, 20 Apr 2005 17:25:42 +0000 (GMT) Received: from hobbiton.shire.net (hobbiton.shire.net [166.70.252.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 562DB43D1F for ; Wed, 20 Apr 2005 17:25:42 +0000 (GMT) (envelope-from chad@shire.net) Received: from [67.161.222.227] (helo=[192.168.99.68]) by hobbiton.shire.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.43) id 1DOIxJ-0000Wh-JL; Wed, 20 Apr 2005 11:25:41 -0600 Mime-Version: 1.0 (Apple Message framework v619.2) Message-Id: <6da0134b9077da03e82154bb1a78de10@shire.net> From: Chad Leigh -- Shire.Net LLC Date: Wed, 20 Apr 2005 11:25:40 -0600 To: List Free Bsd X-Mailer: Apple Mail (2.619.2) X-SA-Exim-Connect-IP: 67.161.222.227 X-SA-Exim-Mail-From: chad@shire.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on hobbiton.shire.net X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50 autolearn=disabled version=3.0.0 X-Spam-Level: X-SA-Exim-Version: 4.1+cvs (built Mon, 23 Aug 2004 08:44:05 -0700) X-SA-Exim-Scanned: Yes (on hobbiton.shire.net) cc: Chad Leigh Subject: kernel option HZ and mysql X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2005 17:25:42 -0000 I have a self-compiled mysql 4.1 (4.1.9) on FreeBSD 5.3. (Not built from ports for various reasons). The system load skyrockets when the web server that is using the mysql for its PHPnuke storage starts to get 100 or so or more active sessions. It appears that mysql is the "culprit." The webserver is a prefork apache 2 with php5 and runs on the same system. top and other monitors show very little cpu on the httpd processes but lots on the mysql. There is plenty of free and inactive RAM and the CPUs are not particularly stresses (dual Opteron 2.0ghz in i386 mode). I am thinking that maybe the HZ setting could be causing some inefficiencies for mysql. It is set at HZ=1300 mysql itself was compiled with $ ./configure --prefix=/usr/public/mysql/mysql4.1 --enable-assembler --enable-thread-safe-client --without-debug --with-extra-charsets=complex and it uses > ldd mysqld mysqld: libz.so.2 => /lib/libz.so.2 (0x283c2000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x283d2000) libpthread.so.1 => /usr/lib/libpthread.so.1 (0x283ea000) libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x2840e000) libm.so.3 => /lib/libm.so.3 (0x284e0000) libc.so.5 => /lib/libc.so.5 (0x284fa000) > I would appreciate it if someone who has experience in this with mysql and HZ and HZ in general could comment on how HZ might affect mysql performance and system load. Thanks Chad