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

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 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题