发现在线mysql数据库发现负载过高,
linux(centos) +mysql5 
linux用top发现内存3090980k total;
used 3003360
?什么原因

解决方案 »

  1.   

    是不是链接太多了 导致IO大量消耗设置 max_connections          | 100
    The number of simultaneous client connections allowed. By default, this is 151, beginning with MySQL 5.1.15. 
        max_user_connections     | 0
    The maximum number of simultaneous connections allowed to any given MySQL account. A value of 0 means “no limit.” 
      

  2.   

    实际上max_connections =500
    max_user_connections  = 0 
      

  3.   

    用工具观察 当前连接到数据库的机器 很少。
    (本应用架构是 几台webserver + 1db
    不存在用户直接连接机器的情况
      

  4.   

    3 core parameters:
    read_buffer_size=16M read_rnd_buffer_size=26k sort_buffer_size=134M (rather big)if 20 users are logging the system at the same time ,  prod1a's load will be
    16M*20+26k*20+134*20=3000M