You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Carlos Alonso <in...@mrcalonso.com> on 2015/06/18 12:33:28 UTC

Log Slow Queries

Hi guys.

I'm facing slow read requests from time to time, I've spotted the
keyspace/cf where this is happening but I can't see anything obvious
(single partition slice query, no tombstones, ...) anything else where to
look at?

I'd like to have the slow queries logged to either log or saved to a
particular column family to analyse them later. I've googled about this and
the only 'easy' solution available out there seems to be DataStax
Enterprise.

What are you guys using?

Thanks,
Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>

Re: Log Slow Queries

Posted by Carlos Alonso <in...@mrcalonso.com>.
Thanks Dominique for your fast and useful reply.

I think I'll try No 2, catch slow queries in the driver, but unfortunately
we don't use Java but Ruby and it doesn't seem to have that feature.

Anyone using Ruby has worked out a solution? I'm thinking of adding the
feature to the driver otherwise (hopefully is not very hard).

Regards

Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>

On 18 June 2015 at 12:21, DE VITO Dominique <
dominique.devito@thalesgroup.com> wrote:

> Hi Carlos,
>
>
>
> Different possibilities (to log slow queries).
>
>
>
> 1)      A probabilistic way to catch slow queries (probabilistic, but
> with detailed info) => look for “nodetool settraceprobability” like in
> http://www.datastax.com/dev/blog/advanced-request-tracing-in-cassandra-1-2
>
>
>
> 2)      Catch slow queries in the driver (it’s a recent feature,
> available for newest drivers only) => see
> http://datastax.github.io/java-driver/2.0.10/features/logging/#logging-query-latencies
>
>
>
>
> 3)      Catch slow queries on server-side (but only with C* 2.1) => see
> slides 15-17 "Lesser Known Features of Cassandra 2.1"
> http://fr.slideshare.net/planetcassandra/cassandra-summit-2014-lesser-known-features-of-cassandra-21
>
>
>
> On our side, we are more keen to use (2) – which has the best ROI (IMHO).
>
>
>
> Regards,
>
> Dominique
>
>
>
> [@@ THALES GROUP INTERNAL @@]
>
>
>
> *De :* Carlos Alonso [mailto:info@mrcalonso.com]
> *Envoyé :* jeudi 18 juin 2015 12:33
> *À :* user@cassandra.apache.org
> *Objet :* Log Slow Queries
>
>
>
> Hi guys.
>
>
>
> I'm facing slow read requests from time to time, I've spotted the
> keyspace/cf where this is happening but I can't see anything obvious
> (single partition slice query, no tombstones, ...) anything else where to
> look at?
>
>
>
> I'd like to have the slow queries logged to either log or saved to a
> particular column family to analyse them later. I've googled about this and
> the only 'easy' solution available out there seems to be DataStax
> Enterprise.
>
>
>
> What are you guys using?
>
>
>
> Thanks,
>
> Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>
>

RE: Log Slow Queries

Posted by DE VITO Dominique <do...@thalesgroup.com>.
Hi Carlos,

Different possibilities (to log slow queries).


1)      A probabilistic way to catch slow queries (probabilistic, but with detailed info) => look for “nodetool settraceprobability” like in http://www.datastax.com/dev/blog/advanced-request-tracing-in-cassandra-1-2


2)      Catch slow queries in the driver (it’s a recent feature, available for newest drivers only) => see http://datastax.github.io/java-driver/2.0.10/features/logging/#logging-query-latencies


3)      Catch slow queries on server-side (but only with C* 2.1) => see slides 15-17 "Lesser Known Features of Cassandra 2.1" http://fr.slideshare.net/planetcassandra/cassandra-summit-2014-lesser-known-features-of-cassandra-21


On our side, we are more keen to use (2) – which has the best ROI (IMHO).


Regards,
Dominique

[@@ THALES GROUP INTERNAL @@]

De : Carlos Alonso [mailto:info@mrcalonso.com]
Envoyé : jeudi 18 juin 2015 12:33
À : user@cassandra.apache.org
Objet : Log Slow Queries

Hi guys.

I'm facing slow read requests from time to time, I've spotted the keyspace/cf where this is happening but I can't see anything obvious (single partition slice query, no tombstones, ...) anything else where to look at?

I'd like to have the slow queries logged to either log or saved to a particular column family to analyse them later. I've googled about this and the only 'easy' solution available out there seems to be DataStax Enterprise.

What are you guys using?

Thanks,
Carlos Alonso | Software Engineer | @calonso<https://twitter.com/calonso>