最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

cqlsh - How to use Cassandra-stress tool with an EXACT number of opssec? - Stack Overflow

programmeradmin0浏览0评论

Let's say I need 10000 ops/sec with a read:write ratio of 7:3

I'm trying with this:

mixed duration=6h cl=local_quorum keysize=100 'ratio(read=7,write=3)' -rate fixed="10000/s" -pop seq=1..10000 -mode user="user" password="pass" -node 1.1.1.1

Error:

Failed to parse parameter fixed.

Caused by:
    Invalid value =10000/s. Boolean flag cannot have any value.
Error: Failed to parse CLI arguments.

It doesn't show errors, if I replace fixed="10000/s" with threads=100. But I need a way to control the exact number of operations/second. Is there a way to achieve this? even with threads?

Let's say I need 10000 ops/sec with a read:write ratio of 7:3

I'm trying with this:

mixed duration=6h cl=local_quorum keysize=100 'ratio(read=7,write=3)' -rate fixed="10000/s" -pop seq=1..10000 -mode user="user" password="pass" -node 1.1.1.1

Error:

Failed to parse parameter fixed.

Caused by:
    Invalid value =10000/s. Boolean flag cannot have any value.
Error: Failed to parse CLI arguments.

It doesn't show errors, if I replace fixed="10000/s" with threads=100. But I need a way to control the exact number of operations/second. Is there a way to achieve this? even with threads?

Share Improve this question asked Feb 21 at 17:53 Attila TothAttila Toth 3071 gold badge4 silver badges13 bronze badges 2
  • 1 Hi there! I don't know if that is even an option there. You could try out this OSS NoSQLBench (Use 5.21.4-release needs JDK21) with which you could specify rate=10000 and it will trigger 10000 ops/second. I hope that you will give that a try. Discord for help, Usage Patterns supported, Dev Introduction Video, repo – Madhavan Commented Feb 22 at 19:18
  • Thanks for posting on Stack Overflow! A friendly reminder that this site is for getting help with coding, algorithm, or programming language problems so I voted to have your post moved to DBA Stack Exchange. For future reference, you should post DB admin/ops questions on dba.stackexchange/questions/ask?tags=cassandra. Cheers! – Erick Ramirez Commented Feb 26 at 2:08
Add a comment  | 

1 Answer 1

Reset to default 0

In your command, you specified the rate as:

$ cassandra-stress ... -rate fixed="10000/s" ...

Looking at the code for o.a.c.stress/settings/SettingsRate.java, your usage is incorrect.

You'll either need to (a) set the minimum and maximum number of threads, or (b) explicitly set the number of threads in order to specify the operations/sec or throttle:

Usage: -rate threads=? [throttle=?] [fixed=?]
 OR 
Usage: -rate [threads>=?] [threads<=?] [auto]

If you modify your command to include the threads count, you should be able to specify a value for fixed. For example:

$ cassandra-stress ... -rate threads=100 fixed="10000/s" ...

For what it's worth, you didn't specify which version of Cassandra you're running so I linked to version 5.0 of the code. Cheers!

发布评论

评论列表(0)

  1. 暂无评论