如何运行:https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload
推荐操作顺利:https://github.com/brianfrankcooper/YCSB/wiki/Core-Workloads
如何扩展:https://github.com/brianfrankcooper/YCSB/wiki/Implementing-New-Workloads
示例:使用时先建表,然后加载数据,最后执行相关事务
相关参数说明:
fieldcount | the number of fields in a record (default: 10) |
---|---|
fieldlength | the size of each field (default: 100) |
readallfields | should reads read all fields (true) or just one (false) (default: true) |
readproportion | what proportion of operations should be reads (default: 0.95) |
updateproportion | what proportion of operations should be updates (default: 0.05) |
insertproportion | what proportion of operations should be inserts (default: 0) |
scanproportion | what proportion of operations should be scans (default: 0) |
readmodifywriteproportion | what proportion of operations should be read a record, modify it, write it back (default: 0) |
requestdistribution | what distribution should be used to select the records to operate on – uniform, zipfian or latest (default: uniform) |
maxscanlength | for scans, what is the maximum number of records to scan (default: 1000) |
scanlengthdistribution | for scans, what distribution should be used to choose the number of records to scan, for each scan, between 1 and maxscanlength (default: uniform) |
insertorder | should records be inserted in order by key (“ordered”), or in hashed order (“hashed”) (default: hashed) |
operationcount | Number of operations to perform. |
maxexecutiontime | Maximum execution time in seconds. The benchmark runs until either the operation count has exhausted or the maximum specified time has elapsed, whichever is earlier. |
table | The name of the table (default: usertable) |
其他:
-s | for a long running workload, it may be useful to have the Client report status, just to assure you it has not crashed and to give you some idea of its progress. By specifying "-s" on the command line, the Client will report status every 10 seconds to stderr. |
---|---|
-threads | the number of client threads. By default, the YCSB Client uses a single worker thread, but additional threads can be specified. This is often done to increase the amount of load offered against the database. |
-target | the target number of operations per second. By default, the YCSB Client will try to do as many operations as it can. For example, if each operation takes 100 milliseconds on average, the Client will do about 10 operations per second per worker thread. However, you can throttle the target number of operations per second. For example, to generate a latency versus throughput curve, you can try different target throughputs, and measure the resulting latency for each |
相关help: