3

I'd like to ask anyone with a bit of experience on an opinion of my current my.cnf settings and what optimizations should be done.

Server specs are:

  • CPU: AMD Opteron™ 3280, 8 Cores, 8x 2.4 GHz
  • RAM: 16 GB DDR3
  • 2x 2,000 GB SATA II-HDD, 7.2k - RAID 1 Software
  • Cloudlinux + Cpanel installed
  • Apache + Mysql 5.5 + NginxCP + eAccelerator

The current my.cnf file is:

[client]
port=3306
socket="/var/lib/mysql/mysql.sock"

[mysqld]
innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=10G
innodb_file_per_table=1
innodb_log_buffer_size=4M
innodb_flush_log_at_trx_commit=2
log-bin=mysql-bin
myisam_sort_buffer_size=64M
expire_logs_days=7
query_cache_size=128M
thread_cache_size=12
max_allowed_packet=15M
skip-federated
table_definition_cache=2048
local-infile=0
table_cache=8192
max_connections=60
read_buffer_size=2M
slow_query_log=1
slow_query_log_file="/var/log/slow_queries.log"
thread_concurrency=16
sort_buffer_size=2M
port=3306
join_buffer_size=16M
key_buffer_size=600M
query_cache_limit=10M
socket="/var/lib/mysql/mysql.sock"
skip-external-locking
query-cache-type=1
long_query_time=5
default-storage-engine=InnoDB
tmp_table_size=384M
max_heap_table_size=384M

[myisamchk]
read_buffer=2M
key_buffer=256M
sort_buffer_size=256M
write_buffer=2M

[mysqldump]
max_allowed_packet=16M
fthiella
  • 48,073
  • 15
  • 90
  • 106
Alex
  • 31
  • 1
  • 3
  • 1
    Its pretty difficult to optimise anything without knowing what to optimise for ... your settings would vary depending on usage (selects / inserts / updates) and table setup (schema / data) – Manse Nov 19 '12 at 10:54
  • Hi,Thanks for you reply. I forgot to mention that it's for hosting around 100 sites, all php based. All sites are on joomla and wordpress. Thanks – Alex Nov 19 '12 at 11:04
  • the same statement still stands really ... how busy are the sites (page views per day) ? queries per page ? type of queries ? selects / updates / inserts ? – Manse Nov 19 '12 at 11:24
  • Hi, the sites get around 200 visits a day each. 90 % of the queries are selects. They mostly either blogs which are updated once a day, or Joomla Presentation sites (content doesn't get updated very often) – Alex Nov 19 '12 at 11:44
  • You're worried that this beefy-ass server isn't going to handle just 20,000 hits per day? That's cute. – Sammitch Nov 19 '12 at 16:41
  • :) I'm not worried that it won't handle them now. We are going to start a major advertising campaign and the traffic will go up quite a lot on many of the sites. I'm not exactly worried, but wanted to get some opinions on the config and maybe some recommendations. – Alex Nov 19 '12 at 17:50

1 Answers1

0

DBAs recommended to use the Percona Wizard first o all https://tools.percona.com/wizard

Secondly follow this guide: http://www.percona.com/blog/2014/01/28/10-mysql-settings-to-tune-after-installation/

Anatoly
  • 15,298
  • 5
  • 53
  • 77