0

I have dedicated server (Intel Quad Core Xeon E5645 VT, 6 GB RAM). But i have problems with mysql.

My site have 40-60k unical users every day. I need to config my.cnf for best performance.

My currently config:

key_buffer              = 256M
max_allowed_packet      = 32M
thread_stack            = 320K
thread_cache_size       = 20
myisam-recover         = BACKUP
max_connections        = 500
myisam_sort_buffer_size = 24M
table_cache            = 1024
tmp_table_size = 48M
query_cache_limit       = 3M
query_cache_size        = 128M
Zulfugar Ismayilzadeh
  • 2,643
  • 3
  • 16
  • 26

1 Answers1

1

For table_open_cache, take a look at this page: https://kb.askmonty.org/en/optimizing-table_open_cache/ (it is about MariaDB, but is also valid for MySQL)

For key_buffer_size: https://kb.askmonty.org/en/optimizing-key_buffer_size/

For max_connections: https://kb.askmonty.org/en/handling-too-many-connections/

Of course myisam-recover=BACKUP can slow you down, so be sure it is necessary. But I advice you add FORCE, in case your server crashes.

Check if query_cache_limit is too high (of course this depends from your workload). tmp_table_size is very important to avoid disk-based temporary tables, but I can't help you, because only you know how heavy your GROUP BYs are.

If you don't use InnoDB, you can disable the plugin to save memory.

Federico Razzoli
  • 4,901
  • 1
  • 19
  • 21