Cassandra的列族数增加对堆利用率有何影响? [英] What is the impact of increase in no of column families of cassandra on heap utilization?

查看:116
本文介绍了Cassandra的列族数增加对堆利用率有何影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用cassandra-1.1.

We are using cassandra-1.1.

出于某种优化目的,我们决定不增加键空间中的列族.

For some optimization purpose we decide to increase no of column families in our keyspace.

这会对堆利用率产生任何影响吗?

Will it have any impact on heap utilization?

Cassandra是否有可能耗尽内存?

Is there any possibilities that Cassandra would run out of memory?

推荐答案

根据Cassandra Wiki,每个节点"消耗的堆大小定义为: memtable_throughput_in_mb * 3 *热CF数量+ 1G +内部缓存 (参考: MemtableThresholds )

As per Cassandra Wiki, the heap size consumed 'per node' is defined as: memtable_throughput_in_mb * 3 * number of hot CFs + 1G + internal caches (ref: MemtableThresholds)

所以要回答第一个问题: 这会对堆利用率产生影响吗? 是的.

So to answer the first question: Will it have any impact on heap utilization? Yes.

关于第二季度,我坚信最新版本的OOM是不可能的.正如您提到的Cassandra 1.1版一样,每个CF的配置memtable_throughput_in_mb被一个全局内存配置-memtable_total_space_in_mb所代替.在上述公式中,此配置等效于-memtable_throughput_in_mb *热CF的数量.这样可以确保JVM堆大小不会随CF数量而扩展,并且始终由全局配置来保护.

Regarding q2, I strongly believe there is no possibility of OOM with latest versions. As you mentioned version 1.1 of Cassandra, the per-CF config memtable_throughput_in_mb is replaced by a global memory configuration - memtable_total_space_in_mb. This config is equivalent to - memtable_throughput_in_mb * number of hot CFs, in the formula mentioned above. This ensures that the JVM heap size does not scale with number of CFs and is always guarded by a global config.

这篇关于Cassandra的列族数增加对堆利用率有何影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆