mysql my.cnf
For a high traffic site which is database intensive and has a dedicated 16GB server for running mysql, my.cnf should looks something like ..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
[mysqld] datadir=/var/lib/mysql tmpdir=/var/lib/mysqltmp socket=/var/lib/mysql/mysql.sock skip-locking skip-name-resolve table_cache=2048 thread_cache_size=32 back_log=100 max_connect_errors=10000 open-files=10000 interactive_timeout=400 wait_timeout=300 max_connections=500 skip-bdb log-slow-queries=/var/lib/mysqllogs/slow-log long_query_time=2 log-queries-not-using-indexes max_allowed_packet=128M tmp_table_size=256M max_heap_table_size=256M query_cache_size=32M query_cache_limit = 6M sort_buffer_size=4M read_buffer_size=4M read_rnd_buffer_size=16M join_buffer_size=2M default-storage-engine=InnoDB key_buffer_size=128M myisam_sort_buffer_size=64M innodb_log_file_size=100M innodb_buffer_pool_size=6G innodb_additional_mem_pool_size=20M innodb_support_xa = 0 [mysql.server] user=mysql [mysqld_safe] |