Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a little application that executes select queries against a MySQL cluster.

By using 1 thread to read a record the latency is x.

By using 2 threads to read records concurrently the avg latency is ~ 2x.

By using n threads to read records concurrently the avg latency is ~ nx.

Is there a way to optimize that?

I use one mysqld for 3 Data Nodes.

share|improve this question

1 Answer 1

  • Make sure that you have uniform servers across the cluster because a slow/overloaded master node can affect performance of the Galera Replication cluster.
  • Check the node status by monitoring value of these variables wsrep_ready and wsrep_connected
  • Make sure that value of this variable is close to 0 wsrep_flow_control_paused
  • A high value for this variable wsrep_local_send_queue_avg for a node indicates a bottleneck in network line, If this is the case, the cause can be at any layer, from physical to OS configuration and must be investigated.
  • You can yourself profile SELECTs on diffrent nodes and see performance.

mysql> SET profiling = 1;

mysql> SELECT * FROM

mysql> SHOW PROFILES;

I hope this information helps.

share|improve this answer
    
Galera Replication cluster and MySQL Cluster (ndbcluster) are two different beasts. –  Mindaugas Riauba Dec 19 '13 at 5:35
    
Oops! Most of the community uses Galera cluster , I could not make out from question? But you can ask to MySQL support regarding this issue –  Mahesh Patil Dec 19 '13 at 5:49
    
@Mahesh Patil, Well, your first point is something I was wondering about, so thanks anyway :) –  Wodin Oct 17 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.