MySQL Forums
Forum List  »  NDB clusters

Re: DISKLESS TOO BAD PERFORMANCE
Posted by: Mikael Ronström
Date: April 14, 2016 05:19PM

Hi,

The InnoDB engine executes all queries in a single thread,
this thread is the same thread that executes the query in
the MySQL Server. So single-threaded queries (like a single
insert) is not necessarily faster in NDB.

However by running insert queries with many inserts per query
gives NDB the chance to parallelise the query since NDB can
execute queries also in a parallel fashion. So that way NDB
can run faster than InnoDB at times.

NDB's distributed architecture gives it the capability to run
queries at very high rates, but individual single queries are
not necessarily faster although a higher throughput can be
achieved.

However I wonder how this 3M record update can happen in
1ms or 6ms. Neither NDB nor InnoDB are able to perform
a 3M row transaction within such a short time.

Rgrds Mikael Ronström



Yury Tsaregorodtsev Wrote:
-------------------------------------------------------
> Hi Gurus,
> have anyone idea why InnoDB perform much faster
> then NDB within single server (single node) ?
> simple table, for 3000000 rows (ID, COL1, COL2)
> when I do: UPDATE TEST SET COL1=1;
> its took 6ms on NDB vs 1ms on InnoDB.
> DataMemory & IndexMemory huge enough,
> MaxNoOfExecutionThreads=9
> RealtimeScheduler=1
> MaxNoOfConcurrentOperations=3100000
> accordingly to this config NDB should fly!
> What I miss ?
>
>
> How to reproduce:
> 1. Create table:
> CREATE TABLE `TEST` (
> `ID` int(11) NOT NULL AUTO_INCREMENT,
> `TIME` timestamp NULL DEFAULT
> CURRENT_TIMESTAMP,
> `COL1` varchar(45) DEFAULT NULL,
> `COL2` varchar(45) DEFAULT NULL,
> `COL3` varchar(45) DEFAULT NULL,
> `COL4` varchar(255) DEFAULT NULL,
> PRIMARY KEY (`ID`),
> UNIQUE KEY `ID_UNIQUE` (`ID`),
> KEY `TIME` (`TIME`)
> ) ENGINE=ndbcluster AUTO_INCREMENT=1 DEFAULT
> CHARSET=utf8;
>
> 2. Fill table:
> INSERT INTO TEST(COL1,COL2,COL3,COL4) VALUES
> (1,2,3,4);
>
> 3. Insert 3000000 rows:
> DELIMITER $$
> CREATE PROCEDURE insert_test_data()
> BEGIN
> DECLARE i INT DEFAULT 1;
>
> WHILE i < 3000000 DO
> INSERT INTO `TEST` (`COL1`, `COL2`, `COL3`,
> `COL4`)
> SELECT `COL1`, `COL2`, `COL3`, `COL4`
> FROM `TEST`
> WHERE id = 1;
> SET i = i + 1;
> END WHILE;
> END$$
> DELIMITER ;
>
> 4. Fill tables with rows:
> CALL insert_test_data();
>
> 5. Perform UPDATE:
> UPDATE TEST SET COL1=2;

Options: ReplyQuote


Subject
Views
Written By
Posted
1461
February 26, 2016 03:40AM
685
March 08, 2016 05:45PM
Re: DISKLESS TOO BAD PERFORMANCE
573
April 14, 2016 05:19PM


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.