How to use cassandra Stress tool
Asked Answered
W

4

10

I would like learn more on cassandra stress tool , like how I can do the stress test and study the result. When cassandra-stress is executed from the cmd where is the keyspace made ,How to view them ?

Weep answered 12/3, 2014 at 6:33 Comment(0)
D
5

Cassandra stress is a tool provided with cassandra for stress testing. go through http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsCStress_t.html for more info

Doggo answered 19/3, 2014 at 9:25 Comment(0)
P
4

Since the original question has cassandra-2.0 tagged, I want to add the link to the documentation of the newer version of the stress tool:

http://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsCStress_t.html

The improved stress test tool introduced with Casssandra 2.1 can be used with Cassandra 2.0 clusters. It uses Yaml profiles and adds the ability to stress test your actual schema, with queries that you specify. There is an excellent introduction to it here: http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema

Picasso answered 27/4, 2015 at 9:23 Comment(0)
T
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

Trashy answered 13/1, 2016 at 0:33 Comment(0)
M
-1

If you installed cassandra, you should have the command "cassandra-stress" available on the command line. Do "cassandra-stress -h" for available options.

Multipara answered 11/6, 2014 at 23:4 Comment(3)
after running cassansra stress tool we are not able to query those 1 million data which they insertWeep
Not necessarily; it's located in $CASSANDRA_HOME/tools/bin which won't necessarily be on the path after installing (it was not in my case).Jauch
For me it's cassandra-stress helpMantellone

© 2022 - 2024 — McMap. All rights reserved.