This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_echo() { | |
echo "$(date +%Y-%m-%d_%H_%M_%S) incr-refresh $1" | |
} | |
TBL='hits' | |
# MySQL clickhouse_changelog command | |
MYCL="mysql -h source_db_host mydb -BNe" | |
# MySQL source table command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
import pymysql.cursors | |
from pymysqlreplication import BinLogStreamReader | |
from pymysqlreplication.row_event import ( | |
DeleteRowsEvent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbuf_cache_hiwater_pct 10 | |
dbuf_cache_lowater_pct 10 | |
dbuf_cache_max_bytes 104857600 | |
dbuf_cache_max_shift 5 | |
dmu_object_alloc_chunk_shift 7 | |
ignore_hole_birth 1 | |
l2arc_feed_again 1 1 | |
l2arc_feed_min_ms 200 200 | |
l2arc_feed_secs 1 1 | |
l2arc_headroom 2 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PREFIX=$1 | |
time sysbench --db-driver=mysql --mysql-user=msandbox --mysql-password=msandbox \ | |
--mysql-db=test --mysql-host=127.0.0.1 --mysql-port=57190 --tables=8 \ | |
--table-size=20000000 --auto-inc=off --threads=8 --time=0 \ | |
--rand-type=pareto oltp_read_only cleanup | |
time sysbench --db-driver=mysql --mysql-user=msandbox --mysql-password=msandbox \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Percona Toolkit System Summary Report ###################### | |
Platform | Linux | |
Release | Ubuntu 16.04.3 LTS (xenial) | |
Kernel | 4.4.0-98-generic | |
Architecture | CPU = 64-bit, OS = 64-bit | |
Threading | NPTL 2.23 | |
SELinux | No SELinux detected | |
Virtualized | No virtualization detected | |
# Processor ################################################## | |
Processors | physical = 2, cores = 12, virtual = 24, hyperthreading = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DISK=xvdb | |
USER=ubuntu | |
IP=$(ip -4 ad sh scope global | grep 'scope global' | awk '{print $2}' | cut -d'/' -f1 | head -n1) | |
KERNEL=$(uname -r) | |
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb | |
sudo dpkg -i percona-release_0.1-4.xenial_all.deb | |
sudo apt -y update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER=ubuntu | |
IP=$(ip -4 ad sh scope global | grep 'scope global' | awk '{print $2}' | cut -d'/' -f1 | head -n1) | |
KERNEL=$(uname -r) | |
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb | |
sudo dpkg -i percona-release_0.1-4.xenial_all.deb | |
sudo apt -y update | |
sudo apt -y upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DISK=xvdb | |
USER=ubuntu | |
IP=$(ip -4 ad sh scope global | grep 'scope global' | awk '{print $2}' | cut -d'/' -f1 | head -n1) | |
KERNEL=$(uname -r) | |
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb | |
sudo dpkg -i percona-release_0.1-4.xenial_all.deb | |
sudo apt -y update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DISK=xvdb | |
BACKUPVOL=xvdc | |
USER=ubuntu | |
KERNEL=$(uname -r) | |
wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb | |
sudo dpkg -i percona-release_0.1-4.xenial_all.deb | |
sudo apt -y update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env SANDBOX_BINARY=/home/jervin/mysql make_sandbox 5.7.190 -- \ | |
--upper_directory=/mysql-ext4/msb --my_clause=innodb_buffer_pool_size=38G \ | |
--my_clause=innodb_log_file_size=536870912 --my_clause=innodb_flush_method=O_DIRECT \ | |
--my_clause=bind-address=0.0.0.0 --my_clause=skip_name_resolve=1 \ | |
--my_clause=thread_cache_size=48 --my_clause=performance_schema=off \ | |
--my_clause=max_allowed_packet=33554432 --my_clause=innodb_page_cleaners=8 \ | |
--my_clause=innodb_lru_scan_depth=2048 --my_clause=innodb_io_capacity=5000 \ | |
--my_clause=innodb_io_capacity_max=10000 --my_clause=innodb_flushing_avg_loops=5 \ | |
--my_clause=innodb_flush_neighbors=2 --my_clause=innodb_buffer_pool_instances=8 | |