MySQL Forums
Forum List  »  Utilities

Sharding TPC-C Benchmark with MySQL Fabric
Posted by: Joarder Kamal
Date: July 05, 2014 07:17PM

Currently I have a setup of 5 mysql database nodes (db01 ~ db05). MySQL Fabric and backstore have been installed and running in db01. I configured one global_group (i.e. group_02) with db02 and three other groups with db03 ~ db05 (i.e. group_03 ~ group_05). I didn't configure any HA options like Master-Slave replication within each group as I am not interested to.

Also I have an existing tpcc databases (containing 9 tables) with 10 warehouses in db02. Now I would like to use Fabric to create (HASH) sharded tpcc tables (total 8 tables) containing warehouse_id (w_id) and distribute them over db02 ~ db05. Finally I would like to replicate the only table without having a w_id attribute (i.e. Item table) into all of the other servers (db03 ~ db05).

None of the documentations, blogs or articles I've found so far discuss this kind of scenario. Many of them shows ways to develop Python/PHP codes to perform sharding from application level. But how to start with an existing database with loaded data? Could anyone kindly give some ideas on how to jump in?

So far I tried to create shard with the Warehouse table using the below commands

~$ mysqlfabric sharding create_definition HASH group_02
~$ mysql -u root -p -h db01 -P 25001 -e 'select * from fabric.shard_maps'
| shard_mapping_id | type_name | global_group |
| 1 | HASH | group_02 |

~$ mysqlfabric sharding add_table 1 tpcc.WAREHOUSE W_ID
~$ mysqlfabric sharding add_shard 1 group_03
~$ mysql -u root -p -h db01 -P 25001 -e 'select * from fabric.shards'
| shard_id | group_id | state |
| 1 | group_03 | DISABLED |

~$ mysqlfabric sharding enable_shard 1
Procedure :
{ uuid = 48e4efe7-62eb-4aa9-b73b-b90141c5a9bc,
finished = True,
success = False,
return = DatabaseError: ('Command (START SLAVE , ()) failed: 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO', 1200),
activities =

I am not sure why should I must have a slave server running in each group!!

My ultimate goal is to perform benchmark using these 4 servers (db02 ~ db05) using TPC-C and Fabric. I am using Oltpbenchmark to generate the workload and this is a research project :)

mysqlfabric 1.4.3
mysql Ver 14.14 Distrib 5.6.19, for Linux (x86_64) using EditLine wrapper

Many thanks in advance.

Options: ReplyQuote

Written By
Sharding TPC-C Benchmark with MySQL Fabric
July 05, 2014 07:17PM

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.