MySQL Forums
Forum List  »  NDB clusters

Re: MySQL ndbcluster - Man, why is it so slow!
Posted by: Matthew Montgomery
Date: April 10, 2009 01:19AM

Hello Robert,

Which version of NDBCLUSTER are you using? You ought to be running mysql-5.1.30-ndb-6.3.20 or higher.

First, try setting ndb-cluster-connection-pool to boost the parallelism. Using this option will make one mysqld establish multiple SQL node connections to the cluster. Without this setting, it doesn't matter if you pile a bunch of mysqld connections on they will be need to be sent through one NDBAPI connection which will become a bottleneck. Cluster performs best with a 4:1 ratio of SQL to NDBD nodes.

See: http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-mysqld-command-options.html#option_mysqld_ndb-cluster-connection-pool

NDBCLUSTER is particularly sensitive to latency. You can diminish the impact of the network latency between SQL and NDBD nodes by batching several inserts together into larger multi-row inserts and optionally raising ndb_autoincrement_prefetch_sz to match the number of rows in your inserts. If you are not able to batch your inserts, some increase in performance can be seen by setting ndb_force_send=Off. Normally, mysqld will send the query to the data nodes as soon as the statement is issued. Disabling ndb_force_send will cause the mysqld nodes to queue up several queries into larger batches and sends them to the data nodes all at once, thus reducing network round trips. For a high volume of inserts this can have a positive impact on throughput. The size of the batch is determined by the option ndb_batch_size (Default 32k)

See: http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-system-variables.html#option_mysqld_ndb_autoincrement_prefetch_sz
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-system-variables.html#option_mysqld_ndb_force_send
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-mysqld-command-options.html#option_mysqld_ndb-batch-size

Also prior to ndb-7.0 the ndbd process is limited to a single execution thread and single maintenance thread. You can get some additional performance from ndb-6.3 by setting which CPU handles the execution and maintenance threads so as to avoid CPU cores that are used for OS tasks, disk and network interrupts.

See: http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-ndbd-definition.html#mysql-cluster-realtime-performance-parameters
and
$ cat /proc/interrupts

I hope these change show some performance gains for you.

Good Luck.



Edited 1 time(s). Last edit at 04/10/2009 01:56AM by Matthew Montgomery.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MySQL ndbcluster - Man, why is it so slow!
4920
April 10, 2009 01:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.