出于测试目的,我设置了一个MySQL集群,其中包含3个Amazon EC2 Medium(1个核心,2个ecu,3.7GB ram,ubuntu 12.04 lts):1个用于mgm + sql的计算机,另外2个用于数据节点的计算机。这里是自动安装程序生成的config.ini(以后为我的模板):
[NDB_MGMD DEFAULT]
Portnumber=1186
[NDB_MGMD]
NodeId=49
HostName=10.0.0.10
DataDir=/usr/local/mysql/data/49/
Portnumber=1186
[TCP DEFAULT]
SendBufferMemory=4M
ReceiveBufferMemory=4M
[NDBD DEFAULT]
BackupMaxWriteSize=1M
BackupDataBufferSize=16M
BackupLogBufferSize=4M
BackupMemory=20M
BackupReportFrequency=10
MemReportFrequency=30
LogLevelStartup=15
LogLevelShutdown=15
LogLevelCheckpoint=8
LogLevelNodeRestart=15
DataMemory=650M
IndexMemory=120M
MaxNoOfTables=4096
MaxNoOfTriggers=3500
NoOfReplicas=2
StringMemory=25
DiskPageBufferMemory=64M
SharedGlobalMemory=20M
LongMessageBuffer=32M
MaxNoOfConcurrentTransactions=16384
BatchSizePerLocalScan=512
FragmentLogFileSize=256M
NoOfFragmentLogFiles=3
RedoBuffer=32M
MaxNoOfExecutionThreads=2
StopOnError=false
LockPagesInMainMemory=1
TimeBetweenEpochsTimeout=32000
TimeBetweenWatchdogCheckInitial=60000
TransactionInactiveTimeout=60000
HeartbeatIntervalDbDb=15000
HeartbeatIntervalDbApi=15000
[NDBD]
NodeId=1
HostName=10.0.0.21
DataDir=/usr/local/mysql/data/1/
[NDBD]
NodeId=2
HostName=10.0.0.22
DataDir=/usr/local/mysql/data/2/
[MYSQLD DEFAULT]
[MYSQLD]
NodeId=53
HostName=10.0.0.10
群集开始很好。然后我尝试导入一个示例Joomla数据库,我已经改变了一点:InnoDB到NDB,一些大的VARCHAR字段到TEXT字段。但是在成功导入某些表后,我在下一个表上遇到错误:Error Code: 1114. The table 'xxx' is full
。下一个表非常简单:
CREATE TABLE IF NOT EXISTS `joomla_finder_links_terms3` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) ENGINE=NDB DEFAULT CHARSET=utf8;
我检查了MemoryUsage,它只是1%:
ndb_mgm -e 'all report MemoryUsage'
Connected to Management Server at: 10.0.0.10:1186
Node 1: Data usage is 1%(286 32K pages of total 20640)
Node 1: Index usage is 1%(259 8K pages of total 14752)
Node 2: Data usage is 1%(286 32K pages of total 20640)
Node 2: Index usage is 1%(259 8K pages of total 14752)
有人能告诉我,我做错了吗?谢谢你。
[编辑1]
注意:示例db只是结构,没有数据,没有行。