mysql集群,sql节点负载过高,而且链接经常出错

lllanm 2015-04-22 09:14:17
我用一台2颗4核cpu 32G内存的 服务器, 分出10台虚拟机,
搭建了一个mysql集群, 用.net链接测试的时候, 经常出现connection timeout 追加参数
链接改为
MySqlConnection("datasource=192.168.6.185;username=admin;password=1;database=piwik;Pooling=False;") 不出错
但是sql节点负载很高, 并发效率也不好
远远比不上我自己编译的mysql

进行监测的时候发现cpu资源耗光了 虚拟机145%的cpu消耗
真是搞不明白
...全文
101 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
lllanm 2015-04-22
  • 打赏
  • 举报
回复
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... # socket = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M [client] socket=/usr/local/mysql/sock/mysql.sock [mysqld] ndbcluster datadir=/usr/local/mysql/data socket=/usr/local/mysql/sock/mysql.sock default-storage-engine = ndbcluster key_buffer_size = 600M max_allowed_packet = 100M table_open_cache = 2048 sort_buffer_size = 1024M net_buffer_length = 8K read_buffer_size = 400M read_rnd_buffer_size = 200M lower_case_table_names =1 back_log = 384 thread_stack = 256K join_buffer_size = 500M thread_cache_size = 200 query_cache_size = 640M tmp_table_size = 256M max_connections = 5000 max_connect_errors = 10000000 wait_timeout = 2880000 interactive_timeout = 2880000 thread_concurrency = 8 ndb-connectstring=192.168.6.180 [mysql_cluster] ndb-connectstring=192.168.6.180 这个是我sql节点的配置

56,940

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧