[PLUG] Tuning MySQL

Aaron Burt aaron at speakeasy.org
Wed Nov 12 15:32:02 UTC 2003


On Wed, 12 Nov 2003, Paul Heinlein wrote:
> We recently deployed a new set of (contractor-built) web apps at work
> that use MySQL as the backing store. According to top, mysqld is using
> about 75% of the cpu on our web server, a uniprocessor Sun V120
> running Solaris 9.
>
> That seems high to me, and vmstat/iostat indicate that most of the
> work is cpu-bound, not i/o stuff.

Off the top of my head, I'm gonna guess you need to add some indexes.
Don't add 'em willy-nilly; there should be ways to analyze the log and see
which queries to optimize for.  It'll help loads if you can get a database
schema (i.e. how the tables/fields/keys relate) from the contractor.

> If I were to start looking for mysqld options to tweak, what SHOW
> STATUS variables are likely to provide good clues? I haven't done any
> performance tuning with mysql, so don't feel bashful about making
> suggestions that would seem obvious to anyone with a clue. :-)

Those are questions best answered by a consultant, a visit to Powell's
Techbooks and/or some quality time with something like:
http://www.google.com/search?q=Mysql+tuning

Today's amateur goof is tomorrow's resume bullet,
  Aaron





More information about the PLUG mailing list