gpt4 book ai didi

datomic - 减少原子内存使用

转载 作者:行者123 更新时间:2023-12-02 15:38:55 25 4
gpt4 key购买 nike

所以我在一个没有太多内存的小型服务器上,当我尝试运行 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com