请帮助请关于这个问题的build议。
在cpu 20-30%us + sy上正常加载。 恢复从服务器(相同版本)的数据库文件后,开始了一个周期性的问题。 mysql开始加载100%的cpu(us + sy按比例增长)。 队列正在增长,一切都变慢了。 但是用mysqladmin flush-tables被标准化了几个小时。
运行mysql的专用linux服务器2个E5506 24Gb RAM,数据库大小50Gb。
[OK] Currently running supported MySQL version 5.0.51a-24 + lenny4-log [OK] Operating on 64-bit architecture -------- Storage Engine Statistics --------------------------------------- ---- [-] Status: + Archive-BDB-Federated + InnoDB-ISAM-NDBCluster [-] Data in MyISAM tables: 33G (Tables: 1474) [-] Data in InnoDB tables: 1G (Tables: 4) [-] Data in MEMORY tables: 120K (Tables: 3) [-] Reads / Writes: 91% / 9% [-] Total buffers: 12.8M per thread and 7.1G global [OK] Maximum possible memory usage: 15.8G (66% of installed RAM)
4000 – 5500 rps
key_buffer = 1536M max_allowed_packet = 2M table_cache = 4096 sort_buffer_size = 409584 read_buffer_size = 128K read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 500 query_cache_size = 100M thread_concurrency = 24 max_connections = 700 tmp_table_size = 4096M join_buffer_size = 4M max_heap_table_size = 4096M query_cache_limit = 1M low_priority_updates = 1 concurrent_insert = 2 wait_timeout = 30 server-id = 1 log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M innodb_buffer_pool_size = 1536M innodb_log_buffer_size = 4M innodb_flush_log_at_trx_commit = 2
如何解决这个问题?
我觉得在获得好的答案之前,你需要缩小一下发生的事情。 我将开始打开慢查询日志,看是否是由任何具体的查询造成的,也可能运行mysqlcheck作为一个完整性testing。
你是否试图从从机到主机进行同步? (不应该工作)或在主站上恢复的从站转储?