cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dikang Gu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-11571) Optimize the overlapping lookup, by calculating all the bounds in advance.
Date Wed, 13 Apr 2016 22:40:25 GMT
Dikang Gu created CASSANDRA-11571:
-------------------------------------

             Summary: Optimize the overlapping lookup, by calculating all the bounds in advance.
                 Key: CASSANDRA-11571
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11571
             Project: Cassandra
          Issue Type: Improvement
          Components: Compaction
            Reporter: Dikang Gu
            Assignee: Dikang Gu


When L0 sstable backs up (because of repair or other reasons), I find that a lot of CPU is
using to construct the Bounds.

"CompactionExecutor:223" #1557 daemon prio=1 os_prio=4 tid=0x00007f88f401d800 nid=0x2303ab
runnable [0x00007f824d735000]
   java.lang.Thread.State: RUNNABLE
        at org.apache.cassandra.dht.AbstractBounds.strictlyWrapsAround(AbstractBounds.java:86)
        at org.apache.cassandra.dht.Bounds.<init>(Bounds.java:44)
        at org.apache.cassandra.db.compaction.LeveledManifest.overlapping(LeveledManifest.java:533)
        at org.apache.cassandra.db.compaction.LeveledManifest.overlapping(LeveledManifest.java:520)
        at org.apache.cassandra.db.compaction.LeveledManifest.getCandidatesFor(LeveledManifest.java:595)
        at org.apache.cassandra.db.compaction.LeveledManifest.getCompactionCandidates(LeveledManifest.java:349)
        - locked <0x00007f8e11e67900> (a org.apache.cassandra.db.compaction.LeveledManifest)
        at org.apache.cassandra.db.compaction.LeveledCompactionStrategy.getNextBackgroundTask(LeveledCompactionStrategy.java:97)
        - locked <0x00007f8e11b1d780> (a org.apache.cassandra.db.compaction.LeveledCompactionStrategy)
        at org.apache.cassandra.db.compaction.WrappingCompactionStrategy.getNextBackgroundTask(WrappingCompactionStrategy.java:78)
        - locked <0x00007f8e110931a0> (a org.apache.cassandra.db.compaction.WrappingCompactionStrategy)
        at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:250)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

>From the code, we may construct the bounds multiply times, my patch optimize it by calculating
it in advance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message