From owner-freebsd-isp@FreeBSD.ORG Tue Jun 24 17:29:41 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2EEF37B401 for ; Tue, 24 Jun 2003 17:29:41 -0700 (PDT) Received: from mta8.adelphia.net (mta8.adelphia.net [64.8.50.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B87C743FBD for ; Tue, 24 Jun 2003 17:29:40 -0700 (PDT) (envelope-from robinche@vividnet.com) Received: from vividnet.com ([24.55.50.114]) by mta8.adelphia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030625002940.LFAH1354.mta8.adelphia.net@vividnet.com>; Tue, 24 Jun 2003 20:29:40 -0400 Message-ID: <3EF8ECFF.7020302@vividnet.com> Date: Tue, 24 Jun 2003 17:29:51 -0700 From: Robin Chen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ralph Forsythe References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-isp@freebsd.org Subject: Re: MySQL / apache tuning X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 00:29:41 -0000 Make sure you are not running PHP as CGI, and turn on persistent connections for MySQL. You may have to tune the number of allowed connection in php.ini. Make sure also that your script is using persistent connect to access the database. You might also consider putting the database files on a different hard drive or even better spanning over a couple drives if that's possible. Slower hard drive access = slower look up = more threads being run simultaneously = more memory usage. For faster PHP parsing, try Zend Optimizer. It's free from http://www.zend.com/store/products/zend-optimizer.php Not sure if this helps much, but when I compile PHP, I try to strip it down as much as possible.. I know I'm not going to use xml, gd, imap, sessions, etc so I don't build it in. Robin Ralph Forsythe wrote: >Not my server, not my app, and not an option. :) > >It's not running too slow at the moment actually (could be a little faster >tho), but the memory usage is just outrageous. Ways to "trim the fat" so >to speak on mysql would be good, with apache I've been finding some things >to try. I did read up on mysql.com's site about my.cnf tuning, however >they don't really go into the ramifications of changing variables. I >don't want to just follow an example, I want to actually base the numbers >off something useful. > >Thanks, >-rf > >On Tue, 24 Jun 2003, Kevin Lyons wrote: > > > >>mysql is not your problem. throw php away and write the app in c. >> >>