1

The mysql cluster has 4 directories namely D8 D9 D10 D11 for redo logfiles. But while inserting into table only one redo directory is used. I ran following command to get redo information "all dump 2398" and i get:

REDO part: 0 HEAD: file: 0 mbyte: 0 TAIL: file: 0 mbyte: 0 total: 12 free: 12 (mb) REDO part: 1 HEAD: file: 0 mbyte: 0 TAIL: file: 0 mbyte: 0 total: 12 free: 12 (mb) REDO part: 2 HEAD: file: 1 mbyte: 0 TAIL: file: 2 mbyte: 2 total: 12 free: 6 (mb) REDO part: 3 HEAD: file: 0 mbyte: 0 TAIL: file: 0 mbyte: 0 total: 12 free: 12 (mb)

It doesn't uses REDO part: 0 REDO part: 1 REDO part: 4 . It only uses REDO part: 3 It will give "ERROR 1297 (HY000): Got temporary error 410 'REDO log files overloaded (decrease TimeBetweenLocalCheckpoints or increase NoOfFragmentLogFiles)' from NDBCLUSTER" inspite of using rest of redo files. Why should we allocate 4 times space if it only uses 1 of 4 redo files?

4

Each data node's redo log has a number of 'parts' - currently 4 by default. Each redo log part is like a mini redo log, with 1 / Num_parts of the capacity defined for 'Redo log'. This design increases file system and lower layers parallelism when writing the redo log, but requires balance across the parts to be reasonable.

When a table is created, table fragments are created on each data node. Each fragment is assigned a redo log part which will be used to log all of the activity on the fragment - e.g. inserts, updates, deletes.

A table with only a single fragment on a particular data node will use only one redo log part, and you will see an imbalance in the use of the redo log parts as you have shown.

Where a table has multiple fragments stored on a data node, they will use different redo log parts, and the use of the different parts is balanced.

Where you have more than one table, the fragments of other tables will use different redo log parts, and the use of different parts will be statistically balanced.

So try creating the single table with more fragments (increase MAX_ROWS, or specify PARTITIONS=X in the CREATE TABLE statement), and see if the redo log part usage is more balanced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.