sysbench 0.5 安裝及 MySQL 基準測試

來源:互聯網
上載者:User

標籤:sysbench

sysbench 依賴的包: m4  autoconf  automake libtool

yum install  m4  autoconf  automake libtool

安裝:

tar zxvf sysbench-0.5.tar.gz 

cd sysbench-0.5

chmod +x autogen.sh

./autogen.sh

./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib 

make & make install 


構造資料:

sysbench --test=/usr/local/src/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp_secondary=on   --oltp_tables_count=10 --oltp-table-size=2000000 --db-driver=mysql  --mysql-user=root  --mysql-password=‘superdata123‘ --mysql-port=3306  --mysql-host=‘localhost‘ --mysql-db=test  prepare 


測試:

sysbench --test=/usr/local/src/sysbench-0.5/sysbench/tests/db/oltp.lua  --oltp-read-only=off --init-rng=on  --num-threads=100 --max-requests=200000 --oltp-dist-type=uniform --max-time=1800   --mysql-user=superdata --oltp-table-size=2000000 --oltp_tables_count=10 --rand-init=on  --mysql-password=‘xxxx‘  --mysql-port=3306 --mysql-host=‘xxxxx‘ --db-driver=mysql  --mysql-db=test  run


--oltp-read-only=on   只測試讀

--init-rng=on 在測試開始時是否初始化隨機發生器,預設是off

--num-thread  多少個並發連接線程


報錯資訊:

sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory


 export LD_LIBRARY_PATH=/usr/local/mysql/lib 輸出這個變數即可


測試結果分析

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/8E/29/wKiom1i3jGHieS9JAABawHywh1E583.png-wh_500x0-wm_3-wmp_4-s_3490831340.png" title="QQ圖片20170302110706.png" alt="wKiom1i3jGHieS9JAABawHywh1E583.png-wh_50" />

本文出自 “11958098” 部落格,請務必保留此出處http://11968098.blog.51cto.com/11958098/1902561

sysbench 0.5 安裝及 MySQL 基準測試

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.