# reset
START TRANSACTION;
UPDATE test SET html=REPEAT('q',64*1024) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
SET profiling=1;
# first update, set 64KB of data
START TRANSACTION;
UPDATE test SET html=REPEAT('e',64*1024) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
# second update, reset the data
START TRANSACTION;
UPDATE test SET html='' WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
SHOW PROFILES;
# reset
START TRANSACTION;
UPDATE test SET html=REPEAT('q',1) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
SET profiling=1;
# first update, set 64KB of data
START TRANSACTION;
UPDATE test SET html=REPEAT('e',1) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
# second update, reset the data
START TRANSACTION;
UPDATE test SET html='' WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
SHOW PROFILES;
innodb_buffer_pool_size = 10Ginnodb_log_file_size = 100M
wsrep_retry_autocommit = 0wsrep_sst_method = rsyncwsrep_provider_options=\"gcache.size = 512M; gcache.name = /tmp/galera.cache; gcache.page_size = 100M\"wsrep_slave_threads = 16
binlog_format=ROWinnodb_autoinc_lock_mode=2innodb_flush_log_at_trx_commit=2innodb_locks_unsafe_for_binlog = 1
gtid-domain-id=1gtid_strict_mode=1binlog-format=ROWlog-slave-updates=1
innodb_flush_log_at_trx_commit = 0
binlog_row_event_max_size = 1048576
wsrep_provider_options="gcache.size = 512M; gcache.name = /tmp/galera.cache; gcache.page_size = 100M; gcs.max_packet_size=1048576; evs.send_window=512; evs.user_send_window=256; gmcast.segment=1;"
echo 'net.core.wmem_max=12582912' >> /etc/sysctl.confecho 'net.core.rmem_max=12582912' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_rmem= 10240 87380 12582912' >> /etc/sysctl.confecho 'net.ipv4.tcp_wmem= 10240 87380 12582912' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_window_scaling = 1' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_timestamps = 1' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_sack = 1' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_no_metrics_save = 1' >> /etc/sysctl.conf
echo 'net.core.netdev_max_backlog = 5000' >> /etc/sysctl.conf
sysctl -p
echo 'net.ipv4.tcp_rmem= 1048576 1048576 12582912' >> /etc/sysctl.confecho 'net.ipv4.tcp_wmem= 1048576 1048576 12582912' >> /etc/sysctl.confsysctl -p
wsrep_last_committed | 3 |
wsrep_replicated | 3 |
wsrep_replicated_bytes | 262879 |
wsrep_repl_keys | 9 |
wsrep_repl_keys_bytes | 141 |
wsrep_repl_data_bytes | 262546 |
wsrep_repl_other_bytes | 0 |
wsrep_received | 0 |
wsrep_received_bytes | 0 |
wsrep_last_committed | 3 |
wsrep_replicated | 0 |
wsrep_replicated_bytes | 0 |
wsrep_repl_keys | 0 |
wsrep_repl_keys_bytes | 0 |
wsrep_repl_data_bytes | 0 |
wsrep_repl_other_bytes | 0 |
wsrep_received | 3 |
wsrep_received_bytes | 262879 |
wsrep_last_committed | 3 |
wsrep_replicated | 0 |
wsrep_replicated_bytes | 0 |
wsrep_repl_keys | 0 |
wsrep_repl_keys_bytes | 0 |
wsrep_repl_data_bytes | 0 |
wsrep_repl_other_bytes | 0 |
wsrep_received | 3 |
wsrep_received_bytes | 262879 |
Query_ID | Duration | Query | |
---|---|---|---|
1 | 0.00005133 |
# first update, set 64KB of data START TRANSACTIO... |
2 | 0.00111972 |
UPDATE test SET html=REPEAT('e',64*1024) WHERE use... |
3 | 0.12098766 | COMMIT |
4 | 0.00004771 |
# second update, reset the data START TRANSACTION |
5 | 0.00041681 |
UPDATE test SET html='' WHERE users_xsite_id=24138... |
6 | 0.06256374 | COMMIT |
START TRANSACTION;
UPDATE test SET html=REPEAT('q',64*1024) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
# first update, set 64KB of data
START TRANSACTION;
UPDATE test SET html=REPEAT('e',64*1024) WHERE users_xsite_id=241383 and xsite_templates_prototypes_id=5 and type='desktop';
COMMIT;
wsrep_last_committed | 1 |
wsrep_replicated | 0 |
wsrep_replicated_bytes | 0 |
wsrep_repl_keys | 0 |
wsrep_repl_keys_bytes | 0 |
wsrep_repl_data_bytes | 0 |
wsrep_repl_other_bytes | 0 |
wsrep_received | 1 |
wsrep_received_bytes | 262425 |
wsrep_last_committed | 1 |
wsrep_replicated | 1 |
wsrep_replicated_bytes | 262425 |
wsrep_repl_keys | 4 |
wsrep_repl_keys_bytes | 55 |
wsrep_repl_data_bytes | 262306 |
wsrep_repl_other_bytes | 0 |
wsrep_received | 0 |
wsrep_received_bytes | 0 |
# on all nodes
service mysql stop ; rm /var/log/mysql/* ; rm /var/lib/mysql/mysqld-bin.*
# on node where test script will be running
service mysql start --wsrep_new_cluster
service mysql start --wsrep-cluster-address="gcomm://"
# on other nodes
service mysql start
# on node where test script will be running
php testCluster.php
[mysqld]
default_storage_engine=innodb
bind-address = 0.0.0.0
innodb_buffer_pool_size = 10G
innodb_log_file_size = 100M
innodb_file_per_table
innodb_file_format = Barracuda
server-id=....
gtid-domain-id=1
gtid_strict_mode=1
binlog-format=ROW
log-slave-updates=1
bin-log
wsrep_provider = /usr/lib/galera/libgalera_smm.so
wsrep_cluster_name = cluster
wsrep_node_name = ...
wsrep_node_address = ...
wsrep_retry_autocommit = 0
wsrep_sst_method =
rsync
binlog_row_event_max_size = 1048576
wsrep_slave_threads = 16
binlog_format=ROW
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=0
innodb_locks_unsafe_for_binlog = 1
wsrep_provider_options=\"gcache.size = 512M; gcache.name = /tmp/galera.cache; gcache.page_size = 100M; gcs.max_packet_size=1048576; evs.send_window=512; evs.user_send_window=256; gmcast.segment=0;\"
wsrep_provider_options=\"gcache.size = 512M; gcache.name = /tmp/galera.cache; gcache.page_size = 100M; gcs.max_packet_size=1048576; evs.send_window=512; evs.user_send_window=256; gmcast.segment=1;\"
net.core.wmem_max=12582912
net.core.rmem_max=12582912
net.core.wmem_default=12582912
net.core.rmem_default=12582912
net.ipv4.tcp_rmem= 12582912 12582912 12582912
net.ipv4.tcp_wmem= 12582912 12582912 12582912
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000