· 6 years ago · Jul 03, 2019, 07:34 AM
1CREATE TABLE IF NOT EXISTS user (
2 `FIELD_KEY` varchar(255) NOT NULL,
3 `FIELD0` text,
4 `FIELD1` text,
5 `FIELD2` text,
6 `FIELD3` text,
7 `FIELD4` text,
8 `FIELD5` text,
9 `FIELD6` text,
10 `FIELD7` text,
11 `FIELD8` text,
12 `FIELD9` text,
13 PRIMARY KEY (YCSB_KEY)
14) ENGINE=ndbcluster DEFAULT CHARSET=utf8 max_rows=40000000
15TABLESPACE ts_1 STORAGE DISK;
16
17
18ALTER TABLE usertable4M PARTITION BY KEY() PARTITIONS 4
19
20[ndbd default]
21noofreplicas=1
22DataMemory=2048M
23# Memory to allocate for index storage
24IndexMemory=1024M
25# To support multi-thread processors
26MaxNoOfExecutionThreads=2
27FragmentLogFileSize=256M
28NoOfFragmentLogFiles=12
29#-------
30RedoBuffer=32M
31SharedGlobalMemory=256M
32DiskPageBufferMemory=4096M
33NoOfFragmentLogParts = 4
34#-------
35[ndb_mgmd]
36HostName=192.168.1.10
37DataDir=/var/lib/mysql-cluster
38
39[ndbd]
40HostName=192.168.1.10
41NodeId=2
42DataDir=/usr/local/mysql/data
43
44[mysqld]
45HostName=192.168.1.10
46
47CREATE LOGFILE GROUP lg ADD UNDOFILE 'undo1.dat'
48INITIAL_SIZE=12288M
49UNDO_BUFFER_SIZE=32M
50ENGINE=NDB;
51
52CREATE TABLESPACE ts_1
53ADD DATAFILE 'data1.dat'
54USE LOGFILE GROUP lg
55INITIAL_SIZE=256M
56ENGINE=NDB;
57
58ALTER TABLESPACE ts_1 ADD DATAFILE 'data2.dat' INITIAL_SIZE=256M ENGINE=NDB;
59.
60.
61.
62ALTER TABLESPACE ts_1 ADD DATAFILE 'data24.dat' INITIAL_SIZE=256M ENGINE=NDB;
63
64$ sudo ndb_mgm -e 'all report MemoryUsage'
65Connected to Management Server at: 192.168.1.10:1186
66Node 2: Data usage is 94%(62259 32K pages of total 65536)
67Node 2: Index usage is 2%(2801 8K pages of total 131104)