My now long-running series of posts on getting max performance from a very simple MySQL Cluster setup (see details here
is continuing here. As a short intro to what I am trying out here, is
to see if I can validate the claim that MySQL Cluster / NDB would be a
good replacement for a Key Value Store (KVS) such as MongoDB. I test
this in a rather simple single-server environment, but this is for a
reason, just not a coincidence: The reason is that RAM is getting
inexpensive and servers that can take a lot of RAM are also getting less
expensive, which in turns means that the saying that many small servers
are more cost-effective that few big ones, might not be as valid as it
used to be. Also, I wanted to test what MySQL Cluster can do for me,
from a KVS centric view. In short, I run on one server (16 Gb RAM, 8
cores) with all data in memory, what do I get.
I can tell you I have been trying real hard to get MySQL Cluster to work
better here. Yes, SQL parsing in MySQL is to blame for a lot of why
MySQL Cluster is so much slower than MongoDB. But why is MySQL Cluster
slower than a fully cached (hot) InnoDB then? Admittedly, I was running
the InnoDB tests with MySQL 5.6, so there you have one more thing for me
to try (i.e. running InnoDB tests with the mysqld packaged with MySQL
A lot of different MySQL Configurations was tried, as was a few other
things. Lookiing at what was going on in the box revealed that most of
the CPU was consumed by mysqld, so I decided to try to speed that up a
bit, as the CPUs were maxed out by mysqld using up some 85 % or so.
Using tcmalloc seemed like one obvious fix here, and I got some 10%
better performance using that, MySQL Cluster using the SQL interface now
performance about 35 k requests per second, which still is below InnoDB
(with MySQL 5.6) and not even close to MongoDB, but still an
But as I said, there is still more stuff to test and I am not giving up
yet. But I have given up on distributing some mysqld load to some other
server. I got that working, but as the load on the test is distributed
evenly across the mysqld servers, the slowest one will hold things up
(that is how thing work right now, but I can and will revisit that one).
Tarantool, some more NDBAPI tests and then some remains to be tested!