MySQL Forums
Forum List  »  NDB clusters

MySQL Cluster 7.3 Slow Performance vs InnoDB
Posted by: Paul Yago
Date: February 25, 2014 09:29PM

I've set up a 7.3 cluster with 2 SQL Nodes (MySQL 5.6), 2 Data Nodes, and 1 Mgr. All on separate AWS AMI Linux instances.

When I run a query that uses 3 joined tables, ordered by the result of a SQL function, I get some significant differences in result times whenever querying directly from one of the SQL nodes using MySQLAdmin.

Below is a comparison of the same query run 3 times in a row. One set with InnoDB and the other set with NDB. As you can see, InnoDB can take as low as 5% the time taken by NDB:

InnoDB:
0.197 sec
0.161 sec
0.175 sec

NDB:
2.874 sec
3.184 sec
2.830 sec

We have a number of complex queries such as this and if it's necessary to rewrite them all to use NDBCluster, then this won't work for us.

My understanding is that NDB has a number of build in optimizations for handling joins. Why am I seeing such poor performance?

Both Data Nodes have 15GB of physical memory.


** config.ini **

[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataMemory=10GB # How much memory to allocate for data storage
IndexMemory=2GB # How much memory to allocate for index storage
ServerPort=30001

MaxNoOfConcurrentOperations=256K
MaxNoOfConcurrentTransactions=256K
MaxNoOfAttributes=256K

[tcp default]
# TCP/IP options:

[ndb_mgmd]
# Management process options:
hostname=*.*.*.* # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node log files

[ndbd]
# Options for data node "A": (one [ndbd] section per data node)
hostname=d1.hl.com
datadir=/usr/local/mysql/data # Directory for this data node's data files
NodeId=11

[ndbd]
# Options for data node "B":
hostname=d2.hl.com
datadir=/usr/local/mysql/data # Directory for this data node's data files
NodeId=12

[mysqld]
# SQL node options:
NodeId=101
hostname=sql1.hl.com # Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)

[mysqld]
NodeId=102
hostname=sql2.hl.com
~

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Cluster 7.3 Slow Performance vs InnoDB
4159
February 25, 2014 09:29PM


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.