mysql集群经常无法truncate_失败的mysql cluster配置-无法顺利转换已有数据

本文转自:http://bbs.chinaunix.net/archiver/?tid-819640.html

失败的mysql cluster配置-无法顺利转换已有数据

额配置了1个cluster,但测试下来始终无法体会到高性

能,在初始转换表的过程中就落败下来,表通过alter table,以及直接执行sql创建,都无法成功;

配置的ndb节点数据增长迅速,原来mysql下只有不到200M的文件,在ndb

cluster下达到6G之多.最后是出现ndb节点意外down掉.

请教成功运行的各位:

(1)你们的表结构中是否很少定义有vchar 255这样字节的变量?

查看cluster的mail list和 论坛,怀疑因为现有表中有定义过多256个字节变量导致数据增长迅猛的;

(2)重启cluster花费的时间很长吗?

测试下来,随着ndb notes data的不断增加,每次重启cluster服务,需要等待nodes从starting状态到正常这段时间也越长

(3)是否还有其他的参数需要配置,才能

下面是相关配置:

按文档,配置完成2个节点运行cluster. 1台作为ndb管理节点+ndb节点+sql 节点; 1台作为ndb节点+sql 节点;

mysql 为5.0.24, 没有用max版本,是编译出来的(不知是否会有影响--without-debug

--with-extra-charsets=complex --prefix=/usr/local/mysql --without-bench

--with-archive-storage-engine --with-ndbcluster)

欲转换已有1个db,在ndb下运行, 初始使用alter table engine=ndbcluster ,按ndb_size.pl工具测得参数如下:

Parameter          4.1          5.0          5.1

DataMemory (kb)         1335136         1335136         239072

IndexMemory (kb)         161168         81136         81136

MaxNoOfTables         88         88         88

MaxNoOfAttributes         529         529         529

MaxNoOfOrderedIndexes         91         91         91

MaxNoOfUniqueHashIndexes         91         91         91

MaxNoOfTriggers         364         364         364

实际配置文件中大小均有增加:

(有些参数是在alter table是出现table is full以及truncate

timeout之类的错误后进行调整添加的,比如TimeBetweenLocalCheckpoints,NoOfFragmentLogFiles,

很多参数调整或者出错后都运行了ndbd --initial)

# Options affecting ndbd processes on all data nodes:

[NDBD DEFAULT]

NoOfReplicas=2

DataMemory=1800M

IndexMemory=200M

MaxNoOfAttributes=10000

MaxNoOfTables=1760

MaxNoOfUniqueHashIndexes=5000

MaxNoOfOrderedIndexes=5000

MaxNoOfTriggers=4000

TimeBetweenLocalCheckpoints=2

NoOfFragmentLogFiles=100

# TCP/IP options:

[TCP DEFAULT]

portnumber=2202

# Management process options:

[NDB_MGMD]

id = 1

hostname=192.168.100.225

datadir=/usr/local/mysql-cluster

# Options for data node "A":

[NDBD]

id = 2

hostname=192.168.100.206

datadir=/usr/local/mysql/data

# Options for data node "B":

[NDBD]

id = 3

hostname=192.168.100.225

datadir=/usr/local/mysql/data

# SQL node options:

[MYSQLD]

id = 4

hostname=192.168.100.206

# SQL node options:

[MYSQLD]

id = 5

hostname=192.168.100.225

2006-8-29 16:06

stlaw

漏了这2个了

(3)是否还有其他的参数需要配置,从而优化cluster?

(4)cluster中,对于一张表是否能同时存在primary key 以及unique key?

alter table遇到的error:

1.  ERROR 1114 (HY000): The table '#sql-7157_2' is full

出现这个是配置的DataMemory数值不够,需要加大;

2. ERROR 1297 (HY000): Got temporary error 410 'REDO log files

overloaded, consult online manual (decrease

TimeBetweenLocalCheckpoints, and|or incre' from ndbcluster

出现这个错误后,调整了TimeBetweenLocalCheckpoints=2; NoOfFragmentLogFiles=100 这2个参数,

而且要--initial才能生效;

3. Internal program error (failed ndbrequire) (Internal error, programming error or missing error message, please report a bug)

ndb note 的服务自动停止, 每次重启cluster无法启动(这时该节点上的数据data dir占用空间6G多),后来只有 --initial

执行sql语句创建表时遇到的问题:

1. ERROR 1022 (23000) at line 49: Can't write; duplicate key in table 'members'

怀疑是此表有1个unique key ,加上cluster中每个表都必须要有primary key,有所冲突造成;

2. mysql> delete from members;

ERROR 1297 (HY000): Got temporary error 233 'Out of operation records

in transaction coordinator (increase MaxNoOfConcurrentOperations)' from

ndbcluster

在执行delete 删表的时候出现的错误,但后来通过 truncate table 删表成功;

请配置过cluster的各位发表一下建议阿, cluster 应该没那么弱吧, 难道免费的性能就不好吗?

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值