Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Alexander Dejanovski
Shalom, you may have a high trace probability which could explain what you're observing : https://docs.datastax.com/en/cassandra/2.0/cassandra/tools/toolsSetTraceProbability.html On Thu, Nov 10, 2016 at 3:37 PM Chris Lohfink wrote: > count(*) actually pages through all

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Alexander Dejanovski
Could you check the write count on a per table basis in order to check which specific table is actually receiving writes ? Check the OneMinuteRate metric in org.apache.cassandra.metrics:type=ColumnFamily,keyspace=*keyspace1*,scope= *standard1*,name=WriteLatency (Make sure you replace keyspace and

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Chris Lohfink
count(*) actually pages through all the data. So a select count(*) without a limit would be expected to cause a lot of load on the system. The hit is more than just IO load and CPU, it also creates a lot of garbage that can cause pauses slowing down the entire JVM. Some details here:

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Shalom Sagges
Hi Alexander, I'm referring to Writes Count generated from JMX: [image: Inline image 1] The higher curve shows the total write count per second for all nodes in the cluster and the lower curve is the average write count per second per node. The drop in the end is the result of shutting down one

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Alexander Dejanovski
Hi Shalom, Cassandra writes (mutations) are INSERTs, UPDATEs or DELETEs, it actually has nothing to do with flushes. A flush is the operation of moving data from memory (memtable) to disk (SSTable). The Cassandra write path and read path are two different things and, as far as I know, I see no

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Shalom Sagges
Yes, I know it's obsolete, but unfortunately this takes time. We're in the process of upgrading to 2.2.8 and 3.0.9 in our clusters. Thanks! Shalom Sagges DBA T: +972-74-700-4035 We

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Vladimir Yudovin
As I said I'm not sure about it, but it will be interesting to check memory heap state with any JMX tool, e.g. https://github.com/patric-r/jvmtop By a way, why Cassandra 2.0.14? It's quit old and unsupported version. Even in 2.0 branch there is 2.0.17 available. Best regards, Vladimir

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Shalom Sagges
Thanks for the quick reply Vladimir. Is it really possible that ~12,500 writes per second (per node in a 12 nodes DC) are caused by memory flushes? Shalom Sagges DBA T: +972-74-700-4035

Re: Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Vladimir Yudovin
Hi Shalom, so not sure, but probably excessive memory consumption by this SELECT causes C* to flush tables to free memory. Best regards, Vladimir Yudovin, Winguzone - Hosted Cloud Cassandra Launch your cluster in minutes. On Thu, 10 Nov 2016 03:36:59 -0500Shalom Sagges

Can a Select Count(*) Affect Writes in Cassandra?

2016-11-10 Thread Shalom Sagges
Hi There! I'm using C* 2.0.14. I experienced a scenario where a "select count(*)" that ran every minute on a table with practically no results limit (yes, this should definitely be avoided), caused a huge increase in Cassandra writes to around 150 thousand writes per second for that particular