sysbench 参数

 

1)插入指定条数的数据

--events=N limit for total number of events [0]
--time=N limit for total execution time in seconds [10]

压测需要插入200G开始,递增200G的数据,为节省时间,没有cleanup,而是在下一轮开始前使用insert 补齐,开始时只设置了 --events = 500000000, 发现每次插入都是10s即停止,数据量也只有几万。 原因是--time, --events sysbench会取其中先达到的量,在10S 内events未达到,time已满足就停止插入。所以想要以数据量为标准,就要把 time设置为一个保证events能完成的值

2) 热点数据

--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-spec-pct=10% --rand-spec-res=100% 全部查询落在10%的行上

todo:

posted @ 2017-08-21 15:38  web k  阅读(320)  评论(0编辑  收藏  举报