31.07.2013 Views

MySQL Cluster Tutorial - cdn.oreillystatic.com

MySQL Cluster Tutorial - cdn.oreillystatic.com

MySQL Cluster Tutorial - cdn.oreillystatic.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The counter_name indicates what events are being counted and the val field provides the<br />

current count (since the last restart for the node).<br />

This information can be used to understand how an application’s SQL queries (or NDB API<br />

method calls) are mapped into data node operations and can be invaluable when tuning<br />

the database and application.<br />

ndbinfo.logbuffers<br />

This view presents information on the size of the redo and undo log buffers as well as how<br />

much of that space is being used:<br />

mysql> select * from ndbinfo.logbuffers;<br />

+---------+----------+--------+----------+----------+--------+<br />

| node_id | log_type | log_id | log_part | total | used |<br />

+---------+----------+--------+----------+----------+--------+<br />

| 3 | REDO | 0 | 1 | 67108864 | 131072 |<br />

| 3 | REDO | 0 | 2 | 67108864 | 131072 |<br />

| 3 | DD-UNDO | 4 | 0 | 2096128 | 0 |<br />

| 4 | REDO | 0 | 1 | 67108864 | 131072 |<br />

| 4 | REDO | 0 | 2 | 67108864 | 131072 |<br />

| 4 | DD-UNDO | 4 | 0 | 2096128 | 0 |<br />

+---------+----------+--------+----------+----------+--------+<br />

This information can be used to identify when the buffers are almost full so that the<br />

administrator can increase their size – preempting potential issues. If the redo log buffers<br />

are exhausted then applications will see 1221 “REDO log buffers overloaded” errors. In<br />

extreme cases, if the undo log buffers fill too quickly then the database may be halted.<br />

When using the multi-threaded data node (ndbmtd), the log_part column is used to<br />

distinguish between different LQH threads.<br />

The sizes of the redo buffer can be increased using the RedoBuffer parameter. The size of<br />

the undo buffer is specified in the undo_buffer_size attribute when creating the log file.<br />

ndbinfo.logspaces<br />

This view provides information on the disk space that has been configured for the log spaces for<br />

redo and undo logs:<br />

mysql> select * from logspaces;<br />

+---------+----------+--------+----------+-----------+--------+<br />

| node_id | log_type | log_id | log_part | total | used |<br />

+---------+----------+--------+----------+-----------+--------+<br />

| 3 | REDO | 0 | 0 | 536870912 | 0 |<br />

| 3 | REDO | 0 | 1 | 536870912 | 0 |<br />

| 3 | REDO | 0 | 2 | 536870912 | 0 |<br />

| 3 | REDO | 0 | 3 | 536870912 | 0 |<br />

| 3 | DD-UNDO | 4 | 0 | 78643200 | 169408 |<br />

| 4 | REDO | 0 | 0 | 536870912 | 0 |<br />

| 4 | REDO | 0 | 1 | 536870912 | 0 |<br />

| 4 | REDO | 0 | 2 | 536870912 | 0 |<br />

| 4 | REDO | 0 | 3 | 536870912 | 0 |<br />

| 4 | DD-UNDO | 4 | 0 | 78643200 | 169408 |<br />

+---------+----------+--------+----------+-----------+--------+<br />

Copyright © 2010, Oracle and/or its affiliates. All rights reserved. 40/81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!