mysql frequently crash on 6.2

Tom Samplonius tom at samplonius.org
Fri May 18 05:51:18 UTC 2007


----- "Albert Wong" <ajwwong at gmail.com> wrote:


> key_buffer = 32M

  key_buffer has the most influence over the performance of MyISAM database.  You should increase it as much as possible.  On a dedicated 2GB server, 1GB is good.  But it only helps, if you actually have indexes.  There is no point is increasing it bigger than the size of your indexes (*.MYI files).  But if you can hold all of the indexes in RAM, everything gets really, really fast.

  BTW, I agree with the other comments about the MySQL query cache.  It is more of a work around for two problems:

* A poorly indexed database, so that queries that return small results don't use an index, so caching the results is required.

* Dumb applications that send the same query over and over again, even though the database has not changed.  Some e-mail servers do this.

A query cache should be small (5MB or less), if you use it at all.  And you should never cache large results (there is an option that sets the size threshold).


  But I use MySQL 5.0 on several FreeBSD 6 systems, and they are moderately busy (250 q/s & 450 q/s), and it works ok.  MyISAM is the problem, and I need to switch to InnoDB.


Tom


More information about the freebsd-stable mailing list