List:General Discussion« Previous MessageNext Message »
From:Matthias Trevarthan Date:March 14 2003 3:15pm
Subject:FreeBSD + MySQL bottleneck
View as plain text  
Howdy list,

I run MySQL 3.23.54 with FreeBSD 4.6-RELEASE.

We recently had a BBS get hammered by a lot of
concentrated traffic.

I currently run a '' script from
cron on Wednesday and Sunday that executes:

${bindir}/myisamchk -i -r --check --sort-index --analyze ${datadir}/*/*.MYI
${bindir}/isamchk -i -r --analyze --sort-index ${datadir}/*/*.ISM

This works great to keep my databases lean and mean
for normal server load and traffic, but this last
hit was just too much. The server was bottlenecked

Problem was, I couldn't figure out where!

I'm running SCSI 160 disks in a Raid config, with a
dual 1GHZ PIII and 1G of SDRAM. I'd think that setup
would be able to handle some pretty killer loads...

Anyway, I ran 'top', and MySQL was turning about 97%
processor utilitzation on one processor.

It said I still had 128M of free ram left (and my
MySQL tables are all under 10M). And I was only using
3% swap, which is normal because I run phpa_accelerator.

Also, 'mysql> show status;' showed that I only had
about 25 threads open at a time. And it also said I
had 82 tables open.

My T1s were NOT maxed out. They weren't even half full,
and besides: I accessed the BBS from our 100Mb switch,
and it was still dog slow (20-30 seconds for a page load),
which means it was purely a bottleneck in my machine.

So, my questions are these:

Can any experienced MySQL-FreeBSD admins out there
give me some pointers for identifying bottlenecks?

Specifically, I don't know how to determine if my
disks were being maxed out. Could someone give me
some pointers?

And also, from 'show status', is the number of 'threads'
directly related to the specific number of MySQL socket
connections? (I have MySQL setup to allow up to 200 and I
wasn't even getting over 30 from 'netstat | grep -i mysql')

Any help would be appreciated! Thanks!

FreeBSD + MySQL bottleneckMatthias Trevarthan14 Mar
  • Re: FreeBSD + MySQL bottleneckJohn Wards14 Mar
  • RE: FreeBSD + MySQL bottleneckJoe Stump14 Mar
    • Re: FreeBSD + MySQL bottleneckJeremy Zawodny14 Mar
      • Re: FreeBSD + MySQL bottleneckMatthias Trevarthan14 Mar
  • Re: FreeBSD + MySQL bottleneckwalt14 Mar
  • Re: FreeBSD + MySQL bottleneckWarren W. Gay VE3WWG14 Mar
  • Re: FreeBSD + MySQL bottleneckJesse Guardiani15 Mar
    • Re: FreeBSD + MySQL bottleneckDan Nelson15 Mar