Ich habe das bei uns so (die Werte, die gleiche Zahlen haben, sollten auch gleich sein, z.B. max_heap_table_size und tmp_table_size sowie die drei Werte mit der 32000).
Den Kram für MyISAM kannst Du ignorieren.
skip-external-locking = 1
skip-name-resolve = 1
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = localhost
#
# * Fine Tuning
#
join_buffer_size = 2M
key_buffer_size = 2048M
bulk_insert_buffer_size = 32M
max_allowed_packet = 256M
thread_stack = 2048K
thread_cache_size = 384
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam_recover_options = BACKUP,FORCE
myisam_sort_buffer_size = 64M
max_connections = 450
table_cache = 32000
table_open_cache = 32000
max_heap_table_size = 512M
#thread_concurrency = 10
concurrent_insert = 2
connect_timeout = 15
read_buffer_size = 2M
#select_into_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 1M
tmp_table_size = 512M
transaction_isolation = READ-COMMITTED
table_definition_cache = -1
# * Query Cache Configuration
#
query_cache_limit = 2M
query_cache_size = 64M
query_cache_type = 1
query_cache_min_res_unit= 2k
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general_log_file = /var/log/mysql/mysql.log
general_log = 0
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
expire_logs_days = 7
max_binlog_size = 100M
binlog_format = ROW
#binlog_do_db = include_database_name
#binlog_ignore_db = exclude_database_name
#
# * 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!
innodb_buffer_pool_size=4G
innodb_io_capacity=1000
innodb_buffer_pool_instances=4
innodb_flush_log_at_trx_commit=2
innodb_log_buffer_size=64M
innodb_max_dirty_pages_pct=90
innodb_file_per_table=1
innodb_open_files=32000
innodb_flush_method=O_DIRECT
innodb_log_file_size=1G
[isamchk]
key_buffer = 2048M