Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all 1560 articles
Browse latest View live

Imbalanced memory usage after adding new data nodes (1 reply)

$
0
0
We have upgraded our cluster from 2 to 4 data nodes. However the data usage on the old nodes is significantly higher than the data usage on the new nodes.

Node 3: Data usage is 74%(194636 32K pages of total 262144)
Node 3: Index usage is 32%(85303 8K pages of total 262272)
Node 4: Data usage is 74%(194756 32K pages of total 262144)
Node 4: Index usage is 32%(85289 8K pages of total 262272)
Node 5: Data usage is 39%(102895 32K pages of total 262144)
Node 5: Index usage is 24%(65567 8K pages of total 262272)
Node 6: Data usage is 39%(102889 32K pages of total 262144)
Node 6: Index usage is 25%(65569 8K pages of total 262272)

ALTER TABLE .... REORGANIZE PARTITION; has been run on all tables.

Nodes 3 & 4 have been restarted with the --initial switch

Is there something else which needs to be done?

Convert a MySQL database to MySQL Cluster (1 reply)

$
0
0
Hi

I am running a site with a single MySQL server. This database is used to logg data from a SCADA system. The SCADA system is redundant over several machines, but the MySQL database is not. I've been looking at replication, but it does not comply with being able to write if the master is down (unless you change master).

Now that I have found MySQL Cluster I have some questions:
- Is it easy to set up MySQL Cluster on two machines and have them run syncronised databases? With the possibility to write to both.
- Can I just upgrade the existing database to MySQL Cluster, or do I have to uninstall the existing and install MySQL Cluster as a new installation?
- What is the difference between MySQL Cluster and MySQL Cluster CGE?

Sorry if I sound a bit noob, but I've only used the simple one database setup.

Incomplete primary index on table (1 reply)

$
0
0
Hello,

I am experiencing a weird problem with MySQL Cluster.

I have a table where I have loaded 6.5 million records. Its a quite basic table with a phone number as a integer primary index, and then 3 more data fields.

+------------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+------------+------+-----+---------+-------+
| number | int(11) | NO | PRI | NULL | |
| numbertype | int(11) | YES | | NULL | |
| networkop | varchar(5) | YES | | NULL | |
| serviceop | varchar(5) | YES | | NULL | |
+------------+------------+------+-----+---------+-------+


the numbers are in the range 20000000-99999999.

When i query a number, etc SELECT * FROM num_table WHERE number=88389000, I get a result. But when i query SELECT * FROM num_table WHERE number=22304050, I get no result. But if a do a range query, etc SELECT * FROM num_table WHERE number BETWEEN 22300000 AND 22309999, I can see that the number 22304050 is actually there.

Does anybody have an idea as to why I cant query the number directly?

transaction failed due to disk full (no replies)

$
0
0
Hello,

I have a quite simple table called mytbl, which has 10 million rows and runs on NDB cluster.

When excuting a query like 'alter table mytbl partition by key(myid)', mysql crashed. the errror says "the file system is full" and "unable to store fragment during LCP”."

it's clear that the query run out of disk. I saw many REDO and LCP files.

my question is how can I do if I
- cannot change OS filesystem
- cannot lose data

Thanks

Alax

Strange Issue with NDB (Possibly Index) (2 replies)

$
0
0
Hi everyone.

I have a strange issue that I cant quite pin point and am struggling to know where to look.

We have an NDB table (across 2 nodes) that contains around 2.5 million records.

Recently (this has happened twice) a record has been attempted to be deleted from that table via the application sitting on top of it. This errorred.

If we go to the database via the SQL Workbench and try and delete that same record (by querying over fields other than the ID field) we get the message 0 rows affected. Likewise if we try and modify the record (via the ID) the changes dont take and the row is returned in its original state.

Furthermore, if we search for the record based on its ID, no results are found. However if we search using ID > (OURID -1) we can see it in the results. Other queries (not using the ID) also return the record.

Suspecting a corruption with indexes or the schema we have exported the data, killed the schema, recreated it and reimported the data. This then allows us to remove that record, however the issue eventually happens again on a different record.

Any thoughts of what or how to check this out would be greatly appreciated.

Kind regards

Jonathan

Bad performance in comparison with myisam (1 reply)

$
0
0
Hi,

I have this setup

2x
- baremetal Xeon quadcore 48gb RAM , 1gbps interconnect with Ethernet
- ndbd - 12GB memory usage (8GB data + 3GB index + 1GB operations)
- 1x 1TB HDD 7200rpm

1x virtual machine on RAID6 storage
- ndb_mgmd
- mysqld

Results of my testing are horrible, and I cannot find any bottleneck. There are numbers:

Executed on ndb_mgmd machine (testing ndb):
perl test-insert --server=mysql --create-options=ENGINE=ndbcluster --server=mysql
Total time: 341 wallclock secs (11.26 usr 0.63 sys + 0.00 cusr 0.00 csys = 11.89 CPU)

Executed on ndb_mgmd machine (testing myisam):
perl test-insert --server=mysql --create-options=ENGINE=MyISAM --server=mysql
Total time: 25 wallclock secs (10.40 usr 0.84 sys + 0.00 cusr 0.00 csys = 11.24 CPU)

I know there is synchronous writing in ndb, but come on, it cannot be 15x times slower than MyISAM.

Could you please explain, what should I examine in this setup? Thanks.

Ladislav Prokopny

NoOfReplicas=2 to NoOfReplicas=3 Performance? (2 replies)

$
0
0
I would like to ask if increasing NoOfReplicas which means I have mode data nodes in one node group provides better performance for queries? Or if only one node within the data nodes are actually active?

locks in slow log (no replies)

$
0
0
Hello,

I am using NDB cluster7.1 and I have a table as below,

CREATE TABLE `storeInfo` (
`userId` varchar(50) NOT NULL,
`logo` varbinary(2000) NOT NULL,
`level` int,
PRIMARY KEY (`userId`) USING HASH,
) ENGINE=ndbcluster;

And my test case is SELECT query, no update/insert/delete.
When enable slow log and check it, I got result as below,

Count : 388.07k (72.35%)
Time : 45334.773877 s total, 116.821 ms avg, 184 us to 1.247777 s max (72.36%)
95% of Time : 39639.928 s total, 107.522 ms avg, 184 us to 226.178 ms max
Lock Time (s) : 14047.256179 s total, 36.198 ms avg, 30 us to 1.175175 s max (72.69%)
95% of Lock : 10990.67843 s total, 29.812 ms avg, 30 us to 108.103 ms max
Rows sent : 1 avg, 0 to 1 max (38.88%)
Rows examined : 1 avg, 0 to 1 max (28.57%)
Database :
Users :

Query sample:
SET timestamp=1356056205;
SELECT logo FROM storeInfo WHERE userId ='10010011010';

My question is WHY so much lock and some of them is 1+ second?

Why the query spend so much time to get a read-lock?

How to reduce these locks?

Thanks
Alax

length of lock queue (no replies)

$
0
0
In MySQL, each table has four lock queues as below,

Current read-lock queue (lock->read)
Pending read-lock queue (lock->read_wait)
Current write-lock queue (lock->write)
Pending write-lock queue (lock->write_wait)

my question is

what's the length of lock queue? If yes, can we set the length?

Insert / deleting instead of insert if not exists or update. Hard disk usage. (1 reply)

$
0
0
Hi all,

I would appreciate much an advice about this issue. I have a logger table inside a mysql cluster that works as a buffer ring: It inserts one entry and immediately after it deletes an entry with the id = new_id-buffer_size.

This works well and is quite fast, more than checking if the row with an give id exists to update it or otherwise inserting it. When I explained the solution to the customer he said that this approach will cause the database in the hard disk grow indefinitely as we are inserting always and the deleting will create holes 'as a Swiss cheese', in his words, in the database.

Is it true? Is there any place I can document about this issue?

Thanks again,
Dani.

using tcmalloc in NDB (no replies)

$
0
0
Hi,

Does anybody have experience of using tcmalloc in NDB?

I know it can be used in InnoDB and improve performance.

thanks!

Alax

Cluster setup two networks (no replies)

$
0
0
Hi,
I've got a cluster setup on a dev environment to test suitability for our application and it is humming along quite well. Whilst researching all the different setups and the way other people are achieving HA with MySQL cluster I cam accross this article:
http://www.clusterdb.com/mysql-cluster/mysql-cluster-fault-tolerance-impact-of-deployment-decisions/

My question is about example 8 which the author recommends. How do you get the management node (or the data node for that matter) bind/listen to more than 1 IP.

I've setup 2 separate networks as the example suggests.
I have two servers, each contains:
1 x Management node
1 x SQL node
1 x Data node
The first subnet is 10.4.1.0 and the other 192.168.100.0.
10.4.1.0 uses a switch and 192.168.100.0 uses a x-over cable between the two servers. The idea being if the switch dies, the x-over cable is still there so no single point of failure.

I've posted this same question at the end of the article however since it was written in 2009 it may not be monitored anymore.
Thanks for your help.


Regards,
-Warren

Trigger Return Error In NDBCLUSTER (no replies)

$
0
0
Hello,
I have created one trigger to perform updates when a new row inserted into another table.

The trigger is:

delimiter $$
create trigger child_price_update
after insert on child
for each row
BEGIN
UPDATE `amd_smpp_gw`.`MT`
SET `amd_smpp_gw`.`MT`.`child_price`=NEW.child_price
WHERE `amd_smpp_gw`.`MT`.`msg_id` = NEW.msg_id;
END
$$
DELIMITER ;

After the insert into table "child" this trigger perform one update to table MT inside the same database with name "amd_smpp_gw" and returns error:

ERROR 1296 (HY000): Got error 0 'No error' from NDBCLUSTER

What can i do to resolve this issue?
What is the reason that Cluster return me this error when the trigger performing the update after the insert?

P.S
Updates were succesfull.

Thanks.

Simple query are now very slow (no replies)

$
0
0
Hi,
i've a mysql cluster with two sqlnode and two data node and after some months of good performance in production now my query are very slow.
On a table with 65468 rows a simple query with a condition on an indexed column is slow:

mysql> select DISTINCT cp.campaignID from CAMPAIGN_PLAY cp WHERE cp.campaignID = 1;
+------------+
| campaignID |
+------------+
| 1 |
+------------+
1 row in set (7.49 sec)

mysql> explain select DISTINCT cp.campaignID from CAMPAIGN_PLAY cp WHERE cp.campaignID = 1;
+----+-------------+-------+------+---------------+-------------+---------+-------+-------+-----------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+---------------+-------------+---------+-------+-------+-----------------------------------+
| 1 | SIMPLE | cp | ref | campaignID3 | campaignID3 | 5 | const | 64927 | Using where with pushed condition |
+----+-------------+-------+------+---------------+-------------+---------+-------+-------+-----------------------------------+
1 row in set (0.00 sec)

What can I check to undestand why my query are now so slow ??

Regards

Fabio

SELECT After update in transaction columns returning NULL (1 reply)

$
0
0
Hello,

I have run into this really wierd problem that only occurs on 1 of my 2 SQL servers, both have the same configuration and are essentually clean installs. All servers are running NDB 7.2.8


mysql> start transaction;
Query OK, 0 rows affected (0.00 sec)

mysql> select id1, id2 from `table` where primary_key = 16372;
+--------+--------------+
| id1 | id2 |
+--------+--------------+
| 300 | 8 |
+--------+--------------+
1 row in set (0.00 sec)

mysql> update `table` set status = 'CANCELLED' WHERE primary_key = 16372;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select id1, id2 from `table` where primary_key = 16372;
+--------+--------------+
| id1 | id2 |
+--------+--------------+
| NULL | NULL |
+--------+--------------+
1 row in set (0.00 sec)

mysql> rollback;
Query OK, 0 rows affected (0.00 sec)



As i said the really wierd thing about this is that the other server, identical configuration, works just fine. The only difference is this server is the one that i imported the data on.

Memcached memory usage (no replies)

$
0
0
I'm using Brutis to do load testing with Memcached connected to MySQL Cluster. The default key id in Brutis is set to 1,000,000 and with that set I have 99% misses. When I turn the possible keys down to 10,000, I get 100% hits. I'm guessing the default value of 64MB for Memcached is too low but when I try to set it to a different value it says -m is deprecated. How can I allow MySQL Cluster's memcached to take up more memory on the system?

How to update parameters in config.ini (no replies)

$
0
0
hello,

I am using MYSQL cluster 5.1.61-ndb-7.1.22, and I want to update parameters (e.g. ‘SchedulerExecutionTimer’ and ‘SchedulerSpinTimer’) located in config.ini.

In the manual, I see these parameters don't need restart cluster.
But how can I update them?

[oh, sorry, I misunderstand. I just found the restart type N is Node restart]

Can anybody give me a guideline?

Thanks.

Alax

Maximum number replicas in mysql cluster? (1 reply)

$
0
0
Hi,
I would like to know, what is the maximum number of replicas we can set in configuration file while setting up the mysql cluster? Basically, I want to set up the cluster in such way that I have full database replicated on each data node. i.e. If I have 4 data nodes, is it possible to have, Number of replicas=4, so that Nu. of Node Groups=nu. of data nodes (4)/nu. of replicas (4)=1 so that I have fully replicated data node on each data node. Is higher number of replicas possible, say 6? Any suggestions would be greatly appreciated.

How do I "LOCK A TABLE" basically only provide read permissions (no replies)

$
0
0
Hello,
I want to provide only read permissions on a table.How do i do that?

My table is create table weight(values float(7,3);

why index_length is 0 (no replies)

$
0
0
Hello,

I am using NDB cluster v7.1. In tables of GoodsDB, I create primary-key and key for all tables, and they work very well.
But, I wonder why index_length is 0.

SELECT
count(*) tables,
table_schema,concat(round(sum(table_rows)/1000000,2),'M') rows,
concat(round(sum(data_length)/(1024*1024*1024),2),'G') data,
index_length idx,
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size,
round(sum(index_length)/sum(data_length),2) idxfrac
FROM information_schema.TABLES
GROUP BY table_schema
ORDER BY sum(data_length+index_length) DESC LIMIT 10;

+--------+--------------------+--------+-------+------+------------+---------+
| tables | table_schema | rows | data | idx | total_size | idxfrac |
+--------+--------------------+--------+-------+------+------------+---------+
| 4 | Goodsdb | 24.80M | 7.61G | 0 | 7.61G | 0.00 |
| 24 | mysql | 0.00M | 0.00G | 4096 | 0.00G | 0.15 |
| 10 | ndbinfo | 0.00M | 0.00G | 2048 | 0.00G | 1.70 |
| 29 | information_schema | NULL | 0.00G | 0 | 0.00G | NULL |
+--------+--------------------+--------+-------+------+------------+---------+

Thanks
Alax
Viewing all 1560 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>