我希望了解更多关于cassandra压力测试工具的内容,例如如何进行压力测试以及如何研究结果。当从cmd执行cassandra-stress时,键空间在哪里创建,在哪里查看?
我希望了解更多关于cassandra压力测试工具的内容,例如如何进行压力测试以及如何研究结果。当从cmd执行cassandra-stress时,键空间在哪里创建,在哪里查看?
Cassandra stress是Cassandra提供的一个压力测试工具。
请查看http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsCStress_t.html了解更多信息。
由于原问题标记了cassandra-2.0,因此我想添加一个链接到新版本的压力测试工具文档:
http://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsCStress_t.html
引入Casssandra 2.1的改进压力测试工具可用于Cassandra 2.0集群。它使用Yaml配置,并添加了通过您指定的查询压力测试实际模式的功能。这里有一个很好的介绍: http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema
Go to INSTALLATION/cassandra/tools/bin and pass the below command
./cassandra-stress write n=1000000 -rate threads=40 -node xx.yy.zzz.ww
xx.yy.zzz.ww is your host ip This will write 1million inserts to the keyspace keyspace1, table standard1 by default. Once the test gets complete, the results can be interpreted based on http://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsCStressOutput_c.html Interpreting Stress results
The data can be viewed from cqlsh
cqlsh> select *from keyspace1.standard1 limit 2;
key | C0 | C1 | C2 | C3 | C4
------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------
0x3335503436334b333630 | 0x89a7f8588f1f3866788af519bedb8ff284e72843faa37694fcca88b8e24f3d6861d4 | 0xa9b176a554a1d1c1acb860d9b49e05b4f21ab8b7933357e49e48d353147d7ccf7ba7 | 0xd310294bbc90b9a1a99642d85625744a9df753f9688f18074ecf3ae17d806491ff02 | 0x022c59df825545f71d1cd301919821544eb2125b23f2f31c3addd1aa97c163a3aa44 | 0xf8dabfd49bee232435eabd034263706b6d50417a005f25f4320a88bad0adff847aec
0x4f36393733364b393930 | 0x62cebaf3cf2491d39bae52e3589943737f3c44b02de67dc0f213623412d4167e3b0e | 0x0d01092e67706b72e44ed4774c6a77b63fcda402adf6d8e63048e65f462593e62098 | 0x27ecd293bed41cc177547fac81011e72f4398a22fe74825ec2b2b822e7787e09be69 | 0x3ded968484b698f60b1732b8ab4802520bc653d94084ed8a6434396c62c7a52bec7a | 0xfb1392dbcd6d5d21ed699a61f4a40914d7560cc929fea3168353fee189416bb97045
For advanced load testing with cassandra-stress, please go through this blog. ImprovedCassandraStressTool
cassandra-stress help
命令。 - AturSams