最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Sysbench多線程性能測試工具

 更新時間:2012年11月29日 08:51:42   作者:  
sysbench是一個多線程性能測試工具,可以進行CPU/內(nèi)存/IO/數(shù)據(jù)庫等性能測試,不過我絕大多數(shù)的時候都是用它來對數(shù)據(jù)庫(MySQL)進行oltp測試
最近用sysbench進行了較多的性能測試,也總結(jié)一下它的特點和用法和需要注意的事項。sysbench是一個多線程性能測試工具,可以進行CPU/內(nèi)存/IO/數(shù)據(jù)庫等性能測試。不過我絕大多數(shù)的時候都是用它來對數(shù)據(jù)庫(MySQL)進行oltp測試。它能測哪些東西,怎么測讓我從它的命令幫助來回答。
~/zbs$ sysbench --help
Missing required command argument.
Usage:
sysbench [general-options]... --test=<test-name> [test-options]... command
上面就大概的用法,--test=指定我們需要測什么類型,那么--test有哪幾種類型呢?fileio/cpu/memory/threads/mutex,不好意思前面這幾個我都沒測過,我主要是用它來測數(shù)據(jù)庫的性能,但為什么沒有數(shù)據(jù)庫這個選項呢,這是我是用了最新的版本0.5,它與0.4的版本最大區(qū)別在于支持多表測試,執(zhí)行實時打印統(tǒng)計信息,支持自定義lua腳本來設置測試行為。
Compiled-in tests:
fileio - File I/O test
cpu - CPU performance test
memory - Memory functions speed test
threads - Threads subsystem performance test
mutex - Mutex performance test
如果你用sysbench0.4大概會看到如下,請注意oltp這個選項就是測數(shù)據(jù)庫用的。
Compiled-in tests:
fileio - File I/O test
cpu - CPU performance test
memory - Memory functions speed test
threads - Threads subsystem performance test
mutex - Mutex performance test
oltp - OLTP test
看完了測試模式之后,那么它有一些什么主要的其他控制參數(shù)呢?首先說這個每個測試模式自己特有的參數(shù)怎么擦看 sysbench --test=<test-mode> help,比如我這里(請注意,由于sysbench0.5的--test選項對數(shù)據(jù)庫的測試不再使用oltp這個選項而是通過指定lua腳本,因此利用前面這個命令查看不到下面的結(jié)果,所以如果要查看還是通過0.4的吧,如果誰找到了方式在0.5版本里查看oltp的參數(shù)也請告訴一下。另外雖然0.5與0.4版本不同但是參數(shù)還是基本上保持兼容的):
~$ sysbench --test=oltp help
sysbench 0.4.12: multi-threaded system evaluation benchmark
oltp options:
--oltp-test-mode=STRING test type to use {simple,complex,nontrx,sp} [complex]
--oltp-reconnect-mode=STRING reconnect mode {session,transaction,query,random} [session]
--oltp-sp-name=STRING name of store procedure to call in SP test mode []
--oltp-read-only=[on|off] generate only 'read' queries (do not modify database) [off]
--oltp-skip-trx=[on|off] skip BEGIN/COMMIT statements [off]
--oltp-range-size=N range size for range queries [100]
--oltp-point-selects=N number of point selects [10]
--oltp-simple-ranges=N number of simple ranges [1]
--oltp-sum-ranges=N number of sum ranges [1]
--oltp-order-ranges=N number of ordered ranges [1]
--oltp-distinct-ranges=N number of distinct ranges [1]
--oltp-index-updates=N number of index update [1]
--oltp-non-index-updates=N number of non-index updates [1]
--oltp-nontrx-mode=STRING mode for non-transactional test {select, update_key, update_nokey, insert, delete} [select]
--oltp-auto-inc=[on|off] whether AUTO_INCREMENT (or equivalent) should be used on id column [on]
--oltp-connect-delay=N time in microseconds to sleep after connection to database [10000]
--oltp-user-delay-min=N minimum time in microseconds to sleep after each request [0]
--oltp-user-delay-max=N maximum time in microseconds to sleep after each request [0]
--oltp-table-name=STRING name of test table [sbtest]
--oltp-table-size=N number of records in test table [10000]
--oltp-dist-type=STRING random numbers distribution {uniform,gaussian,special} [special]
--oltp-dist-iter=N number of iterations used for numbers generation [12]
--oltp-dist-pct=N percentage of values to be treated as 'special' (for special distribution) [1]
--oltp-dist-res=N percentage of 'special' values to use (for special distribution) [75]
General database options:
--db-driver=STRING specifies database driver to use ('help' to get list of available drivers)
--db-ps-mode=STRING prepared statements usage mode {auto, disable} [auto]
Compiled-in database drivers:
mysql - MySQL driver
mysql options:
--mysql-host=[LIST,...] MySQL server host [localhost]
--mysql-port=N MySQL server port [3306]
--mysql-socket=STRING MySQL socket
--mysql-user=STRING MySQL user [sbtest]
--mysql-password=STRING MySQL password []
--mysql-db=STRING MySQL database name [sbtest]
--mysql-table-engine=STRING storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb]
--mysql-engine-trx=STRING whether storage engine used is transactional or not {yes,no,auto} [auto]
--mysql-ssl=[on|off] use SSL connections, if available in the client library [off]
--myisam-max-rows=N max-rows parameter for MyISAM tables [1000000]
--mysql-create-options=STRING additional options passed to CREATE TABLE []
上面有這么多參數(shù),相信都能基本看懂吧,我等下舉例的時候會講到里面的參數(shù)代表什么含義。然后知道怎么查看具體某個測試模式的用法之后再來看general-options,通用參數(shù),下面看看0.5的參數(shù)(相對0.4的增加了不少,有些參數(shù)的名稱也變了,怎么辨別---對某個參數(shù)解釋一模一樣):
General options:
--num-threads=N number of threads to use [1]
--max-requests=N limit for total number of requests [10000]
--max-time=N limit for total execution time in seconds [0]
--forced-shutdown=STRING amount of time to wait after --max-time before forcing shutdown [off]
--thread-stack-size=SIZE size of stack per thread [64K]
--tx-rate=N target transaction rate (tps) [0]
--report-interval=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
--report-checkpoints=[LIST,...]dump full statistics and reset all counters at specified points in time. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test when report checkpoint(s) must be performed. Report checkpoints are off by default. []
--test=STRING test to run
--debug=[on|off] print more debugging info [off]
--validate=[on|off] perform validation checks where possible [off]
--help=[on|off] print help and exit
--version=[on|off] print version and exit [off]
--rand-init=[on|off] initialize random number generator [off]
--rand-type=STRING random numbers distribution {uniform,gaussian,special,pareto} [special]
--rand-spec-iter=N number of iterations used for numbers generation [12]
--rand-spec-pct=N percentage of values to be treated as 'special' (for special distribution) [1]
--rand-spec-res=N percentage of 'special' values to use (for special distribution) [75]
--rand-seed=N seed for random number generator, ignored when 0 [0]
--rand-pareto-h=N parameter h for pareto distibution [0.2]

相關(guān)文章

  • MySQL參數(shù)調(diào)優(yōu)實例探究講解

    MySQL參數(shù)調(diào)優(yōu)實例探究講解

    本文主要講解MySQL參數(shù)調(diào)優(yōu),包括SQL調(diào)優(yōu)的參數(shù)解析,如何在生產(chǎn)環(huán)境調(diào)優(yōu),文中根據(jù)不同的數(shù)據(jù)庫參數(shù)給出調(diào)優(yōu)建議與應用場景
    2022-11-11
  • MySQL 主從復制數(shù)據(jù)不一致的解決方法

    MySQL 主從復制數(shù)據(jù)不一致的解決方法

    本文主要介紹了MySQL 主從復制數(shù)據(jù)不一致的解決方法,文中根據(jù)實例編碼詳細介紹的十分詳盡,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • mysql配置文件的使用教程

    mysql配置文件的使用教程

    這篇文章主要介紹了mysql配置文件的使用教程,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友參考下吧
    2023-10-10
  • mysql數(shù)據(jù)遷移之data目錄復制方法

    mysql數(shù)據(jù)遷移之data目錄復制方法

    這篇文章主要給大家介紹了關(guān)于mysql數(shù)據(jù)遷移之data目錄復制方法的相關(guān)資料,MySQL的data文件是存儲數(shù)據(jù)庫的核心文件,它包含了所有的表、索引、視圖和其它相關(guān)的數(shù)據(jù),通過復制這些文件,我們可以將一個MySQL數(shù)據(jù)庫遷移到另一個地方,需要的朋友可以參考下
    2023-08-08
  • mysql limit分頁優(yōu)化方法分享

    mysql limit分頁優(yōu)化方法分享

    MySQL的優(yōu)化是非常重要的。其他最常用也最需要優(yōu)化的就是limit。MySQL的limit給分頁帶來了極大的方便,但數(shù)據(jù)量一大的時候,limit的性能就急劇下降。
    2011-04-04
  • 使用mysql語句對分組結(jié)果進行再次篩選方式

    使用mysql語句對分組結(jié)果進行再次篩選方式

    這篇文章主要介紹了使用mysql語句對分組結(jié)果進行再次篩選方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-08-08
  • MySQL 數(shù)據(jù)庫對服務器端光標的限制

    MySQL 數(shù)據(jù)庫對服務器端光標的限制

    從MySQL 5.0.2開始,通過mysql_stmt_attr_set() C API函數(shù)實現(xiàn)了服務器端光標。服務器端光標允許在服務器端生成結(jié)果集,但不會將其傳輸?shù)娇蛻舳?,除非客戶端請求這些行。
    2009-03-03
  • mysql中格式化日期詳解

    mysql中格式化日期詳解

    最近因為工作需要,要使用mysql查詢記錄可如果有時間戳字段時,查看結(jié)果不方便,不能即時看到時間戳代表的含義,所以這篇文章就提供mysql格式換時間函數(shù),可以方便的看到格式化后的時間。有需要的朋友們可以參考借鑒,下面來一起看看吧。
    2016-11-11
  • MySQL 索引和數(shù)據(jù)表該如何維護

    MySQL 索引和數(shù)據(jù)表該如何維護

    使用合適的數(shù)據(jù)類型完成數(shù)據(jù)表創(chuàng)建和建立索引后,工作并沒有完結(jié)——你需要去維護數(shù)據(jù)表和索引以保證它們運行良好。數(shù)據(jù)表維護的主要目的是查找和修復沖突,維護精確的索引統(tǒng)計和減少碎片。
    2021-05-05
  • MySQL數(shù)據(jù)庫21條最佳性能優(yōu)化經(jīng)驗

    MySQL數(shù)據(jù)庫21條最佳性能優(yōu)化經(jīng)驗

    數(shù)據(jù)庫的操作越來越成為整個應用的性能瓶頸了,這點對于Web應用尤其明顯。這篇文章主要介紹了MySQL數(shù)據(jù)庫21條最佳性能優(yōu)化經(jīng)驗的相關(guān)資料,需要的朋友可以參考下
    2016-10-10

最新評論

徐闻县| 澄城县| 乌恰县| 阳曲县| 和田县| 浑源县| 天气| 静安区| 福建省| 元朗区| 棋牌| 万年县| 东阿县| 大余县| 汤原县| 稷山县| 云阳县| 木里| 洛南县| 尼勒克县| 嵩明县| 常德市| 潞城市| 格尔木市| 寻乌县| 榆中县| 依兰县| 岗巴县| 山东省| 临武县| 奈曼旗| 望江县| 蓬安县| 女性| 青阳县| 宣汉县| 仁寿县| 新郑市| 英超| 怀仁县| 安新县|