In this post, I will go through how you can quickly stress test your Cassandra performance. Before you go for tuning your Cassandra you might want to see how well its performing so far or where its slowing down. You can definitely write a benchmark tool which inserts some random data and reads it after that and measure performance based on time. When I first asked to stress test Cassandra, I was writing pretty much same kind of tool. But in the middle I found an existing code which stress test Cassandra and which is good enough to start with. It's basically a pom based Java project which uses Hector (my project also use Hector - A Java Client for Cassandra).
You can directly go here to get more information about how its written and how to run it:
But if you just want a quick way to run it, you can follow the following steps:
Step#1: Install It
Step#1: Install It
Step#2: Run It:
What the above command doing is:- Inserting (-o insert) 1000000 records (-n) into column family StressStandard which has 10 columns (-c)
- Using 5 threads (-t) and each batch size is 1000(-b)
- So each thread is getting 1000000 / 5 = 200000 inserts, as the batch size is 1000, so each thread is actually inserting 200000 / 1000 = 200 times.
I played with this stress tool a lot and later I converted it based on my needs(to work with my Cassandra keyspace andcolumn families) and ran it for my stress test. I highly recommend you to use this stress tool, it will serve most of the basic cases.
Note: For privacy purpose, I had to modify several lines on this post from my original post. So if you find something is not working or facing any issues, please do not hesitate to contact me :)
ERROR 23:26:13,301 Could not start connection pool for host 192.168.1.101(192.168.1.101):9160
ReplyDeleteException in thread "main" me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client.
at me.prettyprint.cassandra.connection.HConnectionManager.getClientFromLBPolicy(HConnectionManager.java:354)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:234)
at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspace(AbstractCluster.java:199)
at com.riptano.cassandra.stress.Stress.initializeCommandRunner(Stress.java:187)
at com.riptano.cassandra.stress.Stress.main(Stress.java:49)
The learning approach is usually organized through blog studies. This gives you the opportunity to have a more practical approach and to be in contact with many different opinions.
ReplyDeleteAuthorized iphone service center in Chennai | iphone service center in chennai | Mobile service center in chennai | Authorized iphone service center in Chennai | iphone service center in chennai | Authorized iphone service center in Chennai | iphone battery replacement
Great Article
ReplyDeleteJava Project Ideas for Final Year Students
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
Java Training in Chennai
Best Online Casinos 2021 | Casino Sites - OnCasinos
ReplyDeleteThe real money online casinos in the US. Play at some of the world's best online casino sites, 3 3 토토 including: Ignition, Microgaming, Play'n GO, 🎲 The Best 플러스카지노 Online Casino gta 카지노 in USA: BetMGM🎁 #1 헐리우드 노출 New Jersey Online Casino: BetOnline📱 Online Casino Canada: Barstool Casino🎰 Top Mobile Casino in Canada: CasinoMetallica🎲 #1 New Mexico Online Casino: 메리트카지노주소 SuperSlots Casino