如何使用Cassandra压力测试工具

10

我希望了解更多关于cassandra压力测试工具的内容,例如如何进行压力测试以及如何研究结果。当从cmd执行cassandra-stress时,键空间在哪里创建,在哪里查看?

4个回答

5

4

2
  1. 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
    
  2. For advanced load testing with cassandra-stress, please go through this blog. ImprovedCassandraStressTool


-1
如果您安装了Cassandra,应该可以在命令行上使用“cassandra-stress”命令。请执行“cassandra-stress -h”以查看可用选项。

运行Cassandra压力测试工具后,我们无法查询插入的那100万条数据。 - drusya
不一定;它位于$CASSANDRA_HOME/tools/bin中,在安装后不一定在路径上(在我的情况下并没有)。 - Matt
5
对我来说,需要执行 cassandra-stress help 命令。 - AturSams

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接