datomic - 减少原子内存使用

标签 datomic

所以我在一个没有太多内存的小型服务器上,当我尝试运行 datomic 时,它对我生气了!

Launching with Java options -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000b5a00000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1073741824 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid1662.log

我遇到这个:https://groups.google.com/forum/#!topic/datomic/5_ZPZBFmCJg这表明我需要改变更多而不仅仅是 我的事务处理程序 .properties 文件中的 object-cache-max 。不幸的是,它并没有继续我到底需要改变什么。如有帮助,我们将不胜感激。

最佳答案

您可以阅读 capacity planning 上的文档有关配置 Datomic 事务处理程序的更多上下文。正如小组问题所提到的,-Xms1g 和 -Xmx1g 设置需要 1 GB RAM。我链接的文档显示了这种情况下的部分解决方案:

You can set the maximum memory available to a JVM process with the -Xmx flag to java (or to bin/transactor).

Datomic 部署不支持 Micro,尽管有一些在野外成功运行(写入负载非常低)。例如,您可以尝试这样的配置:

memory-index-threshold=16m
memory-index-max=64m
object-cache-max=128m

将 -Xmx 设置为 512MB。据报道,这可能需要在 AWS 等中采取额外的步骤 here 。不过,基本的答案是,您需要减小最大堆大小,并尝试减小其他每个内存设置的值以适应较低的设置。

关于datomic - 减少原子内存使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26102584/

相关文章:

clojure - Datomic 中的访问控制

clojure - Emacs 中的 Datomic 和 Clojure 入门

clojure - 在datomic中,如何找出哪些键可用于反向查找?

datomic - 使用 bigint 属性查询某些值返回空

clojure - 语法 : hash (pound) then symbol

Datomic:强大的设置以避免超时和内存不足错误

database - Datomic 元数据中是否有实体,例如创建和更新时间?

database - 使用 Datomic 嵌套结构

datomic - Datomic 中的 SQL LIKE 运算符

clojure - 为什么 Datomic 属性以驼峰命名