From owner-freebsd-questions Tue Mar 12 5:48:28 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.the-i-pa.com (mail.the-i-pa.com [151.201.71.132]) by hub.freebsd.org (Postfix) with SMTP id CF6E437B404 for ; Tue, 12 Mar 2002 05:48:21 -0800 (PST) Received: (qmail 30293 invoked from network); 12 Mar 2002 13:50:27 -0000 Received: from unknown (HELO potentialtech.com) (151.201.71.209) by mail.the-i-pa.com with SMTP; 12 Mar 2002 13:50:27 -0000 Message-ID: <3C8E0835.5020302@potentialtech.com> Date: Tue, 12 Mar 2002 08:52:53 -0500 From: Bill Moran Organization: Potential Technology User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.3) Gecko/20010914 X-Accept-Language: en-us MIME-Version: 1.0 To: Bob Kersten Cc: freebsd-questions@freebsd.org Subject: Re: crontab and mysql References: <001e01c1c942$d5f25ea0$0200000a@alpha> <3C8D57E3.6050403@potentialtech.com> <002901c1c99d$0db0e5f0$2849a8c0@kerstenz6r4278> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [redirected to -questions because this isn't really a -stable question] Bob Kersten wrote: >>Can you watch "top" and "systat" (the vmstat screen) while >>these delays are occurring? >> > >Nothing weird there. mysqld and httpd are both using not more than 15% >processor capacity. I've sorted 'top' using the time column, and >mysqld is listed on top (that proves that it is indeed using way too >much time to do it's job): > That's an unfounded statement. Could be that the queries you're performing are processor intensive. Did you run systat? It looks like you're delving into swap space, and if you have a relatively slow disk on that system, you'll definately see a performance hit when the machine has to start swapping. Does running top while the system is under load ever show the free memory very low or a lot of swap activity? Is this an old 3600 RPM HDD you've got in this machine? >last pid: 21365; load averages: 0.01, 0.10, 0.06 up 1+14:29:17 >09: >27 processes: 1 running, 26 sleeping >CPU states: 2.3% user, 0.0% nice, 0.4% system, 0.4% interrupt, >97.0% i >Mem: 23M Active, 5500K Inact, 14M Wired, 4848K Cache, 14M Buf, 12M >Free >Swap: 113M Total, 88K Used, 113M Free > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU >COMMAND > 132 mysql 2 0 19840K 7188K poll 15:01 0.00% 0.00% >mysqld > >>Simply the size of the db isn't enough to diagnose. >>Do you have it well indexed, and are you searching >>on indexed columns? Lots of factors that could affect >>this. Was php compiled into Apache statically or as a >>module? >> > >Let's see, I have indexes on all columns that I use to limit a >resultset or search rows on. I've compiled PHP statically in apache >and I've included the mysql path in the --with-mysql=... option. I've >used the most recent sources of PHP, Apache and MySQL. > >Can you do something with this information? > Hmmm ... can you give me a dump on the table structure that's slow, as well as the exact SQL queries that seem to be unreasonably slow? -Bill Moran To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message