[root@mfx224 ~]# cat /etc/ndbconfig.ini # ndb_mgmd -f /etc/ndbconfig.ini # This file is the ndbconfig.ini . ### For the mgm of the whole cluster. ### Created By MFX.MySQLDB Group . 2008-11-13... ###---------------- For Real System------------ ### ### 2 ManagerNode 1*1C4G ### 6 SQLNode 2*4C8G ### 4 DataNode 2*2C4GRAM ,NoOfReplicas=2 ### Max DBSize = 2(NodeGroup) * 32G/2(GroupSize) = 32G RAM . ### Our DB size min 2G max 8G . [NDBD DEFAULT] ### Copy of DataNode, DataGroup Size . ### NodeGroup = (DataNodeHostCount/NoOfReplicas) . NoOfReplicas=1 DataMemory= 500M ### DataPages 32KPagesize(TableData,Ordered indexes,Undo) ### one trans Record 1K,so Small trans Good . IndexMemory= 80M ### hash index(25bytes),PK index (40bytes) StringMemory=25 ##Memory space for Strings as TableNames.. ##use in ndb62 ###--------------------------about Transaction ----------------------------------------------- MaxNoOfConcurrentOperations=1000000 ###All the effected record count operated ###By DUI concurrent on All SQLNodes ###Can not be larger this . ###Default is 32768, ###One Record need 1K size. (1G Max) MaxNoOfLocalOperations = 1100000 ### 1.1 * MaxNoOfConcurrentOperations MaxNoOfConcurrentTransactions=40960 ###Default 4096, ###40960 is enough MaxNoOfConcurrentIndexOperations=40960 ##store unique hash index while querying ,pool size. ##Default 8192 row numbers.is rarely need to change. MaxNoOfFiredTriggers =20000 ##store unq hash index at inst or del ,pool size. ##Default 4000 row number.is rarely need to change. TransactionBufferMemory=1M ##The memory affected by this parameter is used for ##tracking operations fired when updating index ##tables and reading unique indexes . ##Default is 1M buffer pool,is rarely need to change. MaxNoOfConcurrentScans=500 ## Control the number of parallel scans that can be performed . ## Default is 256,max 500 . MaxNoOfLocalScans=600 ## Specifies the number of local scan records if many ## scans are not fully parallelized. BatchSizePerLocalScan=256 ##Calculate the number of lock records which must be there ##to handle many concurrent scan operations .default 64. LongMessageBuffer=1M ##An internal buffer used for passing ##messages within individual ##nodes and between nodes. ##---------------------------------Logging and buffers --------------------------------------- FragmentLogFileSize=16M ## use in after ndb6.1.11 ,default 16M. NoOfFragmentLogFiles=16 ## 6 x DataMemory / (4 x FragmentLogFileSize) ##MaxNoOfOpenFiles ##Default 40 . (some situation may has bug). ##InitialNoOfOpenFiles ##default 27 . ##MaxNoOfSavedMessages ##default 25 . Max trace file count,then overwriting old ones. ##-----------------------------------Metadata -------------------------------------------------------- MaxNoOfAttributes=80000 ## The attributes that can be defined in the cluster . ## Should =6 * greatest_number_of_attributes . MaxNoOfTables=1500 ## Max Table Number,Default 128,Max 1600.20k each. MaxNoOfOrderedIndexes=2048 ## Max Table Orderd Index Count.10K each. MaxNoOfUniqueHashIndexes=2048 ##Default 64, 15k each. ##Primary key,unique key . MaxNoOfTriggers=1000 ##Default is 768 , ##-----------------------------------checkpointing and others-------------------------------------------- LockPagesInMainMemory=1 ## 0: Disables locking. This is the default value. ## 1: Performs the lock after allocating memory for the process. ## 2: Performs the lock before memory for the process is allocated. ###ODirect=1 ## Enabling this parameter causes NDB to attempt using O_DIRECT writes ## for LCP, backups, and redo logs, often lowering kswapd and CPU usage. ## MySQL Cluster Linux, ODirect should be enabled for 2.6 orla kernels. ## !! I do not know if can improve the performance .!! TODO List: Test !!! ## Default is disabled . StartFailureTimeout= 1200000 ## if DataNode has not complete in time , startup fails. ## a Node has GB Data,should as log as 10 -15minutes. ## 1200000 ms = 20minutes. TimeBetweenGlobalCheckpoints=2000 ## Save to Disk For GCP interval.Deft = 2000 ms. TimeBetweenLocalCheckpoints=20 ## Save to Disk For LCP DataSize.Deft = (4*2e20)=4M. TimeBetweenWatchDogCheck=30000 ##Check the chunk thread every this interval. TransactionInactiveTimeout=16000 ## maximum time that is permitted to lapse between operations ## in the same transaction before the transaction is aborted. ## 16 seconds, It is enough . TimeBetweenInactiveTransactionAbortCheck=1000 ## Check transaction if abort interval. TransactionDeadlockDetectionTimeout=20000 ## DeadLock waiting time . TimeBetweenEpochs =20 ## The interval between synchronisation epochs for ## MySQL Cluster Replication . (ms) dft=100ms. TimeBetweenEpochsTimeout=4000 ## A timeout for synchronisation epochs for ## MySQL Cluster Replication .(ms) dft=4s. MaxBufferedEpochs =1000 ##The number of unprocessed epochs by which a ##subscribing node can lag behind .counts. ## dft 100 . SharedGlobalMemory = 64M DataDir=/usr/local/mysql/cluster BackupDataDir=/usr/local/mysql/BACKUP [ndb_mgmd default] DataDir=/usr/local/mysql/cluster [TCP default] SendBufferMemory=4M ReceiveBufferMemory=4M [MYSQLD default] BatchByteSize=64k ##dft 32k. BatchSize=128 ##dft 64,max 992. MaxScanBatchSize=1M ##each batch sent from each data node. dft 256k . [NDB_MGMD] Hostname= 10.4.6.224 logDestination=FILE:filename=cluster.log,maxsize=100000,maxfiles=6 [NDBD] HostName= 10.4.6.222 [NDBD] HostName= 10.4.6.223 [MYSQLD] HostName= 10.4.6.220 [MYSQLD] HostName= 10.4.6.225 [MYSQLD] HostName= 10.4.6.208 [MYSQLD] HostName= 10.4.6.219 [MYSQLD] #HostName= 10.4.6.221 [MYSQLD] [MYSQLD]