- 论坛徽章:
- 0
|
本帖最后由 yanwp 于 2010-03-16 11:46 编辑
先简单说说机器配置:
三台 cpu是8核 内存16G
打算
1个管理节点 1个sql节点 在一个机器上
2个数据节点各自是一个机器
问题:
1 现在一个表的数据大概是8G,这个表有一个text字段,好几个字段的长度是255,只对id做索引。现在写了一个存储过程,按照id划分成40分,然后40次调用这个存储过程,大概用时是1个小时。
这个表的数据如果用myisam的话,也就3分钟就可以导入数据库。
2 现在datamemory两台数据节点都是9个G,现在已经使用了88%,集群为什么这么专用内存,是不是配置有误?
配置文件: config.ini
[TCP DEFAULT]
SendBufferMemory=96M
ReceiveBufferMemory=96M
[NDB_MGMD DEFAULT]
totalSendBufferMemory=50M
PortNumber=1186
Datadir=/var/lib/mysql-cluster/
[NDB_MGMD]
id=1
Datadir=/var/lib/mysql-cluster/
Hostname=ip1
[NDBD DEFAULT]
NoOfReplicas=1
Datadir=/var/lib/mysql-cluster/
DataMemory=9G
IndexMemory=2G
TotalSendBufferMemory=50M
LockPagesInMainMemory=1
ODirect=1
MaxNoOfConcurrentOperations=1000000
MaxNoOfConcurrentTransactions =1000000
StringMemory=25
MaxNoOfTables=4096
MaxNoOfOrderedIndexes=2048
MaxNoOfUniqueHashIndexes=512
MaxNoOfAttributes=24576
DiskCheckpointSpeedInRestart=100M
InitFragmentLogFiles=FULL
FragmentLogFileSize=256M
NoOfFragmentLogFiles=32
RedoBuffer=32M
TimeBetweenLocalCheckpoints=6
TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=100
MemReportFrequency=30
#BackupReportFrequency=10
### Params for setting logging
LogLevelStartup=15
LogLevelShutdown=15
LogLevelCheckpoint=8
LogLevelNodeRestart=15
### Params for increasing Disk throughput
BackupMaxWriteSize=1M
BackupDataBufferSize=16M
BackupLogBufferSize=4M
BackupMemory=20M
#Reports indicates that odirect=1 can cause io errors (os err code 5) on some systems. You must test.
#ODirect=1
### Watchdog
#TimeBetweenWatchdogCheckInitial=30000
### TransactionInactiveTimeout - should be enabled in Production
#TransactionInactiveTimeout=30000
### CGE 6.3 - REALTIME EXTENSIONS
#RealTimeScheduler=1
#SchedulerExecutionTimer=80
#SchedulerSpinTimer=40
### DISK DATA
#SharedGlobalMemory=512M
#read my blog how to set this:
#DiskPageBufferMemory=1024M
### Multithreading
MaxNoOfExecutionThreads=8
[NDBD]
id=2
Datadir=/var/lib/mysql-cluster/
Hostname=ip2
#LockExecuteThreadToCPU=X
#LockMaintThreadsToCPU=Y
[NDBD]
id=3
Datadir=/var/lib/mysql-cluster/
Hostname=ip3
#LockExecuteThreadToCPU=X
#LockMaintThreadsToCPU=Y
[MYSQLD]
id=4
Hostname=ip1
totalSendBufferMemory=50M
[MYSQLD]
[MYSQLD]
[MYSQLD]
[MYSQLD]
[MYSQLD] |
|