一:安装搭建(两个节点都要安装)

 yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm

 percona-release-1.0-.noarch

 yum update percona-release

 yum install Percona-Server-rocksdb-.x86_64

 service mysqld start

 cat /var/log/mysqld.log | grep "A temporary password" | awk -F " " '{print$11}'

 mysql -uroot -p

 alter user 'root'@'localhost' identified by 'rooT_258';

二:my.cnf配置(两个节点都要安装)

 server-id = 

 #Binary Logging.
log-bin=mysql-bin
binlog-format=row #Gtid Mode
gtid-mode=ON
enforce-gtid-consistency default-storage-engine=INNODB default-storage-engine=ROCKSDB

三:安装插件(两个节点都要安装)

 # ps-admin --enable-rocksdb -u root -prooT_258 -P  -h 192.168.202.189

 [root@rocksdb ~]# ps-admin --enable-rocksdb -u root -prooT_258 -P  -h 192.168.202.189
Checking if RocksDB plugin is available for installation ...
INFO: ha_rocksdb.so library for RocksDB found at /usr/lib64/mysql/plugin/ha_rocksdb.so. Checking RocksDB engine plugin status...
INFO: RocksDB engine plugin is not installed. Installing RocksDB engine...
INFO: Successfully installed RocksDB engine plugin.

四:主从搭建

 GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.202.190' IDENTIFIED BY 'rooT_258';
CHANGE MASTER TO MASTER_HOST='192.168.202.189', MASTER_USER='repl', MASTER_PASSWORD='rooT_258', master_auto_position=;

五:sysbench安装

 cd /usr/local/src
wget https://codeload.github.com/akopytov/sysbench/tar.gz/1.0.17
mv /usr/local/src/1.0. /usr/local/src/sysbench-1.0..tar.gz
tar -xzvf /usr/local/src/sysbench-1.0..tar.gz -C /usr/local/ cd /usr/local/sysbench-1.0. yum -y install make automake libtool pkgconfig libaio-devel
yum -y install Percona-Server-devel-.x86_64 openssl-devel ##Build and Install
./autogen.sh
# Add --with-pgsql to build with PostgreSQL support
./configure
make -j
make install sysbench --version

六:sysbench测试

准备数据:

sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
--mysql-host=localhost \
--mysql-port=3306 \
--mysql-user=root \
--mysql-password=rooT_258 \
--mysql-db=tt \
--oltp-tables-count=10 \
--oltp-table-size=1000000 \
--oltp-dist-type=uniform \
--oltp-read-only=off \
--oltp-test-mode=complex \
--rand-init=on \
--db-driver=mysql \
prepare

sysbench --test=/usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
--mysql-db=sbtest \
--oltp-tables-count=10 \
--oltp-table-size=1000000 \
--oltp-read-only=off \
--init-rng=on \
--num-threads=16 \
--max-requests=0 \
--oltp-dist-type=uniform \
--max-time=1800 \
--mysql-user=root \
--mysql-socket=/var/lib/mysql/mysql.sock \
--mysql-password=rooT_258 \
--db-driver=mysql \
--mysql-table-engine=rocksdb \
--oltp-test-mode=complex \
prepare

Innodb读写测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=tt \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=off \
> --oltp-test-mode=complex \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 343.03 qps: 6959.41 (r/w/o: 4878.02/345.83/1735.55) lat (ms,%): 101.13 err/s: 3.80 reconn/s: 0.00
[ 20s ] thds: tps: 355.71 qps: 7110.18 (r/w/o: 4978.39/359.01/1772.77) lat (ms,%): 94.10 err/s: 0.20 reconn/s: 0.00
[ 30s ] thds: tps: 419.20 qps: 8377.29 (r/w/o: 5863.30/428.40/2085.60) lat (ms,%): 58.92 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 416.99 qps: 8346.96 (r/w/o: 5843.30/429.49/2074.17) lat (ms,%): 57.87 err/s: 0.10 reconn/s: 0.00
[ 50s ] thds: tps: 368.01 qps: 7371.01 (r/w/o: 5159.38/383.60/1828.03) lat (ms,%): 73.13 err/s: 0.10 reconn/s: 0.00
[ 60s ] thds: tps: 394.21 qps: 7875.75 (r/w/o: 5512.58/414.42/1948.76) lat (ms,%): 70.55 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 406.79 qps: 8139.10 (r/w/o: 5699.26/427.48/2012.36) lat (ms,%): 63.32 err/s: 0.10 reconn/s: 0.00
[ 80s ] thds: tps: 405.22 qps: 8098.23 (r/w/o: 5670.00/431.43/1996.80) lat (ms,%): 69.29 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 406.39 qps: 8136.07 (r/w/o: 5694.94/437.29/2003.84) lat (ms,%): 55.82 err/s: 0.10 reconn/s: 0.00
[ 100s ] thds: tps: 405.39 qps: 8105.84 (r/w/o: 5675.19/438.59/1992.06) lat (ms,%): 57.87 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 421.30 qps: 8429.48 (r/w/o: 5899.49/460.40/2069.59) lat (ms,%): 53.85 err/s: 0.10 reconn/s: 0.00
[ 120s ] thds: tps: 418.51 qps: 8367.62 (r/w/o: 5858.55/463.61/2045.45) lat (ms,%): 53.85 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (396.78 per sec.)
queries: (7942.43 per sec.)
ignored errors: (0.37 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0261s
total number of events: Latency (ms):
min: 4.10
avg: 40.32
max: 970.72
95th percentile: 63.32
sum: 1920083.95 Threads fairness:
events (avg/stddev): 2976.5625/17.56
execution time (avg/stddev): 120.0052/0.00

Innodb只读测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=tt \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=on \
> --oltp-test-mode=nontrx \
> --oltp-nontrx-mode=select \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 744.45 qps: 11923.36 (r/w/o: 10432.95/0.00/1490.41) lat (ms,%): 26.68 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 739.11 qps: 11827.06 (r/w/o: 10348.74/0.00/1478.32) lat (ms,%): 26.68 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 751.78 qps: 12027.51 (r/w/o: 10524.04/0.00/1503.46) lat (ms,%): 25.74 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 753.45 qps: 12060.75 (r/w/o: 10553.76/0.00/1506.99) lat (ms,%): 26.68 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 781.27 qps: 12501.24 (r/w/o: 10938.81/0.00/1562.43) lat (ms,%): 24.38 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 787.14 qps: 12590.15 (r/w/o: 11015.77/0.00/1574.38) lat (ms,%): 24.38 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 771.21 qps: 12335.20 (r/w/o: 10792.89/0.00/1542.31) lat (ms,%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 761.03 qps: 12180.13 (r/w/o: 10657.97/0.00/1522.15) lat (ms,%): 24.83 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 787.41 qps: 12597.36 (r/w/o: 11022.54/0.00/1574.82) lat (ms,%): 24.38 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 768.70 qps: 12301.62 (r/w/o: 10764.22/0.00/1537.40) lat (ms,%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 783.80 qps: 12536.26 (r/w/o: 10968.65/0.00/1567.61) lat (ms,%): 24.38 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 781.75 qps: 12509.80 (r/w/o: 10946.30/0.00/1563.50) lat (ms,%): 24.83 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (767.60 per sec.)
queries: (12281.53 per sec.)
ignored errors: (0.00 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0202s
total number of events: Latency (ms):
min: 1.03
avg: 20.84
max: 3263.49
95th percentile: 25.28
sum: 1919661.87 Threads fairness:
events (avg/stddev): 5758.0000/427.33
execution time (avg/stddev): 119.9789/0.01

rocksdb读写测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=sbtest \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=off \
> --oltp-test-mode=complex \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 306.75 qps: 6154.40 (r/w/o: 4311.00/308.15/1535.25) lat (ms,%): 78.60 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 319.19 qps: 6392.81 (r/w/o: 4473.17/325.29/1594.35) lat (ms,%): 73.13 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 316.99 qps: 6333.45 (r/w/o: 4436.32/321.99/1575.14) lat (ms,%): 73.13 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 324.53 qps: 6488.83 (r/w/o: 4540.17/332.63/1616.03) lat (ms,%): 69.29 err/s: 0.10 reconn/s: 0.00
[ 50s ] thds: tps: 321.39 qps: 6435.15 (r/w/o: 4505.53/333.69/1595.94) lat (ms,%): 75.82 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 306.11 qps: 6110.35 (r/w/o: 4276.00/319.11/1515.24) lat (ms,%): 81.48 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 320.90 qps: 6423.65 (r/w/o: 4496.83/337.10/1589.71) lat (ms,%): 71.83 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 298.00 qps: 5965.01 (r/w/o: 4177.04/314.40/1473.58) lat (ms,%): 84.47 err/s: 0.10 reconn/s: 0.00
[ 90s ] thds: tps: 308.90 qps: 6172.84 (r/w/o: 4319.96/326.00/1526.88) lat (ms,%): 78.60 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 314.10 qps: 6286.15 (r/w/o: 4402.14/337.00/1547.01) lat (ms,%): 73.13 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 320.60 qps: 6404.45 (r/w/o: 4481.94/345.00/1577.51) lat (ms,%): 70.55 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 313.70 qps: 6289.50 (r/w/o: 4401.27/342.61/1545.62) lat (ms,%): 73.13 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (314.36 per sec.)
queries: (6287.44 per sec.)
ignored errors: (0.02 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0142s
total number of events: Latency (ms):
min: 6.91
avg: 50.89
max: 541.98
95th percentile: 74.46
sum: 1919973.66 Threads fairness:
events (avg/stddev): 2358.0000/62.04
execution time (avg/stddev): 119.9984/0.00

rocksdb只读测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=sbtest \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=on \
> --oltp-test-mode=nontrx \
> --oltp-nontrx-mode=select \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 496.85 qps: 7967.30 (r/w/o: 6972.01/0.00/995.29) lat (ms,%): 41.10 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 486.83 qps: 7788.72 (r/w/o: 6815.05/0.00/973.66) lat (ms,%): 42.61 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 491.92 qps: 7864.35 (r/w/o: 6880.51/0.00/983.84) lat (ms,%): 41.85 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 480.90 qps: 7702.69 (r/w/o: 6740.99/0.00/961.70) lat (ms,%): 43.39 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 492.40 qps: 7873.26 (r/w/o: 6888.37/0.00/984.90) lat (ms,%): 41.85 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 491.01 qps: 7858.11 (r/w/o: 6876.20/0.00/981.91) lat (ms,%): 42.61 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 507.61 qps: 8120.91 (r/w/o: 7105.80/0.00/1015.11) lat (ms,%): 38.94 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 492.30 qps: 7875.69 (r/w/o: 6890.99/0.00/984.70) lat (ms,%): 41.10 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 497.10 qps: 7952.73 (r/w/o: 6958.42/0.00/994.30) lat (ms,%): 40.37 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 503.09 qps: 8046.67 (r/w/o: 7040.50/0.00/1006.17) lat (ms,%): 39.65 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 433.50 qps: 6941.71 (r/w/o: 6074.71/0.00/867.00) lat (ms,%): 55.82 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 370.69 qps: 5930.89 (r/w/o: 5189.80/0.00/741.09) lat (ms,%): 80.03 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (478.73 per sec.)
queries: (7659.72 per sec.)
ignored errors: (0.00 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0260s
total number of events: Latency (ms):
min: 2.97
avg: 33.41
max: 484.33
95th percentile: 44.98
sum: 1919958.53 Threads fairness:
events (avg/stddev): 3591.3125/134.95
execution time (avg/stddev): 119.9974/0.01

innodb压缩读写测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=tt \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=off \
> --oltp-test-mode=complex \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 255.24 qps: 5128.94 (r/w/o: 3593.68/286.50/1248.76) lat (ms,%): 170.48 err/s: 0.10 reconn/s: 0.00
[ 20s ] thds: tps: 344.91 qps: 6898.00 (r/w/o: 4828.47/382.51/1687.03) lat (ms,%): 97.55 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 368.50 qps: 7369.58 (r/w/o: 5159.16/413.30/1797.12) lat (ms,%): 71.83 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 390.00 qps: 7801.68 (r/w/o: 5459.98/442.40/1899.29) lat (ms,%): 62.19 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 367.00 qps: 7341.67 (r/w/o: 5138.88/422.10/1780.69) lat (ms,%): 63.32 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 376.29 qps: 7524.41 (r/w/o: 5267.66/430.39/1826.35) lat (ms,%): 64.47 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 366.12 qps: 7329.02 (r/w/o: 5128.72/422.52/1777.78) lat (ms,%): 68.05 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 358.79 qps: 7169.39 (r/w/o: 5019.82/422.19/1727.37) lat (ms,%): 73.13 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 378.09 qps: 7562.00 (r/w/o: 5293.86/444.39/1823.75) lat (ms,%): 61.08 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 322.91 qps: 6459.89 (r/w/o: 4521.60/384.42/1553.87) lat (ms,%): 81.48 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 264.69 qps: 5295.37 (r/w/o: 3706.31/314.99/1274.07) lat (ms,%): 139.85 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 166.48 qps: 3332.88 (r/w/o: 2332.08/197.88/802.92) lat (ms,%): 277.21 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (328.39 per sec.)
queries: (6567.99 per sec.)
ignored errors: (0.01 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .6141s
total number of events: Latency (ms):
min: 3.01
avg: 48.55
max: 1218.59
95th percentile: 87.56
sum: 1923115.64 Threads fairness:
events (avg/stddev): 2475.6250/139.67
execution time (avg/stddev): 120.1947/0.19

innodb压缩只读测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=tt \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=on \
> --oltp-test-mode=nontrx \
> --oltp-nontrx-mode=select \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 756.04 qps: 12107.14 (r/w/o: 10593.68/0.00/1513.47) lat (ms,%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 758.47 qps: 12137.94 (r/w/o: 10620.90/0.00/1517.04) lat (ms,%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 713.78 qps: 11423.93 (r/w/o: 9996.26/0.00/1427.67) lat (ms,%): 27.66 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 736.63 qps: 11781.92 (r/w/o: 10308.66/0.00/1473.25) lat (ms,%): 25.74 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 741.59 qps: 11864.27 (r/w/o: 10381.09/0.00/1483.18) lat (ms,%): 25.74 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 727.88 qps: 11647.00 (r/w/o: 10191.44/0.00/1455.56) lat (ms,%): 26.68 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 750.52 qps: 12009.86 (r/w/o: 10508.62/0.00/1501.25) lat (ms,%): 25.74 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 765.05 qps: 12243.64 (r/w/o: 10713.63/0.00/1530.00) lat (ms,%): 24.83 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 768.50 qps: 12292.47 (r/w/o: 10755.46/0.00/1537.01) lat (ms,%): 24.83 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 750.12 qps: 12005.80 (r/w/o: 10505.55/0.00/1500.25) lat (ms,%): 25.28 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 742.02 qps: 11872.50 (r/w/o: 10388.36/0.00/1484.14) lat (ms,%): 25.74 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (747.62 per sec.)
queries: (11961.89 per sec.)
ignored errors: (0.00 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0185s
total number of events: Latency (ms):
min: 2.07
avg: 21.39
max: 609.74
95th percentile: 25.74
sum: 1919493.65 Threads fairness:
events (avg/stddev): 5608.0625/157.07
execution time (avg/stddev): 119.9684/0.03

rocksdb压缩读写测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=sbtest \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=off \
> --oltp-test-mode=complex \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 0.50 qps: 29.64 (r/w/o: 23.55/0.80/5.29) lat (ms,%): 9118.47 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 4.71 qps: 100.40 (r/w/o: 69.14/5.71/25.55) lat (ms,%): 11317.84 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 11.90 qps: 232.10 (r/w/o: 162.00/12.70/57.40) lat (ms,%): 4055.23 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 76.00 qps: 1530.41 (r/w/o: 1071.21/83.40/375.80) lat (ms,%): 484.44 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 69.20 qps: 1384.02 (r/w/o: 968.81/75.30/339.90) lat (ms,%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 95.30 qps: 1905.97 (r/w/o: 1334.18/103.90/467.89) lat (ms,%): 397.39 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 75.70 qps: 1510.76 (r/w/o: 1058.94/81.30/370.51) lat (ms,%): 612.21 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 122.40 qps: 2449.34 (r/w/o: 1713.06/134.00/602.29) lat (ms,%): 376.49 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 142.39 qps: 2849.79 (r/w/o: 1994.92/156.09/698.77) lat (ms,%): 287.38 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 205.70 qps: 4110.81 (r/w/o: 2877.51/227.20/1006.10) lat (ms,%): 173.58 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 254.10 qps: 5079.68 (r/w/o: 3557.19/280.10/1242.39) lat (ms,%): 142.39 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 248.70 qps: 4975.77 (r/w/o: 3481.55/276.80/1217.42) lat (ms,%): 137.35 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (108.99 per sec.)
queries: (2179.76 per sec.)
ignored errors: (0.00 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0119s
total number of events: Latency (ms):
min: 11.59
avg: 146.79
max: 11455.56
95th percentile: 383.33
sum: 1920021.31 Threads fairness:
events (avg/stddev): 817.5000/14.68
execution time (avg/stddev): 120.0013/0.00

rocksdb压缩只读测试

 [root@rocksdb sysbench-1.0.]# sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua \
> --mysql-host=localhost \
> --mysql-port= \
> --mysql-user=root \
> --mysql-password=rooT_258 \
> --mysql-db=sbtest \
> --oltp-tables-count= \
> --oltp-table-size= \
> --oltp-dist-type=uniform \
> --oltp-read-only=on \
> --oltp-test-mode=nontrx \
> --oltp-nontrx-mode=select \
> --rand-init=on \
> --db-driver=mysql \
> --report-interval= \
> --threads= \
> --time= \
> run
sysbench 1.0. (using bundled LuaJIT 2.1.-beta2) Running the test with following options:
Number of threads:
Report intermediate results every second(s)
Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: tps: 525.60 qps: 8424.02 (r/w/o: 7371.23/0.00/1052.79) lat (ms,%): 36.89 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: tps: 539.48 qps: 8630.07 (r/w/o: 7551.11/0.00/1078.96) lat (ms,%): 36.24 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: tps: 496.22 qps: 7939.31 (r/w/o: 6946.87/0.00/992.44) lat (ms,%): 36.89 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: tps: 544.86 qps: 8718.11 (r/w/o: 7628.38/0.00/1089.73) lat (ms,%): 35.59 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: tps: 472.71 qps: 7566.72 (r/w/o: 6621.30/0.00/945.43) lat (ms,%): 38.94 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: tps: 539.92 qps: 8637.35 (r/w/o: 7557.51/0.00/1079.84) lat (ms,%): 36.24 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: tps: 522.27 qps: 8354.16 (r/w/o: 7309.63/0.00/1044.53) lat (ms,%): 38.94 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: tps: 520.55 qps: 8328.93 (r/w/o: 7287.94/0.00/1040.99) lat (ms,%): 39.65 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: tps: 529.17 qps: 8470.67 (r/w/o: 7412.22/0.00/1058.45) lat (ms,%): 40.37 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: tps: 521.31 qps: 8341.12 (r/w/o: 7298.61/0.00/1042.52) lat (ms,%): 38.94 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: tps: 531.61 qps: 8506.08 (r/w/o: 7442.76/0.00/1063.32) lat (ms,%): 39.65 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: tps: 542.14 qps: 8658.39 (r/w/o: 7575.60/0.00/1082.79) lat (ms,%): 37.56 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read:
write:
other:
total:
transactions: (523.82 per sec.)
queries: (8381.12 per sec.)
ignored errors: (0.00 per sec.)
reconnects: (0.00 per sec.) General statistics:
total time: .0437s
total number of events: Latency (ms):
min: 16.98
avg: 30.52
max: 1116.95
95th percentile: 38.25
sum: 1919341.74 Threads fairness:
events (avg/stddev): 3930.1250/150.59
execution time (avg/stddev): 119.9589/0.03

参考资料:

将MySQL去重操作优化到极致之三弹连发(三):用rocksdb替代innodb :https://www.cnblogs.com/liuyu124/p/7333471.html

MySQL VS RocksDB VS TiDB 完全版性能测试  : http://liky.farbox.com/post/tidb

mysql rocksdb使用报告 :https://www.jianshu.com/p/50aed4f00215

Linux下Mysql数据库的压力测试: https://blog.csdn.net/qq_42303254/article/details/88189503

Percona Server MySQL 5.7新引擎MyRocks性能基准测试:http://baijiahao.baidu.com/s?id=1599227245729254474&wfr=spider&for=pc

MyRocks DDL原理:https://www.cnblogs.com/cchust/p/6716823.html

RocksDB存储引擎测试的更多相关文章

  1. [MySQL Reference Manual]14 InnoDB存储引擎

    14 InnoDB存储引擎 14 InnoDB存储引擎 14.1 InnoDB说明 14.1.1 InnoDB作为默认存储引擎 14.1.1.1 存储引擎的趋势 14.1.1.2 InnoDB变成默认 ...

  2. MYSQL初级学习笔记二:数据表相关操作及MySQL存储引擎!(视频序号:初级_5,7-22|6)

    知识点三:数据表相关操作(5,7-22) --------------------------------整型--------------------------------- --测试整型 CREA ...

  3. MySQL开发篇,存储引擎的选择真的很重要吗?

    前言 谁说MySQL查询千万级别的数据很拉跨?我今天就要好好的和你拉拉家常,畅谈到深夜,一起过除夕!这篇文章也是年前的最后一篇,希望能带给大家些许收获,不知不觉查找文档和参考实体书籍就写了这么多,自己 ...

  4. 对LevelDB的“升级版”存储引擎RocksDB的调研成果

    Google的leveldb是个非常优秀的存储引擎.但还是有一些不尽人意的地方,比方leveldb不支持多线程合并.对key范围查找的支持还非常easy,未做优化措施,等等.而Facebook的Roc ...

  5. mongodb三种存储引擎高并发更新性能专题测试

    背景说明 近期北京理财频道反馈用来存放股市实时数据的MongoDB数据库写响应请求很慢,难以跟上业务写入速度水平.我们分析了线上现场的情况,发现去年升级到SSD磁盘后,数据持久化的磁盘IO开销已经不是 ...

  6. mysql memory存储引擎简单测试

    Auth: jin Date: 20140423 mysql> CREATE TABLE `t4` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` ...

  7. Ceph Newstore存储引擎介绍

    在Ceph被越来越多地应用于各项存储业务过程中,其性能及调优策略也成为用户密切关注讨论的话题,影响性能表现关键因素之一即OSD存储引擎实现:Ceph基础组件RADOS是强一致.对象存储系统,其OSD底 ...

  8. MongoDB存储引擎选择

    MongoDB存储引擎选择 MongoDB存储引擎构架 插件式存储引擎, MongoDB 3.0引入了插件式存储引擎API,为第三方的存储引擎厂商加入MongoDB提供了方便,这一变化无疑参考了MyS ...

  9. MySQL for OPS 04:存储引擎

    写在前面的话 在使用 Linux 的时候,可以经常听到有关文件系统 FS(File System)的东西,MySQL 也有属于自己类似的东西,那就是存储引擎.之前在创建数据表的时候,在 Create ...

随机推荐

  1. 模块的四种形式、 import和from...import、 循环导入问题、模块的搜索路径、 python文件的两种用途

    目录 模块的四种形式 模块 模块的四种形式 import和from...import 循环导入问题 模拟问题的发生: 解决方案 模块的搜索路径 Python文件的两种用途 模块的四种形式 Nike推荐 ...

  2. LeetCode--096--不同的二叉搜索树(python)

    我的思路比较low直接看官方题解吧... class Solution: def numTrees(self, n: int) -> int: G = [0] * (n+1) G[0],G[1] ...

  3. clang和llvm的安装

    https://blog.csdn.net/qq_31157999/article/details/78906982

  4. POJ 2112 Optimal Milking ( 经典最大流 && Floyd && 二分 )

    题意 : 有 K 台挤奶机器,每台机器可以接受 M 头牛进行挤奶作业,总共有 C 头奶牛,机器编号为 1~K,奶牛编号为 K+1 ~ K+C ,然后给出奶牛和机器之间的距离矩阵,要求求出使得每头牛都能 ...

  5. vim 复制

    要复制到别的地方,用 "+y 来复制,注意是三个字符.gg"+yG 1.复制 1)单行复制 在命令模式下,将光标移动到将要复制的行处,按“yy”进行复制: 2)多行复制 在命令模式 ...

  6. SpringBoot项目的前端+thymeleaf模板引擎

    SpringBoot项目创建之后,后台的框架是SpringMVC.但前端的resource和template目录都是空的.这个时候需要创建前台页面. 习惯上,我们会创建JSP,但是,SpringBoo ...

  7. vue之router-link

    <router-link> 组件支持用户在具有路由功能的应用中(点击)导航.  1.to:表示目标路由的链接.当被点击后,内部会立刻把 to 的值传到 router.push(),所以这个 ...

  8. angular ajax

    在使用angular 发送ajax的时候,状态信息是正常的,状态码200,返回的参数是使用@responsebody转换后返回的字串.在前端却总是在调用错误的回调函数,也拿不到正确的反馈信息. 回调函 ...

  9. TCP报文段首部格式详解

    TCP首部格式   格式字段详解   源端口.目标端口: 计算机上的进程要和其他进程通信是要通过计算机端口的,而一个计算机端口某个时刻只能被一个进程占用,所以通过指定源端口和目标端口,就可以知道是哪两 ...

  10. git使用,Git的skil-map,git配置http/https/socks5代理

    . 检出.克隆库: git clone git://git.openwrt.org/openwrt.git 2. git查看某个文件的修改历史 git log --pretty=oneline 文件名 ...