The machine was not close to 100% when getting the 14,000 inserts/second
value. In fact, I've tested up to 64 simultaneous clients to one MySQL
instance using 20 value pairs, the results are rounded to the nearest
I haven't checked CPU utilization with these values yet.
I've tried with different numbers of value pairs, starting with just one
where the performance was horrible. 20 pairs is better than 80 pairs,
and better than 10 or 15. I may try other variations later.
Thanks for your response.
From: Magnus Svensson [mailto:magnus.svensson@stripped]
Sent: Monday, August 16, 2004 6:21 AM
To: Wheeler, Alex
Subject: Re: Performance
On Fri, 2004-08-13 at 15:07, Wheeler, Alex wrote:
> I have a 4 node, 4 computer setup, 2 of the nodes having an API, each
> computer having 1GB RAM, and using GigE.
> Here's my create table statement:
> CREATE TABLE `http_auth` (
> `username` char(8) NOT NULL default '',
> `uid` int(11) NOT NULL default '0',
> PRIMARY KEY (`username`)
> ) ENGINE=ndbcluster
> Running the following 'gen-data' command:
> gen-data -n 500000 -f "INSERT INTO http_auth VALUES (' %8-8s',%n),...,
> (' %8-8s',%n);"
> (where the ... represents 18 more value pairs, for a total of 20
> piped through 'mysql', I get about 11,000 inserts/second, for a total
> 10,000,000 rows.
> If I run the same test with 2 clients on 1 mysqld instance, dividing
> number of inserts for each client by 2, I get an average of 14,000.
I guess this machine is running close to 100%?
> If I run the same test, but with 2 instances of mysqld, running on 2
> different computers, I get about 22,000. Effectively double what I
> with 1 client.
This looks nice. Have you tried varying the number of value pairs in the
INSERT statement? I would suggest trying as much as 1024 value in each
statement and see if that will improve performance(if this is relevant
to your application of course).
> Can I safely presume that by using 3 instances, I'd get around 33,000,
> and with 4 around 44,000 given that the average CPU load for 1 client
> about 20% utilization, and with 2 clients about 40% utilization?
The architecture of MySQL Cluster should give linear scalabilty, but of
course some time you will reach the limit of what the DB nodes or HW can
> Is this how the cluster is supposed to work, or is this what the
> mysqld-to-ndb optimizations would address?
> Alex Wheeler
Magnus Svensson, Software Engineer
MySQL AB, www.mysql.com
Office: +46 709 164 491