cassandra - CPU 100% due to thousands of Pending Compaction -


recently inserted millions of records , deleted millions of records table, table of size 10 gb truncated.

we running 2 nodes sizetieredcompactionstrategy, cpu utilization 100% , pending compaction increasing , pending compaction 293144

any pointers reduce cpu utilization , compaction done quickly.

reduce cpu utilization , compaction done quickly.

these 2 things orthogonal. can either accelerate compaction (by using more resources) or limit resources compactions writes aren't affected have take longer.

if have ingest running against cassandra cluster, try ensure not affected compactions. long # of pending compactions decreasing on time it's matter of time.

if don't have reads or writes coming in (i.e. downtime or you're bootstrapping) it's okay let compactions use resources , finish fast.

how?

the levers are:

1) get/set compaction throughput (nodetool)-- kicks in next available compaction. how fast compaction occur. default 16 mb/s if have resources available, can increase larger number.

2) concurrent compactors -- there 2 values have set in jmx. can on fly using jmxsh or jconsole, etc. number of compactions can run @ time (number of cores).

monitoring

watch nodetool compactionstats or opscenter (you can chart pending compactions , set alerts) find out progress current compactions or nodetool comactionhistory completed compactions.

other things

a table of size 10 gb truncated.

truncates free, no compaction needed.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

php - How do you embed a video into a custom theme on WordPress? -