From owner-freebsd-questions@FreeBSD.ORG Thu Nov 22 19:59:32 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 130EC16A419 for ; Thu, 22 Nov 2007 19:59:32 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id E1F0C13C45A for ; Thu, 22 Nov 2007 19:59:31 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.50) id 1IvICs-00077c-IY for questions@FreeBSD.org; Thu, 22 Nov 2007 19:59:26 +0000 Received: from esperance.zetnet.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with SMTP id lAMJxO7x013144 for ; Thu, 22 Nov 2007 19:59:25 GMT Received: (qmail 10037 invoked by uid 1001); 22 Nov 2007 19:59:19 -0000 From: "Frank Shute" Date: Thu, 22 Nov 2007 19:59:19 +0000 To: Andrew Pantyukhin Message-ID: <20071122195919.GA10010@melon.esperance-linux.co.uk> References: <20071122094324.GD66812@amilo.cenkes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071122094324.GD66812@amilo.cenkes.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 6.3-PRERELEASE i386 X-Organisation: 'Esperance Linux' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (zetnet.co.uk [194.247.46.1]); Thu, 22 Nov 2007 19:59:25 +0000 (GMT) Cc: questions@FreeBSD.org Subject: Re: lightly loaded php+mysql - high syscall/csw rates X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 19:59:32 -0000 On Thu, Nov 22, 2007 at 12:43:25PM +0300, Andrew Pantyukhin wrote: > > 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. Andrew, I don't know if you've been following stable@ but there is a long thread there about php performance (amongst other things). http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/038371.html Titled: "2 x quad-core system is slower that 2 x dual core on FreeBSD"[sic] Apologies, if it's not related to the problem you're seeing. (It's over my head). -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html