mysql配置不响应时间_Mysql配置优化 - 12GB RAM 2 x 2.4GHz服务器的IO响应时间慢

即使安装了memcached和APC,服务器也需要20多秒(等待时间/较慢的IO响应时间)才能响应HTTP请求。我认为这与MYSQL有关,因为该网站是很多INSERT查询。

任何帮助将不胜感激。提前致谢。

avg-cpu: %user %nice %system %iowait %steal %idle

6.38 0.03 1.05 0.40 0.00 92.14

avg-cpu: %user %nice %system %iowait %steal %idle

10.37 0.00 1.61 3.14 0.00 84.87

avg-cpu: %user %nice %system %iowait %steal %idle

9.40 0.00 1.41 1.53 0.00 87.67

avg-cpu: %user %nice %system %iowait %steal %idle

10.02 0.00 1.42 1.09 0.00 87.46

avg-cpu: %user %nice %system %iowait %steal %idle

9.32 0.00 1.31 0.78 0.00 88.59

avg-cpu: %user %nice %system %iowait %steal %idle

10.62 0.00 1.57 2.37 0.00 85.44专用服务器规格:

2 x Intel Xeon-Westmere 5620-Quadcore [2.4GHz] processors

6 x Hynix DDR3 2GB DDR3 x8 [2GB] (total of 12GB)

2 x Western Digital WD Caviar RE4 WD5003ABYX [500GB]

MySQL version: 5.1.56-log MySQL Community Server (GPL)

Current database size: 4.2 GiB ~25,350,659rows这是当前的my.cnf配置:

[mysqld]

set-variable = max_connections=1024

log-slow-queries

safe-show-database

back_log = 80

max_connect_errors = 9999999

table_cache = 5000

binlog_cache_size = 1M

max_heap_table_size = 128M

sort_buffer_size = 500K

join_buffer_size = 500K

thread_cache_size = 100

#thread_concurrency = 16

query_cache_size = 512M

query_cache_limit = 8M

query_cache_min_res_unit = 2K

thread_stack = 192K

tmp_table_size = 384M

default_table_type = INNODB

long_query_time = 2

log-slow-queries=/var/log/mysql.slow.queries.log

innodb_additional_mem_pool_size = 80M

innodb_buffer_pool_size = 9G

innodb_file_io_threads = 4

innodb_thread_concurrency = 33

innodb_log_buffer_size = 20M

innodb_log_file_size = 800M

innodb_log_files_in_group = 3

innodb_max_dirty_pages_pct = 90

innodb_lock_wait_timeout = 120

innodb_file_per_table = 1

read_rnd_buffer_size=2M

thread_concurrency=33

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值