################ Donor -- clone plugin and required user INSTALL PLUGIN clone SONAME 'mysql_clone.so'; CREATE USER clone_user IDENTIFIED BY "clone_password"; GRANT BACKUP_ADMIN ON *.* to clone_user; GRANT SELECT ON performance_schema.* TO clone_user; GRANT EXECUTE ON *.* to clone_user; -- schema create database if not exists test; use test; drop table if exists none_employees; CREATE TABLE none_employees ( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR(14) NOT NULL, last_name VARCHAR(16) NOT NULL, gender ENUM ('M','F') NOT NULL, hire_date DATE NOT NULL, PRIMARY KEY (emp_no) ) COMPRESSION="none"; set @id:=0; insert into `none_employees` values (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); insert into `none_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from `none_employees` k1, `none_employees` k2, `none_employees` k3, `none_employees` k4,`none_employees` k5,`none_employees` k6, `none_employees` k7, `none_employees` k8, `none_employees` k9, `none_employees` k0,`none_employees` ka, `none_employees` kb, `none_employees` kc, `none_employees` kd limit 10000000; drop table if exists zlib_employees; CREATE TABLE zlib_employees ( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR(14) NOT NULL, last_name VARCHAR(16) NOT NULL, gender ENUM ('M','F') NOT NULL, hire_date DATE NOT NULL, PRIMARY KEY (emp_no) ) COMPRESSION="zlib"; set @id:=0; insert into `zlib_employees` values (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); insert into `zlib_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from `zlib_employees` k1, `zlib_employees` k2, `zlib_employees` k3, `zlib_employees` k4,`zlib_employees` k5,`zlib_employees` k6, `zlib_employees` k7, `zlib_employees` k8, `zlib_employees` k9, `zlib_employees` k0,`zlib_employees` ka, `zlib_employees` kb, `zlib_employees` kc, `zlib_employees` kd limit 10000000; drop table if exists lz4_employees; CREATE TABLE lz4_employees ( emp_no INT NOT NULL, birth_date DATE NOT NULL, first_name VARCHAR(14) NOT NULL, last_name VARCHAR(16) NOT NULL, gender ENUM ('M','F') NOT NULL, hire_date DATE NOT NULL, PRIMARY KEY (emp_no) ) COMPRESSION="lz4"; set @id:=0; insert into `lz4_employees` values (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); insert into `lz4_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from `lz4_employees` k1, `lz4_employees` k2, `lz4_employees` k3, `lz4_employees` k4,`lz4_employees` k5,`lz4_employees` k6, `lz4_employees` k7, `lz4_employees` k8, `lz4_employees` k9, `lz4_employees` k0,`lz4_employees` ka, `lz4_employees` kb, `lz4_employees` kc, `lz4_employees` kd limit 10000000; ################ Recipient INSTALL PLUGIN clone SONAME 'mysql_clone.so'; CREATE USER clone_user IDENTIFIED BY "clone_password"; GRANT BACKUP_ADMIN ON *.* to clone_user; GRANT SELECT ON performance_schema.* TO clone_user; GRANT EXECUTE ON *.* to clone_user; SHOW VARIABLES LIKE 'clone_valid_donor_list'; SET GLOBAL clone_valid_donor_list = "xxxxx.no.oracle.com:3333"; SHOW VARIABLES LIKE 'clone_valid_donor_list'; CLONE INSTANCE FROM clone_user@xxxxx.no.oracle.com:3333 IDENTIFIED BY 'clone_password'; -- Both instances build using (NOT using generic .tar.gz to avoid Bug #77974) ################ Donor md5sum mysql-boost-8.0.21.tar.gz 06005d53f6a49ddde909c2dda149bc34 mysql-boost-8.0.21.tar.gz ################ rec ushastry@ctos8 Downloads]$ md5sum mysql-boost-8.0.21.tar.gz 06005d53f6a49ddde909c2dda149bc34 mysql-boost-8.0.21.tar.gz MYSQL_VERSION="8021" TARGET=/home/ushastry/Downloads/$MYSQL_VERSION rm -rf /home/ushastry/Downloads/$MYSQL_VERSION rm -rf bld/ mkdir bld && cd bld rm -rf CMakeCache.txt cmake ../mysql-8.0.21 \ -DBUILD_CONFIG=mysql_release \ -DCMAKE_INSTALL_PREFIX=$TARGET \ -DWITH_BOOST=../mysql-8.0.21/boost make -j 16 make install cd ../8021 -- Build used mysql> system cat docs/INFO_SRC commit: 09901861e2ef411f49aff8905fa99ad479280bf4 date: 2020-06-16 15:51:03 +0200 build-date: 2020-06-16 18:31:54 +0200 short: 0990186 branch: mysql-8.0.21-release MySQL source 8.0.21 ################ Donor -- env cat /etc/*release Oracle Linux Server release 7.1 NAME="Oracle Linux Server" VERSION="7.1" ID="ol" VERSION_ID="7.1" PRETTY_NAME="Oracle Linux Server 7.1" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:7:1" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/" ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7" ORACLE_BUGZILLA_PRODUCT_VERSION=7.1 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=7.1 Red Hat Enterprise Linux Server release 7.1 (Maipo) Oracle Linux Server release 7.1 - Supported platform https://dev.mysql.com/doc/refman/8.0/en/innodb-page-compression.html uname -r 3.8.13-98.2.2.el7uek.x86_64 stat -fc %s . 4096 df -T /export/umesh/ Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda1 xfs 15622910956 12230762404 3392148552 79% /export -- server start up rm -rf 100243/ bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/100243 --log-error-verbosity=3 bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/100243 --core-file --socket=/tmp/mysql_ushastry.sock --port=3333 --log-error=$PWD/100243/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv=/tmp/ 2>&1 & -- extract from error log to confirm that support available 2020-07-20T06:54:59.468484Z 1 [Note] [MY-012932] [InnoDB] PUNCH HOLE support available -- CLI session bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.21 Source distribution Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE TABLE none_employees ( -> emp_no INT NOT NULL, -> birth_date DATE NOT NULL, -> first_name VARCHAR(14) NOT NULL, -> last_name VARCHAR(16) NOT NULL, -> gender ENUM ('M','F') NOT NULL, -> hire_date DATE NOT NULL, -> PRIMARY KEY (emp_no) -> ) COMPRESSION="none"; Query OK, 0 rows affected (0.01 sec) mysql> mysql> set @id:=0; Query OK, 0 rows affected (0.00 sec) mysql> mysql> insert into `none_employees` values -> (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); Query OK, 4 rows affected, 4 warnings (0.00 sec) Records: 4 Duplicates: 0 Warnings: 4 mysql> insert into `none_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) -> select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from -> `none_employees` k1, `none_employees` k2, `none_employees` k3, `none_employees` k4,`none_employees` k5,`none_employees` k6, `none_employees` k7, `none_employees` k8, `none_employees` k9, -> `none_employees` k0,`none_employees` ka, `none_employees` kb, `none_employees` kc, `none_employees` kd limit 10000000; Query OK, 10000000 rows affected, 1 warning (3 min 37.58 sec) Records: 10000000 Duplicates: 0 Warnings: 1 mysql> CREATE TABLE zlib_employees ( -> emp_no INT NOT NULL, -> birth_date DATE NOT NULL, -> first_name VARCHAR(14) NOT NULL, -> last_name VARCHAR(16) NOT NULL, -> gender ENUM ('M','F') NOT NULL, -> hire_date DATE NOT NULL, -> PRIMARY KEY (emp_no) -> ) COMPRESSION="zlib"; Query OK, 0 rows affected (0.01 sec) mysql> mysql> set @id:=0; Query OK, 0 rows affected (0.00 sec) mysql> mysql> insert into `zlib_employees` values -> (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); Query OK, 4 rows affected, 4 warnings (0.00 sec) Records: 4 Duplicates: 0 Warnings: 4 mysql> insert into `zlib_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) -> select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from -> `zlib_employees` k1, `zlib_employees` k2, `zlib_employees` k3, `zlib_employees` k4,`zlib_employees` k5,`zlib_employees` k6, `zlib_employees` k7, `zlib_employees` k8, `zlib_employees` k9, -> `zlib_employees` k0,`zlib_employees` ka, `zlib_employees` kb, `zlib_employees` kc, `zlib_employees` kd limit 10000000; Query OK, 10000000 rows affected, 1 warning (3 min 36.86 sec) Records: 10000000 Duplicates: 0 Warnings: 1 mysql> CREATE TABLE lz4_employees ( -> emp_no INT NOT NULL, -> birth_date DATE NOT NULL, -> first_name VARCHAR(14) NOT NULL, -> last_name VARCHAR(16) NOT NULL, -> gender ENUM ('M','F') NOT NULL, -> hire_date DATE NOT NULL, -> PRIMARY KEY (emp_no) -> ) COMPRESSION="lz4"; Query OK, 0 rows affected (0.01 sec) mysql> mysql> set @id:=0; Query OK, 0 rows affected (0.00 sec) mysql> mysql> insert into `lz4_employees` values -> (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate()) -> , (@id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'F',curdate()); Query OK, 4 rows affected, 4 warnings (0.00 sec) Records: 4 Duplicates: 0 Warnings: 4 mysql> insert into `lz4_employees`(`emp_no`,birth_date,first_name,last_name,gender, hire_date) -> select @id:=@id+1, curdate(), SUBSTRING(MD5(RAND()) FROM 1 FOR 10),SUBSTRING(MD5(RAND()) FROM 1 FOR 10),'M',curdate() from -> `lz4_employees` k1, `lz4_employees` k2, `lz4_employees` k3, `lz4_employees` k4,`lz4_employees` k5,`lz4_employees` k6, `lz4_employees` k7, `lz4_employees` k8, `lz4_employees` k9, -> `lz4_employees` k0,`lz4_employees` ka, `lz4_employees` kb, `lz4_employees` kc, `lz4_employees` kd limit 10000000; Query OK, 10000000 rows affected, 1 warning (3 min 41.29 sec) Records: 10000000 Duplicates: 0 Warnings: 1 mysql> SELECT SPACE, NAME, FS_BLOCK_SIZE, FILE_SIZE, ALLOCATED_SIZE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME LIKE 'test%'; +-------+---------------------+---------------+-----------+----------------+ | SPACE | NAME | FS_BLOCK_SIZE | FILE_SIZE | ALLOCATED_SIZE | +-------+---------------------+---------------+-----------+----------------+ | 10 | test/none_employees | 4096 | 570425344 | 570429440 | | 11 | test/zlib_employees | 4096 | 570425344 | 293064704 | | 12 | test/lz4_employees | 4096 | 570425344 | 432025600 | +-------+---------------------+---------------+-----------+----------------+ 3 rows in set (0.00 sec) Every 2.0s: ls -ltrh 100243/test/ Mon Jul 20 11:13:57 2020 total 1.3G 544M -rw-r----- 1 umshastr common 544M Jul 20 11:01 none_employees.ibd 280M -rw-r----- 1 umshastr common 544M Jul 20 11:06 zlib_employees.ibd 412M -rw-r----- 1 umshastr common 544M Jul 20 11:10 lz4_employees.ibd ################ Recipient df -T /home/ushastry/ Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/cl-home xfs 52403200 16593004 35810196 32% /home stat -fc %s . 4096 [ushastry@ctos8 mysql-8.0.21]$ cat /etc/*release CentOS Linux release 8.0.1905 (Core) NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8" CentOS Linux release 8.0.1905 (Core) CentOS Linux release 8.0.1905 (Core) [ushastry@ctos8 8021]$ uname -r 4.18.0-80.11.2.el8_0.x86_64 [ushastry@ctos8 mysql-8.0.21]$ cat Docs/INFO_SRC commit: 09901861e2ef411f49aff8905fa99ad479280bf4 date: 2020-06-16 15:51:03 +0200 build-date: 2020-06-16 18:31:54 +0200 short: 0990186 branch: mysql-8.0.21-release MySQL source 8.0.21 rm -rf 100243/ bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/100243 --log-error-verbosity=3 bin/mysqld_safe --no-defaults --basedir=$PWD --datadir=$PWD/100243 --core-file --socket=/tmp/mysql_c_ushastry.sock --port=3336 --log-error=$PWD/100243/log.err --mysqlx-port=33360 --mysqlx-socket=/tmp/mysql_xx_ushastry.sock --log-error-verbosity=3 --secure-file-priv=/tmp/ 2>&1 & - extract from error log 2020-07-20T08:57:02.645799Z 1 [Note] [MY-012932] [InnoDB] PUNCH HOLE support available [ushastry@ctos8 8021]$ bin/mysql -uroot -S /tmp/mysql_c_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.21 Source distribution Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> INSTALL PLUGIN clone SONAME 'mysql_clone.so'; Query OK, 0 rows affected (0.01 sec) mysql> CREATE USER clone_user IDENTIFIED BY "clone_password"; Query OK, 0 rows affected (0.03 sec) mysql> GRANT BACKUP_ADMIN ON *.* to clone_user; Query OK, 0 rows affected (0.01 sec) mysql> GRANT SELECT ON performance_schema.* TO clone_user; Query OK, 0 rows affected (0.02 sec) mysql> GRANT EXECUTE ON *.* to clone_user; Query OK, 0 rows affected (0.03 sec) mysql> SHOW VARIABLES LIKE 'clone_valid_donor_list'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | clone_valid_donor_list | | +------------------------+-------+ 1 row in set (0.00 sec) mysql> SET GLOBAL clone_valid_donor_list = "xxxxx.no.oracle.com:3333"; Query OK, 0 rows affected (0.00 sec) mysql> SHOW VARIABLES LIKE 'clone_valid_donor_list'; +------------------------+--------------------------+ | Variable_name | Value | +------------------------+--------------------------+ | clone_valid_donor_list | xxxxx.no.oracle.com:3333 | +------------------------+--------------------------+ 1 row in set (0.01 sec) mysql> mysql> CLONE INSTANCE FROM clone_user@xxxxx.no.oracle.com:3333 IDENTIFIED BY 'clone_password'; Query OK, 0 rows affected (1 min 34.31 sec) mysql> Restarting mysqld... 2020-07-20T09:17:54.072677Z mysqld_safe Number of processes running now: 0 2020-07-20T09:17:54.081546Z mysqld_safe mysqld restarted mysql> SELECT SPACE, NAME, FS_BLOCK_SIZE, FILE_SIZE, ALLOCATED_SIZE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME LIKE 'test%'; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 7 Current database: *** NONE *** +-------+---------------------+---------------+-----------+----------------+ | SPACE | NAME | FS_BLOCK_SIZE | FILE_SIZE | ALLOCATED_SIZE | +-------+---------------------+---------------+-----------+----------------+ | 10 | test/none_employees | 4096 | 570425344 | 570425344 | | 11 | test/zlib_employees | 4096 | 570425344 | 297205760 | | 12 | test/lz4_employees | 4096 | 570425344 | 436183040 | +-------+---------------------+---------------+-----------+----------------+ 3 rows in set (0.00 sec) from file system ls -lh 100243/test total 1.3G 412M -rw-r-----. 1 ushastry ushastry 544M Jul 20 05:17 lz4_employees.ibd 544M -rw-r-----. 1 ushastry ushastry 544M Jul 20 05:16 none_employees.ibd 280M -rw-r-----. 1 ushastry ushastry 544M Jul 20 05:17 zlib_employees.ibd [ushastry@ctos8 8021]$