How can I increase NDB's Data memory?

When I created lots of files, NDB data memory is almost full.

ERROR mysqlserver.MysqlServerConnector: NDB Data memory is 80.0% full

How can I configure NDB (increase its memory size) and rerun it?

Thanks.

I guess you only have 1 NDB datanode running (with 2 datanodes, you can do it online).
First shutdown the NDB datanode and mgmt node:

systemctl stop ndb_mgmd
systemctl stop ndbmtd

Then edit this file:
/srv/hops/mysql-cluster/config.ini
and increase memory in the section
[NDBD]
DataMemory=…

Save the config.ini and then run in this order:
systemctl start ndb_mgmd
systemctl start ndbmtd

Restart dependent services:
systemctl restart mysqld
systemctl restart namenode
systemctl restart resourcemanager
systemctl restart glassfish-domain1

More info on the configuration params can be found here:
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datamemory

1 Like

That’s really helpful. Thanks.