- 论坛徽章:
- 0
|
1台mgm
1台SQL NODES
4台DATA NODES
设置
NoOfReplicas=2
每台机器内存为4G,请问.
DataMemory和IndexMemory 参数应该怎样设置.
下面是文档中的例子
The following example illustrates how memory is used for a table. Consider this table definition:
CREATE TABLE example (
a INT NOT NULL,
b INT NOT NULL,
c INT NOT NULL,
PRIMARY KEY(a),
UNIQUE(b)
) ENGINE=NDBCLUSTER;
For each record, there are 12 bytes of data plus 12 bytes overhead. Having no nullable columns saves 4 bytes of overhead. In addition, we have two ordered indexes on columns a and b consuming roughly 10 bytes each per record. There is a primary key hash index on the base table using roughly 29 bytes per record. The unique constraint is implemented by a separate table with b as primary key and a as a column. This other table consumes an additional 29 bytes of index memory per record in the example table as well 8 bytes of record data plus 12 bytes of overhead.
Thus, for one million records, we need 58MB for index memory to handle the hash indexes for the primary key and the unique constraint. We also need 64MB for the records of the base table and the unique index table, plus the two ordered index tables.
没有看明白 谁能讲讲这两个参数是如何计算的吗?比如说我要在上面哪个表中存2000万条记录应该怎么设置那?
谢谢了. |
|