4 messages in com.mysql.lists.clusterNDB slow
FromSent OnAttachments
Mattias Nilsson19 Oct 2004 02:22 
Mikael Ronström19 Oct 2004 03:48 
Mattias Nilsson19 Oct 2004 05:13 
Heikki Tuuri21 Oct 2004 11:23 
Subject:NDB slow
From:Mattias Nilsson (ori@managerzone.com)
Date:10/19/2004 02:22:30 AM
List:com.mysql.lists.cluster

Hi all

Just doing my initial tests on NDB, and running into some seriously low numbers. I am running 4.1.7-gamma (source) on a Dual P3 600 with 768MB.

I have configured my cluster with only one storage (1 replica) and one API; [NDBD DEFAULT] NoOfReplicas: 1 [MYSQLD DEFAULT] [NDB_MGMD DEFAULT] [TCP DEFAULT] [NDB_MGMD] HostName = cluster1 [NDBD] HostName = cluster1 DataDir: /var/lib/mysql-cluster/ DataMemory = 50M IndexMemory = 50M [MYSQLD]

My /etc/my.cnf: [mysqld] # Enable NDB Cluster ndbcluster # Set InnoDB Parameters innodb_data_home_dir = /data/innodb_data/ innodb_data_file_path = db1:200M:autoextend:max:50000M innodb_buffer_pool_size=128M innodb_additional_mem_pool_size=4M innodb_log_group_home_dir=/logs/innodb_logs innodb_log_arch_dir=/logs/innodb_logs innodb_log_archive=0 innodb_log_files_in_group=3 innodb_log_file_size=128M innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=0 innodb_file_io_threads=4 innodb_lock_wait_timeout=30 # Limit connections max_connections=50

My test case table: CREATE TABLE test1 ( main_id bigint(20) unsigned NOT NULL default '0', sub_id bigint(20) unsigned NOT NULL default '0', col1 smallint(5) unsigned NOT NULL default '0', col2 tinyint(3) unsigned NOT NULL default '0', col3 tinyint(3) unsigned NOT NULL default '0', col4 smallint(6) NOT NULL default '0', col5 smallint(5) unsigned NOT NULL default '0', col6 tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (main_id, sub_id, col2,col3,col4), KEY index2 (sub_id,col3,col4) ) ENGINE=NDB;

Test data is 10000 inserts, each of 40 rows, fed via the mysql client.

I try this with both InnoDB, MyISAM and NDB. Timings are nearly identical on MyISAM and InnoDB, but it takes more than twice the time using NDB.

I have also noticed some serious I/O during import into NDB, almost 10 times to InnoDB and MyISAM. My machine is not swapping.

Can someone give me any notes/ideas/explanations on why NDB is being so slow, and why it's generating so much I/O (in-memory?). Am I missing something?