From owner-freebsd-questions@FreeBSD.ORG Thu Nov 22 09:43:54 2007 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29F716A417 for ; Thu, 22 Nov 2007 09:43:54 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id A07E313C468 for ; Thu, 22 Nov 2007 09:43:54 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-141-134-164.pppoe.mtu-net.ru [85.141.134.164]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTP id 38CD5242F82A for ; Thu, 22 Nov 2007 12:43:27 +0300 (MSK) Date: Thu, 22 Nov 2007 12:43:25 +0300 From: Andrew Pantyukhin To: questions@FreeBSD.org Message-ID: <20071122094324.GD66812@amilo.cenkes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: lightly loaded php+mysql - high syscall/csw rates X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 09:43:54 -0000 We have a php+mysql web server. It serves 15-20 http requests per second, resulting in 100-200 sql qps. But according to vmstat(1), it all peaks at over 500k syscall/s and 100k cswitch/s. The peaks are quite frequent, even at this load. During the peaks top(1) shows 30-40k VCSW for mysql and around 1k vcsw for two php-cgi worker processes. IVCSW is relatively very low for all processes. This is a 4-core Opteron HP DL145 G2 server running 6.2/amd64 generic+quota. I'm considering a switch to 7.0. During peaks user/system/idle in top(1) is 20/30/50. The question is - is the syscall and csw rates normal or should I be trying to tune mysql and php more agressively? I'm not hungry for performance (haven't hit the limit yet), but a couple of days ago the server stopped responding until a cold reboot (which is another story) - and now I'm paying closer attention to its vitals.