Cassandra compaction tasks stuck

心已入冬 提交于 2019-12-03 16:46:44

azure storage

Azure divides disk resources among storage accounts under an individual user account. There can be many storage accounts in an individual user account.

For the purposes of running DSE [or cassandra], it is important to note that a single storage account should not should not be shared between more than two nodes if DSE [or cassandra] is configured like the examples in the scripts in this document. This document configures each node to have 16 disks. Each disk has a limit of 500 IOPS. This yields 8000 IOPS when configured in RAID-0. So, two nodes will hit 16,000 IOPS and three would exceed the limit.

See details here

So, this has been an issue that have been under investigation for a long time now and we've found a solution, however, we aren't sure what the underlaying problem that were causing the issues were but we got a clue even tho that, nothing can be confirmed.

Basically what we did was setting up a RAID-0 also known as Striping consisting of four disks, each at 1 TB of size. We should have seen somewhere 4x one disks IOPS when using the Stripe, but we didn't, so something was clearly wrong with the setup of the RAID.

We used multiple utilities to confirm that the CPU were waiting for the IO to respond most of the time when we said to ourselves that the node was "stucked". Clearly something with the IO and most probably our RAID-setup was causing this. We tried a few differences within MDADM-settings etc, but didn't manage to solve the problems using the RAID-setup.

We started investigating Azure Premium Storage (which still is in preview). This enables attaching disks to VMs whose underlaying physical storage actually are SSDs. So we said, well, SSDs => more IOPS, so let us give this a try. We did not setup any RAID using the SSDs. We are only using one single SSD-disk per VM.

We've been running the Cluster for almost 3 days now and we've stress tested it a lot but haven't been able to reproduce the issues.

I guess we didn't came down to the real cause but the conclusion is that some of the following must have been the underlaying cause for our problems.

  • Too slow disks (writes > IOPS)
  • RAID was setup incorrectly which caused the disks to function non-normally

These two problems go hand-in-hand and most likely is that we basically just was setting up the disks in the wrong way. However, SSDs = more power to the people, so we will definitely continue using SSDs.

If someone experience the same problems that we had on Azure with RAID-0 on large disks, don't hesitate to add to here.

Part of the problem you have is that you do not have a lot of memory on those systems and it is likely that even with only 1GB of data per node, your nodes are experiencing GC pressure. Check in the system.log for errors and warnings as this will provide clues as to what is happening on your cluster.

The rollups_60 table in the OpsCenter schema contains the lowest (minute level) granularity time series data for all your Cassandra, OS, and DSE metrics. These metrics are collected regardless of whether you have built charts for them in your dashboard so that you can pick up historical views when needed. It may be that this table is outgrowing your small hardware.

You can try tuning OpsCenter to avoid this kind of issues. Here are some options for configuration in your opscenterd.conf file:

  1. Adding keyspaces (for example the opsc keyspace) to your ignored_keyspaces setting
  2. You can also decrease the TTL on this table by tuning the 1min_ttlsetting

Sources: Opscenter Config DataStax docs Metrics Config DataStax Docs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!