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

mysql cluster slow select performance (5 replies)

$
0
0
Hi,
I am newbie to the MySQL cluster. So if you find anything silly then please take it in your stride.

I have just installed a mysql cluster system(7.1.9).But now I get some problems about the select performance.Not all the select queries are slow,only the count queries with where clause,like "select count(*) from account where enabled=1",it takes almost 2s, but "select count(*) from account" without where it takes almost 0s.The longest one with distinct takes 11s,I cannot run my webapplication on that.

I have searched the internet to improve the Mysql Cluster performance and found out the two parameters ndb_force_send and ndb_use_exact_count which are significant for the cluster performnace. So i kept the parameter value as
ndb_force_send = 0
ndb_use_exact_count = 0

Also i kept the server parameters as follows:
query_cache_size = 536870912
query_cache_type = ON


But still i didnt get any fruitful result out of it.
I also tried by changing the engine_condition_pushdown parameter value to '1' but still no desired result.


Here are some configuration of the cluster:

#config.ini on manager node
# Options affecting ndbd processes on all data nodes:
[NDBD DEFAULT]
NoOfReplicas= 2
DataMemory = 1024M
IndexMemory = 512M
MaxNoOfExecutionThreads=4
MaxNoOfOrderedIndexes = 8000
MaxNoOfAttributes = 8000
MaxNoOfTables = 2500
MaxNoOfConcurrentOperations = 25000
MaxNoOfConcurrentIndexOperations = 25000


# TCP/IP options:
[TCP DEFAULT]
#SendBufferMemory = 50M
#ReceiveBufferMemory = 50M
portnumber=1186 # This the default; however, you can use any
# port that is free for all the hosts in cluster
# Note: It is recommended beginning with MySQL 5.0 that
# you do not specify the portnumber at all and simply allow
# the default value to be used instead

# Management process options:

[NDB_MGMD]
NodeId=1
hostname=192.168.203.17 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node logfiles

# Options for data node "A":
[NDBD]
NodeId=2
MaxNoOfAttributes = 8000
MaxNoOfTables = 2500
hostname=192.168.203.27 # data1.bp1.ablesky.com Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's datafiles

# Options for data node "B":
[NDBD]
NodeId=3
hostname=192.168.203.25 # data0.bp1.ablesky.com Hostname or IP address
MaxNoOfAttributes = 8000
MaxNoOfTables = 2500
datadir=/usr/local/mysql/data # Directory for this data node's datafiles

# SQL node options:
[MYSQLD]
NodeId=4
#BatchByteSize=128
#BatchSize=512
hostname=192.168.203.24 # sql0.bp1.ablesky.com Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)
[MYSQLD]
NodeId=5
#BatchByteSize=128
#BatchSize=512
hostname=192.168.203.26 # sql1.bp1.ablesky.com Hostname or IP address
# (additional mysqld connections can be
# specified for this node for various
# purposes such as running ndb_restore)

my.cnf on sql0
[mysqld]
# Options for mysqld process:
ndbcluster # run NDB storage engine
ndb-connectstring=192.168.203.17 # location of management server

# copy from db0.mp1
max_binlog_size=100M
max_connections=32000
key_buffer = 256M
max_allowed_packet = 16M
table_cache = 256
sort_buffer_size = 8M
join_buffer_size = 8M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
tmp_table_size=64M
max_heap_table_size=64M
socket = /var/lib/mysql/mysql.sock
collation_server = utf8_unicode_ci
default-character-set = utf8
interactive_timeout = 31536000
wait_timeout = 31536000
log_slow_queries=/var/log/mysql-slow-queries.log
long_query_time=1
query_cache_size = 32M
thread_cache_size = 50
# innodb_buffer_pool_size = 512M
# innodb_additional_mem_pool= 8M
[....]....

Can anyone give me some advice about this?
Thanks in advance.

HYG

Viewing all articles
Browse latest Browse all 1560

Trending Articles



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