我正在一个cassandra集群中做一些测试,现在我有了一个包含1TB数据的表,我使用ycsb来执行更多的插入操作,我发现与同一集群中相同的新表(大约80000 ops/秒)相比,.While插入的吞吐量非常低(约10000 ops/秒),cpu使用率约为40%,几乎没有磁盘使用。
我使用nodetool获取任务细节,它显示:
Pool Name Active Pending Completed Blocked All time blocked
CounterMutationStage 0 0
我在阅读cassandra的冲洗策略时看到了下面的声明-
If the data to be flushed exceeds the memtable_cleanup_threshold, Cassandra blocks writes until the next flush succeeds.
现在我的问题是,假设我们对cassandra进行了每秒约10K条记录的疯狂写入,并且应用程序全天候运行。为了避免阻塞,我们应该在以下参数中进行哪些设置。
memtable_heap_space_in_mb
memtable_offheap_space_in_mb
memtable_cleanu
当我尝试在我的苹果电脑上安装cassandra12时,使用:
brew install cassandra12
它会失败,错误为:
Error: No available formula with the name "homebrew/versions/cassandra12"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
更
如果Cassandra和代码位于同一台计算机上,下面的代码可以工作:
using System;
using Cassandra;
namespace CassandraInsertTest
{
class Program
{
static void Main(string[] args)
{
var cluster = Cluster.Builder()
.AddContactPoint("127.0.0.1")
.Build();