weixin_52980802 2023-03-05 21:04 采纳率: 100%
浏览 14
已结题

neo4j节点数和边关系数达到千万上亿,频繁崩溃,查看内存显示java占用内存过高

1.neo4j节点数和边关系数达到千万上亿,频繁崩溃,查看内存显示java占用内存过高

  • 写回答

1条回答 默认 最新

  • 汀、人工智能 人工智能领域优质创作者 2023-03-05 21:22
    关注

    解决方案:

    使用命令:./neo4j-admin memrec --database=graph.db

    得到如下信息:

    # Memory settings recommendation from neo4j-admin memrec:
    #
    # Assuming the system is dedicated to running Neo4j and has 7800m of memory,
    # we recommend a heap size of around 3500m, and a page cache of around 1900m,
    # and that about 2500m is left for the operating system, and the native memory
    # needed by Lucene and Netty.
    #
    # Tip: If the indexing storage use is high, e.g. there are many indexes or most
    # data indexed, then it might advantageous to leave more memory for the
    # operating system.
    #
    # Tip: The more concurrent transactions your workload has and the more updates
    # they do, the more heap memory you will need. However, don't allocate more
    # than 31g of heap, since this will disable pointer compression, also known as
    # "compressed oops", in the JVM and make less effective use of the heap.
    #
    # Tip: Setting the initial and the max heap size to the same value means the
    # JVM will never need to change the heap size. Changing the heap size otherwise
    # involves a full GC, which is desirable to avoid.
    #
    # Based on the above, the following memory settings are recommended:
    dbms.memory.heap.initial_size=3500m
    dbms.memory.heap.max_size=3500m
    dbms.memory.pagecache.size=1900m
    #
    # The numbers below have been derived based on your current data volume in database and index configuration of database 'graph.db'.
    # They can be used as an input into more detailed memory analysis.
    # Lucene indexes: 0k
    # Data volume and native indexes: 14200m
    
    

    根据给出的推荐配置,修改neo4j.conf如下三个选项,重启neo4j即可。

    
    ```bash
    
    dbms.memory.heap.initial_size 
    dbms.memory.heap.max_size
    bms.memory.pagecache.size=1900m
    

    ```

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 3月13日
  • 已采纳回答 3月5日
  • 创建了问题 3月5日

悬赏问题

  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd