为什么我的一个Cassandra线程占用了100%的CPU?

时间:2016-09-30 05:28:12

标签: cassandra jvm datastax datastax-enterprise datastax-startup

我的一个Cassandra线程占用了我100%的CPU。我不知道这个线程的作用以及为什么它以满负荷运行?我应该给它更多的资源还是减少数据量等?您可以在线程ID 14809中看到这一点。

我附上了我的Htop输出。

感谢您的帮助。

enter image description here

修改

我重新启动了服务器,所以上面的线程ID可能与下面的线程堆栈不同,但线程是一样的。 这是我的相关线程堆栈:

Attaching to process ID 6364, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.102-b14
Deadlock Detection:

No deadlocks found.

Thread 9955: (state = IN_JAVA)
 - java.util.HashMap$HashIterator.nextNode() @bci=95, line=1441 (Compiled frame; information may be imprecise)
 - java.util.HashMap$KeyIterator.next() @bci=1, line=1461 (Compiled frame)
 - com.google.common.collect.Iterators$3.next() @bci=4, line=163 (Compiled frame)
 - java.util.AbstractCollection.contains(java.lang.Object) @bci=40, line=106 (Compiled frame)
 - com.google.common.base.Predicates$InPredicate.apply(java.lang.Object) @bci=5, line=497 (Compiled frame)
 - com.google.common.base.Predicates$NotPredicate.apply(java.lang.Object) @bci=5, line=312 (Compiled frame)
 - com.google.common.base.Predicates$CompositionPredicate.apply(java.lang.Object) @bci=14, line=536 (Compiled frame)
 - com.google.common.collect.Iterators$7.computeNext() @bci=27, line=647 (Compiled frame)
 - com.google.common.collect.AbstractIterator.tryToComputeNext() @bci=9, line=143 (Compiled frame)
 - com.google.common.collect.AbstractIterator.hasNext() @bci=61, line=138 (Compiled frame)
 - com.google.common.collect.TransformedIterator.hasNext() @bci=4, line=43 (Compiled frame)
 - java.util.AbstractCollection.addAll(java.util.Collection) @bci=10, line=343 (Compiled frame)
 - java.util.HashSet.<init>(java.util.Collection) @bci=10, line=118 (Compiled frame)
 - com.google.common.collect.Sets.newHashSet(java.lang.Iterable) @bci=15, line=218 (Interpreted frame)
 - com.datastax.bdp.hadoop.cfs.compaction.CFSCompactionStrategy.removeKeys(java.lang.Iterable) @bci=116, line=337 (Interpreted frame)
 - com.datastax.bdp.hadoop.cfs.compaction.CFSCompactionStrategy.add(org.apache.cassandra.io.sstable.SSTableReader, boolean) @bci=81, line=293 (Compiled frame)
 - com.datastax.bdp.hadoop.cfs.compaction.CFSCompactionStrategy.handleNotification(org.apache.cassandra.notifications.INotification, java.lang.Object) @bci=18, line=227 (Interpreted frame)
 - org.apache.cassandra.db.DataTracker.notifyAdded(org.apache.cassandra.io.sstable.SSTableReader) @bci=43, line=531 (Interpreted frame)
 - org.apache.cassandra.db.DataTracker.replaceFlushed(org.apache.cassandra.db.Memtable, org.apache.cassandra.io.sstable.SSTableReader) @bci=130, line=179 (Interpreted frame)
 - org.apache.cassandra.db.compaction.AbstractCompactionStrategy.replaceFlushed(org.apache.cassandra.db.Memtable, org.apache.cassandra.io.sstable.SSTableReader) @bci=9, line=234 (Interpreted frame)
 - org.apache.cassandra.db.ColumnFamilyStore.replaceFlushed(org.apache.cassandra.db.Memtable, org.apache.cassandra.io.sstable.SSTableReader) @bci=6, line=1540 (Interpreted frame)
 - org.apache.cassandra.db.Memtable$FlushRunnable.runMayThrow() @bci=73, line=336 (Interpreted frame)
 - org.apache.cassandra.utils.WrappedRunnable.run() @bci=1, line=28 (Interpreted frame)
 - com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(java.lang.Runnable) @bci=5, line=297 (Interpreted frame)
 - org.apache.cassandra.db.ColumnFamilyStore$Flush.run() @bci=163, line=1134 (Interpreted frame)
 - java.util.concurrent.Executors$RunnableAdapter.call() @bci=4, line=511 (Compiled frame)
 - java.util.concurrent.FutureTask.run() @bci=42, line=266 (Compiled frame)
 - java.util.concurrent.Executors$RunnableAdapter.call() @bci=4, line=511 (Compiled frame)
 - java.util.concurrent.FutureTask.run() @bci=42, line=266 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=745 (Compiled frame)

0 个答案:

没有答案