Cassandra - 表的合理最大数量是多少? [英] Cassandra - What is the reasonable maximum number of tables?

查看:783
本文介绍了Cassandra - 表的合理最大数量是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Cassandra的新人。根据我的理解,每个键空间可以存储的表的最大数量是Integer.Max_Value。然而,从性能角度(速度,存储等)对这么大数量表的影响是什么?

预先感谢



Altober

解决方案

虽然在Cassandra中有很多表的合法用例,但它们很少见。您的用例可能是其中之一,但确保它是。没有更多地了解你想解决的问题,显然很难给出指导。很多表将需要更多的资源。多少?这取决于设置和用法。



例如,如果你有一千个表并写入所有的表,同时会有争用RAM因为每个memtable都有memtables,每个memtable都有一定的开销(多少取决于哪个版本的Cassandra,你的设置等)。



但是,如果你有一千个表,但不要同时写给所有的表,则争用不大。仍然有每个表的开销,但将有更多的RAM来保持活动表的memtables周围。



磁盘IO也是如此。如果你读写很多不同的表,同时磁盘将做更多的随机IO。



只是有很多表不是一个大问题,即使有多少你可以有 - 你可以有尽可能多的你想要提供你有足够的内存来保持跟踪他们的结构。有很多的表和阅读和写作给他们在同一时间将是一个问题,但。与对较少的表执行相同数量的读取和写入操作相比,它需要更多的资源。


I am new to Cassandra. As I understand the maximum number of tables that can be stored per keyspace is Integer.Max_Value. However, what are the implications from the performance perspective (speed, storage, etc) of such a big number of tables? Is there any recommendation regarding that?

thanks in advance

Altober

解决方案

While there are legitimate use cases for having lots of tables in Cassandra, they are rare. Your use case might be one of them, but make sure that it is. Without knowning more about the problem you're trying to solve, it's obviously hard to give guidance. Many tables will require more resources, obviously. How much? That depends on the settings, and the usage.

For example, if you have a thousand tables and write to all of them at the same time there will be contention for RAM since there will be memtables for each of them, and there is a certain overhead for each memtable (how much depends on which version of Cassandra, your settings, etc.).

However, if you have a thousand tables but don't write to all of them at the same time, there will be less contention. There's still a per table overhead, but there will be more RAM to keep the active table's memtables around.

The same goes for disk IO. If you read and write to a lot of different tables at the same time the disk is going to do much more random IO.

Just having lots of tables isn't a big problem, even though there is a limit to how many you can have – you can have as many as you want provided you have enough RAM to keep the structures that keep track of them. Having lots of tables and reading and writing to them all at the same time will be a problem, though. It will require more resources than doing the same number of reads and writes to fewer tables.

这篇关于Cassandra - 表的合理最大数量是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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