I am just setting up my new Linux Ubuntu 8.04 LTS server now, and getting ready for launch. My application is a PHP built application using the Zend Framework, and there is a MySQL heavy site (as are probably most sites). So far, I only have 1 server, and it is a full LAMP server.
What I am wondering, is what I should set these values up at (defaults shown) to get the best performance (keeping in mind, that this same server is also running apache and PHP) My server has 4 GB Ram. I only clipped the necessary values from the config file, to save mass confusion.
Here is a little more information:
Everything so far is the default install settings (database tables included). I am expecting about 100 transactions a second. I am not sure how much ram I can dedicate, as the server itself is also hosting apache and php, I have 1gm ram, and 4gb burstable (hosted on a virtual server). Mostly, my site will be dishing up static values (dating site), however, it will also be handling transactions from different users (saves, edits, etc).
Here are some sections of my my.cnf file, and their respective values…
Any help, or insight would be much appreciated.
# Fine Tuning
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
# Query Cache Configuration
query_cache_limit = 1M
query_cache_size = 16M
# Here you can see queries with especially long duration
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes
# BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
# InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
[isamchk]
key_buffer = 16M
Best Answer
MySQLTuner: