Mnesia数据库的存储容量是多少? [英] What is the storage capacity of a Mnesia database?

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

问题描述

有些地方有2GB的时间。有些地方说这取决于节点的数量。

解决方案

如果你的问题是什么是存储容量数据库由大量的 disk_only_copies 表组成 - 您的大小受到可用磁盘空间的限制。



一个更容易的答案是什么是不同类型的单一遗体表的最大容量。 ram_copies 表受可用内存限制。 disc_copies 表受到其 dets 后端的限制( Hakan Mattsson on Mnesia ) - 这个限制是目前4Gb的数据。



所以简单的答案是简单的 disk_copies 表可以在遇到问题之前存储高达4Gb的数据。 (如果超过磁盘大小限制,Mnesia实际上不会崩溃 - 表的ram_copies部分继续运行,因此您可以通过删除数据或在运行时进行其他安排来修复) p>

但是,如果您考虑其他mnesia功能,那么答案会更复杂。




  • local_content 表。如果
    表是一个 local_content 表,
    那么它可以在mnesia集群中的每个节点上具有不同的内容

    所以表的容量是
    4Gb *<节点数>

  • 碎片表。 Mnesia使用表片段支持用户可配置的表分区或分片。在这种情况下,您可以通过多个原始表格有效地分发和重新分发表中的数据。这些原始表可以有各自的配置 - 比如说一个ram_copies表和其余的disk_only_copies表。这些原始表具有与前面提到的相同的大小限制,现在分片表的有效容量是 4Gb *<片段数> 。 (可惜的是,如果你的表格碎片,那么你必须修改你的表格访问代码,使用 mnesia:activity / 4 而不是 mnesia:写和朋友,但如果您提前计划这是可行的

  • 外部副本如果您喜欢生活在极端恶劣的边缘,您可以应用 mnesiaex 补丁到mnesia并将您的表数据存储在外部系统中,例如 Amazon S3 东京内阁。在这种情况下,表的容量受到后端存储的限制。


Some places state 2GB period. Some places state it depends up the number of nodes.

解决方案

Quite large if your question is "what's the storage capacity of an mnesia database made up of a huge number of disc_only_copies tables" - you're largely limited by available disk space.

An easier question to answer is what's the maximum capacity of a single mnesia table of different types. ram_copies tables are limited by available memory. disc_copies tables are limited by their dets backend (Hakan Mattsson on Mnesia) - this limit is 4Gb of data at the moment.

So the simple answer is that simple disc_copies table can store up to 4Gb of data before they run into problems. (Mnesia doesn't actually crash if you exceed the on-disk size limit - the ram_copies portion of the table continues running, so you can repair this by deleting data or making other arrangements at runtime)

However if you consider other mnesia features, then the answer is more complicated.

  • local_content tables. If the table is a local_content table, then it can have different contents on each node in the mnesia cluster, so the capacity of the table is 4Gb * <number of nodes>
  • fragmented tables. Mnesia supports user configurable table partitioning or sharding using table fragments. In this case you can effectively distribute and redistribute the data in your table over a number of primitive tables. These primitive tables can each have their own configuration - say one ram_copies table and the rest disc_only_copies tables. These primitive tables have the same size limits as mentioned earlier and now the effective capacity of the fragmented table is 4Gb * <number of fragments>. (Sadly if you fragment your table, you then have to modify your table access code to use mnesia:activity/4 instead of mnesia:write and friends, but if you plan this in advance it's managable)
  • external copies If you like living on the extreme bleeding edge, you could apply the mnesiaex patches to mnesia and store your table data in an external system such as Amazon S3 or Tokyo Cabinet. In this case the capacity of the table is limited by the backend storage.

这篇关于Mnesia数据库的存储容量是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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