cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "PengtaoGeng (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11616) cassandra very high cpu rate
Date Wed, 20 Apr 2016 08:17:25 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-11616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

PengtaoGeng updated CASSANDRA-11616:
------------------------------------
    Description: 
Under the very low speed of query CPU utilization of 100%.
Query cql is only by partition key or by second index.

Blow is the desc table info:
CREATE TABLE mykeyspace.userlabel (
    id text PRIMARY KEY,
    cardno text,
    phone text,
    ccount text,
    username text
) ;
CREATE INDEX userlabel_phone ON mykeyspace.userlabel (phone)

top -H and jstack find the utilization cpu threads, they are all come from "SharedPool-Worker".
Show one thread jstack info:

{quote}
"SharedPool-Worker-28" #205 daemon prio=5 os_prio=0 tid=0x00007f1610cc8780 nid=0xe7c0 runnable
[0x00007f0ed566f000]
   java.lang.Thread.State: RUNNABLE
    at org.apache.cassandra.utils.MurmurHash.hash3_x64_128(MurmurHash.java:191)
    at org.apache.cassandra.dht.Murmur3Partitioner.getHash(Murmur3Partitioner.java:181)
    at org.apache.cassandra.dht.Murmur3Partitioner.decorateKey(Murmur3Partitioner.java:53)
    at org.apache.cassandra.db.PartitionPosition$ForKey.get(PartitionPosition.java:49)
    at org.apache.cassandra.db.marshal.PartitionerDefinedOrder.compareCustom(PartitionerDefinedOrder.java:93)
    at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:158)
    at org.apache.cassandra.db.ClusteringComparator.compareComponent(ClusteringComparator.java:166)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:137)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:126)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:44)
    at org.apache.cassandra.utils.MergeIterator$Candidate.compareTo(MergeIterator.java:378)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.replaceAndSink(MergeIterator.java:266)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:189)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:158)
    at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
    at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:428)
    at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:288)
    at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
    at org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:108)
    at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.prepareNext(CompositesSearcher.java:130)
    at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.hasNext(CompositesSearcher.java:83)
    at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:72)
    at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:295)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:134)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:127)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:123)
    at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65)
    at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:289)
    at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:47)
    at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:67)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
    at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
    at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
    at java.lang.Thread.run(Thread.java:745)
{quote}

I'm using Cassandra version 3.0.5, just upgraded from 3.0.4 recently for bug of CASSANDRA-11304.

Does it cause by "org.apache.cassandra.db.partitions.UnfilteredPartitionIterator#prepareNext"
?

  was:
Under the very low speed of query CPU utilization of 100%.
Query cql is only by partition key or by second index.

Blow is the desc table info:
CREATE TABLE mykeyspace.userlabel (
    id text PRIMARY KEY,
    cardno text,
    phone text,
    ccount text,
    username text
) ;
CREATE INDEX userlabel_phone ON mykeyspace.userlabel (phone)

top -H and jstack find the utilization cpu threads, they are all come from "SharedPool-Worker".
Show one thread jstack info:

{code}
"SharedPool-Worker-28" #205 daemon prio=5 os_prio=0 tid=0x00007f1610cc8780 nid=0xe7c0 runnable
[0x00007f0ed566f000]
   java.lang.Thread.State: RUNNABLE
    at org.apache.cassandra.utils.MurmurHash.hash3_x64_128(MurmurHash.java:191)
    at org.apache.cassandra.dht.Murmur3Partitioner.getHash(Murmur3Partitioner.java:181)
    at org.apache.cassandra.dht.Murmur3Partitioner.decorateKey(Murmur3Partitioner.java:53)
    at org.apache.cassandra.db.PartitionPosition$ForKey.get(PartitionPosition.java:49)
    at org.apache.cassandra.db.marshal.PartitionerDefinedOrder.compareCustom(PartitionerDefinedOrder.java:93)
    at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:158)
    at org.apache.cassandra.db.ClusteringComparator.compareComponent(ClusteringComparator.java:166)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:137)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:126)
    at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:44)
    at org.apache.cassandra.utils.MergeIterator$Candidate.compareTo(MergeIterator.java:378)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.replaceAndSink(MergeIterator.java:266)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:189)
    at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:158)
    at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
    at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:428)
    at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:288)
    at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
    at org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:108)
    at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.prepareNext(CompositesSearcher.java:130)
    at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.hasNext(CompositesSearcher.java:83)
    at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:72)
    at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:295)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:134)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:127)
    at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:123)
    at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65)
    at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:289)
    at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:47)
    at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:67)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
    at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
    at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
    at java.lang.Thread.run(Thread.java:745)
{code}

I'm using Cassandra version 3.0.5, just upgraded from 3.0.4 recently for bug of CASSANDRA-11304.

Does it cause by "org.apache.cassandra.db.partitions.UnfilteredPartitionIterator#prepareNext"
?


> cassandra very high cpu rate
> ----------------------------
>
>                 Key: CASSANDRA-11616
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11616
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local Write-Read Paths
>         Environment: CentOS release 6.4
> 4 nodes cluster
> cassandra 3.0.5
> nodetool cfstats mykeyspace show the table data volume: Number of keys (estimate): 77570676
>            Reporter: PengtaoGeng
>         Attachments: Image.png
>
>
> Under the very low speed of query CPU utilization of 100%.
> Query cql is only by partition key or by second index.
> Blow is the desc table info:
> CREATE TABLE mykeyspace.userlabel (
>     id text PRIMARY KEY,
>     cardno text,
>     phone text,
>     ccount text,
>     username text
> ) ;
> CREATE INDEX userlabel_phone ON mykeyspace.userlabel (phone)
> top -H and jstack find the utilization cpu threads, they are all come from "SharedPool-Worker".
> Show one thread jstack info:
> {quote}
> "SharedPool-Worker-28" #205 daemon prio=5 os_prio=0 tid=0x00007f1610cc8780 nid=0xe7c0
runnable [0x00007f0ed566f000]
>    java.lang.Thread.State: RUNNABLE
>     at org.apache.cassandra.utils.MurmurHash.hash3_x64_128(MurmurHash.java:191)
>     at org.apache.cassandra.dht.Murmur3Partitioner.getHash(Murmur3Partitioner.java:181)
>     at org.apache.cassandra.dht.Murmur3Partitioner.decorateKey(Murmur3Partitioner.java:53)
>     at org.apache.cassandra.db.PartitionPosition$ForKey.get(PartitionPosition.java:49)
>     at org.apache.cassandra.db.marshal.PartitionerDefinedOrder.compareCustom(PartitionerDefinedOrder.java:93)
>     at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:158)
>     at org.apache.cassandra.db.ClusteringComparator.compareComponent(ClusteringComparator.java:166)
>     at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:137)
>     at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:126)
>     at org.apache.cassandra.db.ClusteringComparator.compare(ClusteringComparator.java:44)
>     at org.apache.cassandra.utils.MergeIterator$Candidate.compareTo(MergeIterator.java:378)
>     at org.apache.cassandra.utils.MergeIterator$ManyToOne.replaceAndSink(MergeIterator.java:266)
>     at org.apache.cassandra.utils.MergeIterator$ManyToOne.advance(MergeIterator.java:189)
>     at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:158)
>     at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
>     at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:428)
>     at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:288)
>     at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
>     at org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:108)
>     at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.prepareNext(CompositesSearcher.java:130)
>     at org.apache.cassandra.index.internal.composites.CompositesSearcher$1.hasNext(CompositesSearcher.java:83)
>     at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:72)
>     at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:295)
>     at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:134)
>     at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:127)
>     at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:123)
>     at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65)
>     at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:289)
>     at org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:47)
>     at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:67)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>     at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
>     at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
>     at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
>     at java.lang.Thread.run(Thread.java:745)
> {quote}
> I'm using Cassandra version 3.0.5, just upgraded from 3.0.4 recently for bug of CASSANDRA-11304.
> Does it cause by "org.apache.cassandra.db.partitions.UnfilteredPartitionIterator#prepareNext"
?



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

Mime
View raw message