List:Cluster« Previous MessageNext Message »
From:Mikael Ronström Date:August 16 2004 11:49am
Subject:Re: Performance
View as plain text  
Hi Alex,

2004-08-13 kl. 15.07 skrev Wheeler, Alex:

> 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
> pairs.)
>
> piped through 'mysql', I get about 11,000 inserts/second, for a total 
> of
> 10,000,000 rows.
>
>
>
> If I run the same test with 2 clients on 1 mysqld instance, dividing 
> the
> number of inserts for each client by 2, I get an average of 14,000.
>

In this case the inserts are performed by 2 threads in the same server 
and most
likely the common TCP/IP connection to the cluster nodes is a 
bottleneck.

> 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 got
> with 1 client.
>

Obviously very good scalability here and no particular bottlenecks 
other than client
not being able to generate load faster than 11.000 per second.

>
>
> 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 
> is
> about 20% utilization, and with 2 clients about 40% utilization?
>

I would presume that you will start to see some degradation on the 
linear curve but
possibly 4 clients could do 40.000 with some luck at around 75% load.

>
>
> Is this how the cluster is supposed to work, or is this what the
> mysqld-to-ndb optimizations would address?
>

Usually the diiference between scaling on threads and processes is not 
so dramatic as here
but essentially yes. There are no particular optimisations ongoing for 
this use case, it is already
now working good. The optimisations are more geared towards evaluation 
of WHERE
clauses.

By adding value pairs more than 20 you can probably inch up performance 
a few percent
additionally. Another interesting question is how much was the load 
when running 14,000
per second. It could be efficient on processor resources even though 
not scaling in the same
manner.

Anyways very interesting results.

Rgrds Mikael

>
>
>
>
> --
>
> Alex Wheeler
>
>
>
>
Mikael Ronström, Senior Software Architect
MySQL AB, www.mysql.com

Clustering:
http://www.infoworld.com/article/04/04/14/HNmysqlcluster_1.html

http://www.eweek.com/article2/0,1759,1567546,00.asp


Thread
PerformanceAlex Wheeler13 Aug
  • Re: PerformanceMagnus Svensson16 Aug
  • Re: PerformanceMikael Ronström16 Aug
RE: PerformanceAlex Wheeler17 Aug