Jeremy Cole wrote:
--------------------------------------------
> ===
> Server version:         4.0.0-alpha-log
> Threads: 408  Questions: 183163443  Slow queries: 4009  Opens: 43522
Flush
> tables: 1  Open tables: 239  Queries per second avg: 222.828
> ===

Some free configuration advice:

* You should increase your ``table_cache'' variable, ``Opens'' is much
  higher than ``Open_tables'' indicating that MySQL is having to close
  other tables in order to open some for new clients.
--------------------------------------------

Its always good to recheck one's configuration. I took a look at our
stats and noticed our opens were much higher than our open tables. But
our table cache is set high enough (2500).

Server version          3.23.44-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 8 hours 15 min 41 sec

Threads: 63  Questions: 33231571  Slow queries: 52  Opens: 48114  Flush
tables: 1  Open tables: 599 Queries per second avg: 1117.366

I wonder if opens counts temp tables (explicitly or implicitly created).

Anyhow, in the above config, the high count of Threads may lead to an
unstable machine particularly on Linux with large per thread caches
(there is an equation in the MySQL manual somewhere for this). I'll bet
he is using PHP and Apache and has persistent connection on PHP and
Keep-Alive on Apache.

The MySQL module for PHP is the biggest barrier to scaling in this
situation. All database modules are bad in PHP, everyone knows it, very
few have the time, resources, or money to fix things. [Case in point: if
I had the money, I'd make the time...] There is SQL relay
(http://www.firstworks.com/sqlrelay.html) though I have yet to try it.
Has anyone? 

A quick (partial) fix is to use MM inside PHP so persistent connections
act as expected (i.e. shared between processes). Even easier (sloppier)
fix is to not use Keep-Alive, use persistent connections, but have the
timeout inside mysql be a couple of seconds. That gets a better match
between active http processes and mysql threads with the least bit of
effort.

Sincerely,
Steven Roussey
http://Network54.com/?pp=e 



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to