简体   繁体   中英

Mysql (Myisam) variable setting

I have a single processor dedicated server with 4GB RAM and a 400MB Mysql database (Myisam) who has big performance problems. The database is used by an ecommerce. I already tryied to tune it using the mysqltuner script, but without good results. Because the variable settings have been modified several times, I would like to have a basic configuration to start from, thereafter try to tune it.

Try this tool, it always show good results for performance tuning.

https://tools.percona.com/wizard

For ecommerce, you need InnoDB. If you don't change, you will be burned badly when a crash occurs at just the wrong instant in a monetary transaction.

Make that change, then

key_buffer_size = 20M
innodb_buffer_pool_size = 1000M

read my blog on moving from MyISAM to InnoDB .

When you then find that things are not working fast enough, do

  • long_query_time = 1
  • turn on the slowlog
  • wait a day
  • run pt-query-digest to find the worst couple of queries
  • present them to us for critique. The solution could be as simple as adding an composite index. Or maybe reformulating a SELECT.

I have redirected you toward slow queries because you cannot "tune" your way out of bad schema, bad queries, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM