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