# USEFULL HELP PAGES: # http://johanandersson.blogspot.com/2008/04/great-configini.html # http://mysql2.mirrors-r-us.net/doc/refman/5.0/en/mysql-cluster-ndbd-definition.html [NDBD DEFAULT] NoOfReplicas=1 # Number of Replicas: This defines what Node groups contain the # same data for HA. # So, say we have 8 Data notes with ids 2,3,4,5,6,7,8,9 # Node Group 1: 2,3 Node Group 2: 4,5 Node Group 3: 6,7 # Node Group 4: 8,9 # To make sure you don't loose data don't stick a Node Group on # the Same box: i.e. ID 2,3 # should not be the same box. DataMemory=58G # How much memory to allocate for database records and indexes # All data is stored in FIX size, so a VARCHAR(255) will take 255 bytes # Each record also has some overhead. 16-bytes since each record is # stored in a # 32 KB page with 128 byte page overhead. # CREATE TABLE test ( # a INT NOT NULL, # b INT NOT NULL, # c INT NOT NULL, # PRIMARY KEY (a), # UNIQUE KEY (b) # ) # # 3 * 4 = 12 bytes + fixed overhead 12 bytes # (4 bytes are saved from fixed since no null columns) # == 24 byte Record size # DataMemory also stores Index Data, it's called ordered data; # 10 bytes to be exact a(4)+1byte + b(4)+1byte = 10 byte overhead # per record. # 34 byte Record Size # so 963 Data records fits in a single page #Usually between 1/6 or 1/8 of the DataMemory is enough, but depends on the #number of unique hash indexes (UNIQUE in table def) IndexMemory=3G # How much memory to allocate for index storage, this is really # mis labled it should be HashIndexMemory # The primary key and unique key are hash indexes and they are # implemented in a way # where each key has a 25 byte overhead + size of the column # In our example it's 29 bytes for the Primary Key # 29 bytes for the Unique Key + 8 bytes for b+a + 12 bytes of # overhead (4 bytes saved) # since the Unique key is translated into an internal table with b as the PRIMARY and a as a column. # #Bypass FS cache (you should test if this works for you or not) Odirect=1 #LockPagesInMainMemory=1 # prevent swapping Diskless=0 # 0 = write to disk, 1 = no disk backup #TimeBetweenWatchDogCheck=10000 HeartbeatIntervalDbDb=10000 HeartbeatIntervalDbApi=10000 #TimeBetweenLocalCheckpoints=19 #NoOfDiskPagesToDiskAfterRestartTUP=54 #default=40 #NoOfDiskPagesToDiskAfterRestartACC=8 #default=20 #Redolog #size of each redo log fragment, 4 redo log fragment makes up on fragment log file. # A bigger Fragment log file size that the default 16M works better with high write load # and is strongly recommended!! FragmentLogFileSize=256M #Set NoOfFragmentLogFiles to 6xDataMemory [in MB]/(4 *FragmentLogFileSize [in MB] #Thus, NoOfFragmentLogFiles=6*10000/1024=60 #The "6xDataMemory" is a good heuristic and is STRONGLY recommended. #NoOfFragmentLogFiles=60 NoOfFragmentLogFiles=30 RedoBuffer=256M # 32M BAD SharedGlobalMemory=1024M #When using disk based tables DiskPageBufferMemory=2G #table related things MaxNoOfTables=4096 MaxNoOfAttributes=24756 MaxNoOfOrderedIndexes=2048 MaxNoOfUniqueHashIndexes=512 #Operation records #MaxNoOfConcurrentOperations=100000 means that you can load any mysqldump file into cluster. MaxNoOfConcurrentOperations=100000 #This parameter specifies how long the Cluster waits for all data nodes to come up before the # cluster initialization routine is invoked. This timeout is used to avoid a partial Cluster startup whenever possible. #The default value is 30000 milliseconds (30 seconds). 0 disables the timeout, # in which case the cluster may start only if all nodes are available. StartPartialTimeout=120000 [MYSQLD DEFAULT] [NDB_MGMD DEFAULT] [TCP DEFAULT] SendBufferMemory=2M ReceiveBufferMemory=2M # Management Server [NDB_MGMD] HostName=10.55.2.41 # IP address of NGB management node # Storage Nodes [NDBD] HostName=10.55.2.41 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.42 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.43 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.44 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.45 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.46 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.47 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.48 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.49 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.50 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.51 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.52 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.53 # IP address of NDBD node DataDir=/var/lib/mysql-cluster [NDBD] HostName=10.55.2.54 # IP address of NDBD node DataDir=/var/lib/mysql-cluster