[
https://issues.apache.org/jira/browse/CASSANDRA-6949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976847#comment-13976847
]
Aleksey Yeschenko commented on CASSANDRA-6949:
----------------------------------------------
bq. Ah, right... but that only works on values that actually make it as far as
the sstables - anything that is overwritten in memory will never be removed by
that code path if I'm reading it right?
Yes and no. If it's been rewritten by another regular cell or a regular
tombstone, then it will be removed upon updating the memtable itself. This will
always be true, and this is why we don't purge deleted cells on memtable flush,
even if covered by range or partition tombstones.
If overwritten by a range tombstone or a partition tombstone though, then yeah,
that code path will not handle it. But that code can be extended trivially
enough to handle range and partition tombstones on compaction to clean up stale
2i entries.
> Performance regression in tombstone heavy workloads
> ---------------------------------------------------
>
> Key: CASSANDRA-6949
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6949
> Project: Cassandra
> Issue Type: Bug
> Reporter: Jeremiah Jordan
> Assignee: Sam Tunnicliffe
> Fix For: 2.0.8
>
> Attachments:
> 0001-Remove-expansion-of-RangeTombstones-to-delete-from-2.patch, 6949.txt
>
>
> CASSANDRA-5614 causes a huge performance regression in tombstone heavy
> workloads. The isDeleted checks here cause a huge CPU overhead:
> https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/db/AtomicSortedColumns.java#L189-L196
> An insert workload which does perfectly fine on 1.2, pegs CPU use at 100% on
> 2.0, with all of the mutation threads sitting in that loop. For example:
> {noformat}
> "MutationStage:20" daemon prio=10 tid=0x00007fb1c4c72800 nid=0x2249 runnable
> [0x00007fb1b0330000]
> java.lang.Thread.State: RUNNABLE
> at org.apache.cassandra.db.marshal.BytesType.bytesCompare(BytesType.java:45)
> at org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:34)
> at org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:26)
> at
> org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:267)
> at
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:85)
> at
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
> at
> org.apache.cassandra.db.RangeTombstoneList.searchInternal(RangeTombstoneList.java:253)
> at
> org.apache.cassandra.db.RangeTombstoneList.isDeleted(RangeTombstoneList.java:210)
> at org.apache.cassandra.db.DeletionInfo.isDeleted(DeletionInfo.java:136)
> at org.apache.cassandra.db.DeletionInfo.isDeleted(DeletionInfo.java:123)
> at
> org.apache.cassandra.db.AtomicSortedColumns.addAllWithSizeDelta(AtomicSortedColumns.java:193)
> at org.apache.cassandra.db.Memtable.resolve(Memtable.java:194)
> at org.apache.cassandra.db.Memtable.put(Memtable.java:158)
> at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:890)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:368)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:333)
> at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:201)
> at
> org.apache.cassandra.db.RowMutationVerbHandler.doVerb(RowMutationVerbHandler.java:56)
> at
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:60)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)