mysql壓測
壓測收集統計資訊指令碼
#!/bin/sh
INTERVAL=5
PREFIX=$INTERVAL-sec-status
RUNFILE=/tmp/running
mysql -e 'show global variables' >> mysql-variables
while test -e $RUNFILE; do
file=$(date +%F_%I)
sleep=$(date +%s.%N | awk "{print $INTERVAL - (\$1 % $INTERVAL)}")
sleep $sleep
ts="$(date +"TS %s.%N %F %T")"
loadavg="$(uptime)"
echo "$ts $loadavg" >> $PREFIX-${file}-status
mysql -e 'show global status' >> $PREFIX-${file}-innodbstatus &
echo "$ts $loadavg" >> $PREFIX-${file}-innodbstatus
mysql -e 'SHOW ENGINE INNODB STATUS\G' >> $PREFIX-${file}-innodbstatus &
echo "$ts $loadavg" >> $PREFIX-${file}-processlist
mysql -e 'SHOW FULL processlist\G' >> $PREFIX-${file}-processlist &
echo $ts
done
echo Exiting because $RUNFILE does not exist.
sysbench
Sysbench是一個模組化、跨平臺、多執行緒基準測試工具,主要用於評估測試各種不同的系統引數下的資料庫負載情況.
1.CPU效能
2.磁碟I/O效能
3.排程程式效能
4.記憶體分配已經傳輸速度
5.POSIX執行緒效能
6.資料庫效能(OLTP基準測試)
yum install -y automake wget libtool zlib-devel
wget
tar zxvf sysbench-0.4.10.tar.gz
cd sysbench-0.4.10
sed -i 's/AC_PROG_LIBTOOL/#AC_PROG_LIBTOOL/g' configure.ac
sed -i '/#AC_PROG_LIBTOOL/a AC_PROG_RANLIB' configure.ac
mkdir /usr/local/sysbench
vim /etc/profile.d/sysbench.sh
export LD_LIBRARY_PATH=/mysql/lib
export PATH=/usr/local/sysbench/bin:$PATH
./autogen.sh
./configure --prefix=/usr/local/sysbench --with-mysql-includes=/usr/include --with-mysql-libs=/usr/lib64
make && make install
#!/bin/sh
INTERVAL=5
PREFIX=$INTERVAL-sec-status
RUNFILE=/tmp/running
mysql -e 'show global variables' >> mysql-variables
while test -e $RUNFILE; do
file=$(date +%F_%I)
sleep=$(date +%s.%N | awk "{print $INTERVAL - (\$1 % $INTERVAL)}")
sleep $sleep
ts="$(date +"TS %s.%N %F %T")"
loadavg="$(uptime)"
echo "$ts $loadavg" >> $PREFIX-${file}-status
mysql -e 'show global status' >> $PREFIX-${file}-innodbstatus &
echo "$ts $loadavg" >> $PREFIX-${file}-innodbstatus
mysql -e 'SHOW ENGINE INNODB STATUS\G' >> $PREFIX-${file}-innodbstatus &
echo "$ts $loadavg" >> $PREFIX-${file}-processlist
mysql -e 'SHOW FULL processlist\G' >> $PREFIX-${file}-processlist &
echo $ts
done
echo Exiting because $RUNFILE does not exist.
sysbench
Sysbench是一個模組化、跨平臺、多執行緒基準測試工具,主要用於評估測試各種不同的系統引數下的資料庫負載情況.
1.CPU效能
2.磁碟I/O效能
3.排程程式效能
4.記憶體分配已經傳輸速度
5.POSIX執行緒效能
6.資料庫效能(OLTP基準測試)
yum install -y automake wget libtool zlib-devel
wget
tar zxvf sysbench-0.4.10.tar.gz
cd sysbench-0.4.10
sed -i 's/AC_PROG_LIBTOOL/#AC_PROG_LIBTOOL/g' configure.ac
sed -i '/#AC_PROG_LIBTOOL/a AC_PROG_RANLIB' configure.ac
mkdir /usr/local/sysbench
vim /etc/profile.d/sysbench.sh
export LD_LIBRARY_PATH=/mysql/lib
export PATH=/usr/local/sysbench/bin:$PATH
./autogen.sh
./configure --prefix=/usr/local/sysbench --with-mysql-includes=/usr/include --with-mysql-libs=/usr/lib64
make && make install
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29620572/viewspace-1820780/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql benchmarksql 壓測MySql
- MySQL的壓測MySql
- MySQL mysqlslap壓測MySql
- benchmarksql 5.0壓測MySQLMySql
- 壓測工具之Sysbench1.0(2_MySQL壓測)MySql
- MYSQL壓縮表測試MySql
- mysql壓力測試在京東雲ssd雲盤(tpccmysql壓測)MySql
- tpcc-mysql 壓測報告MySql
- 【工具】MySQL 壓測工具之mydbtestMySql
- Mysql 壓力測試工具sysbenchMySql
- MySQL 寫入壓測幾種方式MySql
- MySQL字元函式的壓力測試MySql字元函式
- MySQL基準壓力測試工具MySQLSlapMySql
- mysql之 mysql資料庫壓力測試工具(mysqlslap)MySql資料庫
- 使用 locust 對 mysql 語句進行壓測MySql
- MySQL壓測工具mysqlslap的介紹與使用MySql
- Mysql效能壓測、Binlog恢復資料MySql
- mysql單例項壓力測試在青雲MySql單例
- 用mysqlslap對MySQL進行壓力測試MySql
- MySQL 效能壓測工具,從入門到自定義測試項MySql
- MySQL 5.7和8.0 MHA架構下sysbench壓測MySql架構
- mysql壓力測試在青雲PCIE盤sysbench版本MySql
- mysql資料庫xtrabackup壓縮備份測試MySql資料庫
- MySQL 效能壓測工具-sysbench,從入門到自定義測試項MySql
- centos7中mysql自帶壓測工具mysqlslap使用CentOSMySql
- MySQL DB Server 上面安裝 sysbench 作壓力測試MySqlServer
- MySQL壓力測試中定製sysbench的Lua模板MySql
- locust壓測
- 壓測工具之Sysbench(1_系統壓測)
- mysql叢集壓力測試在京東雲盤:sysbench版本MySql
- mysql壓力測試在京東雲ssd雲盤sysbench版本MySql
- Taurus.MVC 效能壓力測試(ap 壓測 和 linux 下wrk 壓測):.NET 版本MVCLinux
- apache ab壓力測試工具-批次壓測指令碼Apache指令碼
- 全鏈路壓測演進之迭代式壓測
- 壓測工具 wrk
- mysqlslap 效能壓測MySql
- kafka壓測工具Kafka
- Oracle的壓測Oracle