I am using the Cassandra JMeter Plugin https://github.com/slowenthal/jmeter-cassandra#cassandra-jmeter-plugin-for-cassandra which i have integrated in apache-JMeter2.9
I have a Cassandra Cluster containing 2 Datacenter and 2 nodes on each datacenter.
JMeter:
Cassandra Connection:
contact points : 192.168.1.50,192.168.1.51,192.168.1.52
keyspace : test_db
Cassandra Sampler
CQL Query : select * from test_db.feed_yogesh limit 1000;
Consistency Level : QUORUM
Testing Scenario
1.Fetch 1000 records for 1 user
User/Thread : 1
Ramp-Up-Period : 0
Generate Summary Results = 1 in 2.2s = 0.5/s Avg: 2180 Min: 2180 Max: 2180 Err: 0 (0.00%)
2.Fetch 1000 records for 1000 user
I want to test for Multiple Users Concurrently hence I added Ramp-Up-period as 0 which as per JMeter will immediately start all the users.
User/Thread : 1000
RampUp Period : 0
Summary Results = 1000 in 18s = 56.1/s Avg: 6857 Min: 5000 Max: 17044 Err: 987 (98.70%)
It Does start all my user but only 4-5 users return success rest all give me error such as
All host(s) tried for query failed (tried: /192.168.1.50:9042 (com.datastax.driver.core.BusyConnectionException))
But when i Test the same 1000 User giving a Ramp-up-period of 300 it returns all success.
User/Thread : 1000
RampUp Period : 300
Generate Summary Results = 1000 in 301s = 3.3/s Avg: 519 Min: 255 Max: 1811 Err: 0 (0.00%)
Cassndra Sampler.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.4" jmeter="2.9 r1437961">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1000</stringProp>
<stringProp name="ThreadGroup.ramp_time">0</stringProp>
<longProp name="ThreadGroup.start_time">1420788860000</longProp>
<longProp name="ThreadGroup.end_time">1420788860000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<org.apache.cassandra.jmeter.config.CassandraConnection guiclass="TestBeanGUI" testclass="org.apache.cassandra.jmeter.config.CassandraConnection" testname="Cassandra Connection" enabled="true">
<stringProp name="contactPoints">192.168.1.50,192.168.1.51,192.168.1.52</stringProp>
<stringProp name="keyspace">test_db</stringProp>
<stringProp name="loadBalancer">Default</stringProp>
<stringProp name="localDataCenter"></stringProp>
<stringProp name="password"></stringProp>
<stringProp name="sessionName">mydatabase</stringProp>
<stringProp name="username"></stringProp>
</org.apache.cassandra.jmeter.config.CassandraConnection>
<hashTree/>
<org.apache.cassandra.jmeter.sampler.CassandraSampler guiclass="TestBeanGUI" testclass="org.apache.cassandra.jmeter.sampler.CassandraSampler" testname="Cassandra Sampler" enabled="true">
<stringProp name="batchSize"></stringProp>
<stringProp name="consistencyLevel">QUORUM</stringProp>
<stringProp name="query">select * from test_db.feed_yogesh limit 1000;</stringProp>
<stringProp name="queryArguments">Running</stringProp>
<stringProp name="queryType">Simple Statement</stringProp>
<stringProp name="resultVariable"></stringProp>
<stringProp name="sessionName">mydatabase</stringProp>
<stringProp name="variableNames">VARCHAR</stringProp>
</org.apache.cassandra.jmeter.sampler.CassandraSampler>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
I am confused, does it mean that multiple user's cannnot read data concurrently do we compulsorily need to add the Ramp-Up-Period value.