1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#
# Define cluster with two MySQL Servers and two data nodes,
# primarily intended to be used for testing MySQL Server + ndbcluster plugin
#
[cluster_config.crunch]
ndbd=,
ndb_mgmd=
mysqld=,,
ndbapi=,,,
# Configure data nodes
[cluster_config]
NoOfReplicas=2
DataMemory=4G
# For large machine
#DataMemory=128G
# Auto configure NDB to use all CPUs assigned
AutomaticThreadConfig=1
# Set number of parallel REDO logs per node to the number of LDM threads
# (this assumes that the auto config assigns 8 LDM threads).
NoOfFragmentLogParts=8
# Prevent disk-swapping
LockPagesInMainMemory=1
# Enable shared memory Transporter (improves performance)
UseShm=1
# Allocates sufficient REDO log to cope with load step
RedoBuffer=256M
FragmentLogFileSize=1G
NoOfFragmentLogFiles=4
# For large machine
#NoOfFragmentLogFiles=256
SendBufferMemory=8M
# For higher load
#SendBufferMemory=256M
# Increase number of epoch bytes that are allowed to be buffered, the default
# value of 26M is a little low
MaxBufferedEpochBytes=512M
# Configure MySQL Server(s)
[mysqld]
# Use ndbcluster plugin
ndbcluster
# Turn on highest log level
ndb-extra-logging=99
# Turn off X plugin to allow config to
# use those ports as well
loose-mysqlx=0
# Allow large number of connected clients
max-connections=8200
# Turn off general and slow query log
general_log=OFF
slow_query_log=OFF
# Allow many prepared statements
max_prepared_stmt_count=4194304
# Setup first MySQL Server as binlogging
[mysqld.1.crunch]
ndb-log-bin=1
#binlog-checksum=none
#binlog-transaction-compression=ON
# Don't binlog updates from replica
log_replica_updates=OFF
# Log updates as UPDATE_ROW events (i.e not WRITE_ROW)
ndb_log_update_as_write=OFF
# Log updates in minimal format (i.e only pk and after image)
ndb_log_update_minimal=ON
# Make room for the larger epoch transactions to fit in the binlog cache
binlog_cache_size=32M
# For transaction dependency calculations
# ndb-log-transaction-dependency=ON
# binlog-transaction-dependency-tracking=WRITESET
# Setup second MySQL Server as applier
[mysqld.2.crunch]
# Allow replica batching
replica_allow_batching=ON
# Allow many bytes in each roundtrip to NDB
ndb_batch_size = 2G
# Allow many bytes also for writing blobs
ndb_blob_write_batch_bytes = 2G
[ENV]
# Always use ndbmtd for the data nodes
MTR_NDBMTD=1
# Setup connectstring for the cluster
NDB_CONNECTSTRING=@mysql_cluster.crunch.ndb_connectstring
MYSQLD1_PORT = @mysqld.1.crunch.port
MYSQLD1_SOCK = @mysqld.1.crunch.socket
MYSQLD2_PORT = @mysqld.2.crunch.port
MYSQLD2_SOCK = @mysqld.2.crunch.socket
|