0

Few things that I'm considering about NDBcluster when storing data in disk storage.

  • In my configuration i defined DataMemory=20G. So what would be the best total size of undo log files? I saw in a blog it should be 6xDataMemory. Is this a must?

  • When creating undo log files the best way to create is lot of small size files or small amount of big size files? As an example (10 of 1G Files or 100 of 100M files and if I create 200M files what is the best amount for buffer size)

  • Same goes with data file creating. Is the best way to create 10 of 1G file or 100 of 100M files?

  • I'm using separate data files for separate table spaces and always one table space for one table. Not using same table space for two tables. Is this a good way to defined and allocate table spaces or won't there any performance issues by using same table space for two tables?

(Here I deal with huge traffic kind of 4000 - 5000 TPS and database size for NDB almost 80GB. And I have 2 data nodes, 2 mysql servers. Each data node has 128GB memory.)

Wilson Hauck

chinthakaS
  • 125
  • 1
  • 2
  • 10

1 Answers1

0

UNDO log files are related to UNDO of disk data changes. So there is no real relation between UNDO log file size and DataMemory. There is a relation between DataMemory and REDO log size though since the REDO log is used by both In-memory data and disk-data parts.

Whether to use small files or bigger files is mostly dependent on the workings of the file system. Personally I would start with using fairly large files and not that many.

From a performance point of view there is no difference if you use one tablespace or if you use one per table. I always think about this as using one tablespace for all tables. But I don't know of any problems to use many tablespaces. There might be hardcoded limits on the number of tablespaces you can have though.

Obviously one tablespace per table means that you can get rid of files quick when dropping a table if that is of interest.

The size of the UNDO log should be quite ok with a few tens of GBytes for most use cases. But during massive inserts one might need a bigger size of the UNDO log since checkpoints can take a long time during massive inserts.