Flash
Новичок
Настроил кластер, 2 дата ноды, 2 апи и арбитр. Вроде бы все работает, но есть одно большое "но"...
Простейший тест ставит меня в тупик, вставка 10к строк занимает минуту!
Итого, что у нас есть:
cluster.conf
* Домен заменен и доступен. Замена на IP ничего не дает.
Есть 2 таблицы, test - ndbcluster, test2 - InnoDB. Вот запросы на них:
Простейший тест ставит меня в тупик, вставка 10к строк занимает минуту!
Итого, что у нас есть:
cluster.conf
PHP:
[ndbd default]
NoOfReplicas=2 # Number of data nodes
DataMemory=512M # How much memory to allocate for data storage
IndexMemory=64M # How much memory to allocate for index storage
[tcp default]
#portnumber=2202 # This the default; however, you can use any port that is free for all the hosts in the cluster
# Management process options
[ndb_mgmd]
nodeid=1
hostname=mgmt.domain.ru # IP address of the management node
datadir=/usr/local/mysql/mysql-cluster # Directory of the management node
# First Data Node
[ndbd]
nodeid=2
hostname=mysql-ndb-1.domain.ru
datadir=/usr/local/mysql/data
# Second Data Node
[ndbd]
nodeid=3
hostname=mysql-ndb-2.domain.ru
datadir=/usr/local/mysql/data
[mysqld]
[mysqld]
[mysqld]
[mysqld]
[mysqld]
Есть 2 таблицы, test - ndbcluster, test2 - InnoDB. Вот запросы на них:
PHP:
mysql> load data infile '/tmp/data2.txt' into table test (`Id`, `data`);
Query OK, 10000 rows affected (1 min 5.30 sec)
Records: 10000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> load data infile '/tmp/data2.txt' into table test2 (`Id`, `data`);
Query OK, 10000 rows affected (0.06 sec)
Records: 10000 Deleted: 0 Skipped: 0 Warnings: 0
mysql> insert into test (`Id`,`data`) select * from test2;
Query OK, 10000 rows affected (1 min 5.17 sec)
Records: 10000 Duplicates: 0 Warnings: 0