Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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