Sysbench with support of multi-tables workload
2014-07-08 18:34
218 查看
本文转载自:http://www.mysqlperformanceblog.com/2011/04/29/sysbench-with-support-of-multi-tables-workload/
We just pushed to sysbench support for workload against multiple tables ( traditionally it used only single table).
It is available from launchpad source tree
This is set of LUA scripts for sysbench 0.5 ( it supports scripting), and it works following way:
- you should use
i.e. prepare
Shell
run:Shell
there are couple other scripts, like
to support different OLTP modes.
Most interesting: all scripts support
Additional parameter
table sbtest will be created with
Now, as we have N tables, we may want to prepare them in parallel, to save some time for preparation
I implemented that in script
so instead of
Shell
you may useShell
( please note that oltp-tables-count should be multiplier of num-threads)
注:近期参加MySQL运维学习,老师推荐该文章作为学习和技术提高的扩展阅读,先记录到自己的博客中,随后慢慢消化、学习、提高。本文与MySQL数据库 “压力测试”主题有关。
We just pushed to sysbench support for workload against multiple tables ( traditionally it used only single table).
It is available from launchpad source tree
lp:sysbench.
This is set of LUA scripts for sysbench 0.5 ( it supports scripting), and it works following way:
- you should use
--test=tests/db/oltp.luato run OLTP test
i.e. prepare
Shell
1 | ./sysbench --test=tests/db/oltp.lua --oltp-tables-count=25 prepare |
1 | ./sysbench--test=tests/db/oltp.lua--oltp-tables-count=25--num-threads=5run |
oltp.luashould understand most options that available for regular sysbench –test=oltp
there are couple other scripts, like
oltp_simple select insert delete update_index update_non_index
to support different OLTP modes.
Most interesting: all scripts support
--oltp-tables-count=N( default 1), in this case N sbtest tables will be used.
Additional parameter
--oltp-secondaryis taken from Mark Callaghan’s sysbench tree , in this case
table sbtest will be created with
KEY xid (ID), instead of
PRIMARY KEY (ID)
Now, as we have N tables, we may want to prepare them in parallel, to save some time for preparation
I implemented that in script
parallel_prepare.lua
so instead of
Shell
1 | ./sysbench --test=tests/db/oltp.lua --oltp-tables-count=25 prepare |
1 | ./sysbench--test=tests/db/parallel_prepare.lua--oltp-tables-count=64--num-threads=8run |
注:近期参加MySQL运维学习,老师推荐该文章作为学习和技术提高的扩展阅读,先记录到自己的博客中,随后慢慢消化、学习、提高。本文与MySQL数据库 “压力测试”主题有关。
相关文章推荐
- [Drupal] Simple tutorial of setting multi subdomain with Domain Access module and Views module
- Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0
- Yelp API(v2) with Mode.js support--handling of authentication
- grep: this version of PCRE is not compiled with PCRE_UTF8 support
- Asymptotic Behaviors of Support Vector Machines with Gaussian Kernel的几个结论
- 报错java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/multi
- Asymptotic Behaviors of Support Vector Machines with Gaussian Kernel的几个结论
- IIS configuration with support of multiple domain urls
- Gradient Panel With Shadow Support And Lots Of Other Stuff
- do export method of oracle all database tables with dmp files.
- "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
- HOWTO: Compiling mplayer with multi-core decoding support
- 9. 2. 18. 自然顺序颠倒顺序Sort items of an ArrayList with Collections.reverseOrder()
- LeetCode 30 Substring with Concatenation of All Words
- # Eclipse 项目重新命名的时候会出现“because the project description file(.project) is out of sync with the file s
- IOS NSString 截取,objectAtIndex,rangeOfString,stringWithContentsOfFile,NSEnu ...
- 2017 Multi-University Training Contest - Team 5:Rikka with Number
- Resource is out of sync with the file system......
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- 谢林隔离模型Matlab仿真实现 The Implementation of Schelling Model of Segregation With Matlab