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 调用函数时,无关变量的改变引起函数值的改变
  • ¥15 xy坐标转化为经纬度坐标
  • ¥15 一般三角模糊数的上界值和下届值取中值的多少比较合理?
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥20 Hbase启动失败,无法启动HMaster
  • ¥15 sqpingboot在父模块已经引入了mybatisplus 在子组件不写版本号还是报错
  • ¥20 Lumerical FDTD solutions 中模型的相对阻抗,有效介电常数和有效磁导率的实部和虚部的数据如何获得?
  • ¥100 sql reporting service 远程smtp服务器配置支持
  • ¥15 ppyoloe_r带角度目标检测,loss_cls没法收敛
  • ¥15 淘宝交易指数如何解读,其关联的数据指标是什么