From owner-freebsd-questions@FreeBSD.ORG Sun Jul 6 15:59:14 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52031106564A for ; Sun, 6 Jul 2008 15:59:14 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1E6158FC12 for ; Sun, 6 Jul 2008 15:59:13 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 2762E1CD18; Sun, 6 Jul 2008 07:59:13 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Sun, 6 Jul 2008 17:59:11 +0200 User-Agent: KMail/1.9.7 References: <4870894E.7090708@infracaninophile.co.uk> In-Reply-To: <4870894E.7090708@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807061759.12129.fbsd.questions@rachie.is-a-geek.net> Cc: John Almberg Subject: Re: Why would it make such a difference to move mysqld to another machine? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2008 15:59:14 -0000 On Sunday 06 July 2008 10:58:54 Matthew Seaman wrote: > I suspect that you could have achieved a pretty good speed-up simply by > adding another hard drive to your server and moving all of the database > onto it, separate from the web root and any other areas which apache > would be doing a lot of read/write operations on. In fact, when you look at the two top(1) outputs from OP, you can see that apache is eating all the memory and hardly any memory is left for IO cache. On the second machine you can see that MySQL is caching 49MB I/O, guessing this is the (sum of) the most used indexes or in case of InnoDB the entire InnoDB file. Since MySQL is clearly the bottleneck of the sites, I'd investigate why in the world apache2 needs >150M per process. If you're using the memcache module, it may actually speed things up considerably to *disable* it, since that would leave plenty IO cache for MySQL to work with. On the other hand, if there's so much I/O to cache for the webserver, maybe it's a good idea to configure a lightweight image (or other static content) server. This apache would only need mod_mime, mod_header and mod_expires (to set the caching). Personally, I wouldn't enable the mem cache on there either, since 80% of the time you'll be sending 304's, instead of image data. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.