cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom van der Woerdt (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9728) Very bad read performance after 2.1.5->2.1.7 upgrade
Date Mon, 06 Jul 2015 16:43:04 GMT


Tom van der Woerdt commented on CASSANDRA-9728:

At the time of creating this ticket there were only two compaction tasks running (the limit
is at 8): one for the index, one for the main table. However, it did mention there were 6000-ish
pending compaction tasks, which seemed strange as it wasn't doing anything with them.

Right now the queue size is down to ~4000 and it lists more concurrent compactions (still
only one for the index), there are now 200 fewer index sstables, but querying is still really

Interesting to note is that the index compaction seems to be doing the entire index in one
go (~5GB) and by my estimation will spend a week doing that.

I am not sure whether there are two separate issues going on in this ticket, or just a single
one. One is that queries on indexes became 10x slower somewhere between 2.1.5 and 2.1.7, the
other is that the index compactions seem to be taking forever.

> Very bad read performance after 2.1.5->2.1.7 upgrade
> ----------------------------------------------------
>                 Key: CASSANDRA-9728
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Tom van der Woerdt
> After upgrading from 2.1.5 to 2.1.7, read performance has significantly slowed down for
queries that use indexes. A query that used to take under a second to execute now takes 8
seconds or longer.
> The table I am noticing this on is a fairly large table (possibly pushing Cassandra's
limits a bit, with around 1TB per node) with a single index.
> {noformat}
> CREATE TABLE the_table (
>     id bigint PRIMARY KEY,
>     id_2 bigint,
>     field_1 ascii,
>     field_2 blob, -- "Wide" column in that it's on average 15KB
>     field_3 ascii,
>     field_4 ascii,
>     field_5 text,
>     field_6 ascii
> )  WITH compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
>     AND compression = {'chunk_length_kb': '1024', 'sstable_compression': ''};
> CREATE INDEX the_table_id_2_idx ON the_table (id_2);
> {noformat}
> Compaction status, according to nodetool's cfstats :
> index:                SSTables in each level: [1714/4, 7, 0, 0, 0, 0, 0, 0, 0]
> main:                SSTables in each level: [79/4, 1, 105/100, 1049/1000, 172, 0, 0,
0, 0]
> It's had a few days to catch up, but the indexes don't seem to be catching up well. Do
note that the performance issue I'm reporting was also experienced when the main table had
not yet caught up. Queries fetching by the primary key have been equally fast before and after
the compaction catch-up.
> One thing I have noticed is that cfstats is reporting a *LOT* of reads on the index,
while there's no way I'm firing that many queries:
>                 Local read count: 6670463
>                 Local read latency: 4.134 ms
> Based on the application's logs, I would say there shouldn't have been more than 5000
queries against the index since Cassandra was started on this node.
> What may also be relevant is that during the upgrade to 2.1.7, nodes that were still
on 2.1.5 were responding quickly (tested in cqlsh), while nodes that had already upgraded
were slow. Even when only one node was left to be upgraded, that node was fast with responding.
> For completeness, the query that's slow is {{select * from the_table where id_2=?}}

This message was sent by Atlassian JIRA

View raw message