Neo4j cpu 卡在 GC 上

2024-03-31

突然间,工作了一个月后,CPU 几乎没有使用(1% 到 5% 之间)。 neo4j 服务器在垃圾收集时 cpu 占用率达到 100%。

我在 ubuntu 4 处理器服务器上运行 neo4j-entherprise 2.0.3 (未嵌入)。

这是我的 neo4j 配置: 包装:

wrapper.java.additional=-Dorg.neo4j.server.properties=conf/neo4j-server.properties
wrapper.java.additional=-Djava.util.logging.config.file=conf/logging.properties
wrapper.java.additional=-Dlog4j.configuration=file:conf/log4j.properties

#********************************************************************
# JVM Parameters
#********************************************************************

wrapper.java.additional=-XX:+UseConcMarkSweepGC
wrapper.java.additional=-XX:+CMSClassUnloadingEnabled

# Remote JMX monitoring, uncomment and adjust the following lines as needed.
# Also make sure to update the jmx.access and jmx.password files with appropriate permission roles and passwords,
# the shipped configuration contains only a read only role called 'monitor' with password 'Neo4j'.
# For more details, see: http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html
# On Unix based systems the jmx.password file needs to be owned by the user that will run the server,
# and have permissions set to 0600.
# For details on setting these file permissions on Windows see:
#     http://download.oracle.com/javase/1.5.0/docs/guide/management/security-windows.html
wrapper.java.additional=-Dcom.sun.management.jmxremote.port=3637
wrapper.java.additional=-Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional=-Dcom.sun.management.jmxremote.password.file=conf/jmx.password
wrapper.java.additional=-Dcom.sun.management.jmxremote.access.file=conf/jmx.access

# Some systems cannot discover host name automatically, and need this line configured:
#wrapper.java.additional=-Djava.rmi.server.hostname=$THE_NEO4J_SERVER_HOSTNAME

# disable UDC (report data to neo4j..)
wrapper.java.additional=-Dneo4j.ext.udc.disable=true

# Uncomment the following lines to enable garbage collection logging
wrapper.java.additional=-Xloggc:data/log/neo4j-gc.log
wrapper.java.additional=-XX:+PrintGCDetails
wrapper.java.additional=-XX:+PrintGCDateStamps
wrapper.java.additional=-XX:+PrintGCApplicationStoppedTime
#wrapper.java.additional=-XX:+PrintPromotionFailure
#wrapper.java.additional=-XX:+PrintTenuringDistribution

# Uncomment the following lines to enable JVM startup diagnostics
#wrapper.java.additional=-XX:+PrintFlagsFinal
#wrapper.java.additional=-XX:+PrintFlagsInitial

# Java Heap Size: by default the Java heap size is dynamically
# calculated based on available system resources.
# Uncomment these lines to set specific initial and maximum
# heap size in MB.
#wrapper.java.initmemory=512
wrapper.java.maxmemory=3072

#********************************************************************
# Wrapper settings
#********************************************************************
# path is relative to the bin dir
wrapper.pidfile=../data/neo4j-server.pid

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.name=neo4j

默认值:

# Default values for the low-level graph engine
neostore.nodestore.db.mapped_memory=25M
neostore.relationshipstore.db.mapped_memory=120M
neostore.propertystore.db.mapped_memory=90M
neostore.propertystore.db.strings.mapped_memory=100M
neostore.propertystore.db.arrays.mapped_memory=100M

我能做些什么?

EDIT:

存储文件大小:

[
  {
    "description": "Information about the sizes of the different parts of the Neo4j graph store",
    "name": "org.neo4j:instance=kernel#0,name=Store file sizes",
    "attributes": [
      {
        "description": "The total disk space used by this Neo4j instance, in bytes.",
        "name": "TotalStoreSize",
        "value": 401188207,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used by the current Neo4j logical log, in bytes.",
        "name": "LogicalLogSize",
        "value": 24957516,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used to store array properties, in bytes.",
        "name": "ArrayStoreSize",
        "value": 128,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used to store nodes, in bytes.",
        "name": "NodeStoreSize",
        "value": 524160,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used to store properties (excluding string values and array values), in bytes.",
        "name": "PropertyStoreSize",
        "value": 145348280,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used to store relationships, in bytes.",
        "name": "RelationshipStoreSize",
        "value": 114126903,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      },
      {
        "description": "The amount of disk space used to store string properties, in bytes.",
        "name": "StringStoreSize",
        "value": 128,
        "isReadable": "true",
        "type": "long",
        "isWriteable": "false ",
        "isIs": "false "
      }
    ],
    "url": "org.neo4j/instance%3Dkernel%230%2Cname%3DStore+file+sizes"
  }
]

假设您的机器有 16 GB RAM。

首先是设置neostore.xxx.mapped_memory设置以匹配您的商店文件的大小。我假设它们的总数为 5 GB -> 您还剩下 11 GB。看http://docs.neo4j.org/chunked/2.0.4/configuration-caches.html http://docs.neo4j.org/chunked/2.0.4/configuration-caches.html更多细节。

为系统保留一些 RAM:1GB -> 还剩 10GB。

使用以下命令将剩余 RAM 分配给 java 堆wrapper.java.initmemory wrapper.java.maxmemory。将两者都设置为same value.

If hpc用作cache_type考虑根据关系和节点的缓存命中率调整其设置。使用JMX来监控它们,http://docs.neo4j.org/chunked/2.0.4/jmx-mxbeans.html#jmx-cache-nodecache http://docs.neo4j.org/chunked/2.0.4/jmx-mxbeans.html#jmx-cache-nodecache.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Neo4j cpu 卡在 GC 上 的相关文章

随机推荐

  • 是否可以撤销提交?

    假设我们有一个存储库和 5 个提交 commit 1 commit 2 commit 3 commit 4 commit 5 现在我意识到提交 4 和 5 是一个坏主意 我想完全删除提交 4 和 5 中提交的所有更改 该怎么做 git re
  • 在clojure中,如何将具有相同键的映射组合的多个映射合并到一个列表中?

    在 Clojure 中 我想将多个映射组合成一个映射 其中具有相同键的映射被组合成一个列表 例如 humor happy humor sad humor happy weather sunny 应该导致 weather sunny humo
  • 如何从资源文件夹中获取文件。 Spring框架

    我正在尝试解组我的 xml 文件 public Object convertFromXMLToObject String xmlfile throws IOException FileInputStream is null File fil
  • 分层架构中的实体框架

    最近我读了一篇文章 分层架构中的实体框架 http msdn microsoft com en us magazine cc700340 aspx 并且写道我们可以通过 WCF 将 EF 实体发送到客户端 但是在 Stackoverflow
  • 高效的 4x4 矩阵乘法(C 与汇编)

    我正在寻找一种更快 更棘手的方法来用 C 语言将两个 4x4 矩阵相乘 我目前的研究重点是具有 SIMD 扩展的 x86 64 汇编 到目前为止 我已经创建了一个比简单的 C 实现快大约 6 倍的函数 这超出了我对性能改进的预期 不幸的是
  • CSS flexbox 包装未调整大小以适应内容[重复]

    这个问题在这里已经有答案了 一个简化的 plunkr 来显示问题 https plnkr co edit mHTHLEumQ04tInFVAz3z p preview https plnkr co edit mHTHLEumQ04tInFV
  • GCP Cloud Run:无法创建服务

    我正在尝试将 Cloud run 与私有 GKE 集群结合使用 我使用以下命令创建了集群 gcloud beta container clusters create cluster name create subnetwork name c
  • 标准 ORMLite 方法中的 CursorWindowAllocationException

    我需要在数据库中保存一些对象 我在我的 Dao 类中使用这段代码 public void saveActions List
  • 如何知道缩放级别以在谷歌标记集群内显示标记

    好吧 几乎所有内容都在标题中 我有数千个带有谷歌标记集群的标记 不是谷歌标记集群加上 让我知道它是否有帮助 一切都很完美 BUT 当我触发与特定标记相关的事件时 我想单独显示该标记 不再在群集内 由于标记的空间重新分配并不均匀 在某些地方
  • 如何查看Core Data中存储的数据?

    我正在为我的应用程序创建一个核心数据模型 我希望能够查看它的内部 看看我在那里存储了什么 有没有一个比搜索后备存储更简单的方法 我的应该是 SQLite 并从那里读取它 看起来不太像苹果风格 当您的应用程序在模拟器中运行并创建持久存储文件后
  • PDFBox 是否允许从 AcroForm 中删除一个字段?

    我正在使用阿帕奇PDF盒子2 0 8 https mvnrepository com artifact org apache pdfbox pdfbox 2 0 8并试图删除一个字段 但找不到方法来做到这一点 就像我可以用 iText 做的
  • Excel VBA 条件格式未执行

    这很奇怪 我正在从 MS Access 2003 VBA 创建 Excel 2003 电子表格 编码包括条件格式 如果单元格值大于 a value 则为红色 如果小于 a value 则为绿色 即使在生成电子表格时成功创建了 CF 公式 但
  • 从文件中读取最后一行

    我遇到了一个问题 我在 Linux 机器上有一个日志 其中写入了多个正在运行的进程的输出 这个文件有时会变得非常大 我需要读取该文件的最后一行 问题是此操作将经常通过 AJAX 请求调用 当该日志的文件大小超过 5 6MB 时 这对服务器来
  • PySpark PCA:避免 NotConvergedException

    我试图通过 ml linalg 方法使用 PCA 来减少广泛的数据集 51 个特征 约 1300 个个体 如下所示 1 将我的列命名为一个列表 features indi prep df select c for c in indi pre
  • bootstrap下拉菜单根据屏幕位置自动下拉?

    我想知道你们中是否有人已经准备好我所要求的东西 以帮助我摆脱麻烦 我正在寻找的是一个下拉菜单 可以根据其在屏幕上的位置自动添加下拉类 并且当用户滚动或调整窗口大小时也会自动更改 我正在寻找的内容已经在 bootstrap select 插件
  • .net Core amd Roslyn CSharpCompilation,类型“Object”在未引用的程序集中定义

    我正在尝试将一些 net 代码移植到新的 Core 运行时 但在移植一些即时编译时遇到了麻烦 要恢复 它总是要求我引用 System Runtime 和 mscorlib 但不知道如何引用它们 附带说明一下 我无法引用 Framework
  • 如何修复致命异常:Resources$NotFoundException:资源 ID #0x20c003b DeviceFormFactor.java 第 107 行 org.chromium.ui.base.DeviceFormFactor.a

    在 crashlytics 中得到这个 不知道问题出在哪里 Fatal Exception android content res Resources NotFoundException Resource ID 0x20c003b at a
  • 使用 JavaScript 加密本地存储的数据

    当我学习 JavaScript 和 HTML5 时 我正在尝试构建一个基本的测验应用程序 该应用程序会提出一些可在移动网络上运行的多项选择题 并且也可以作为使用 PhoneGap 的应用程序 当提出问题时 结果会存储在本地 我希望 Phon
  • java.lang.NoClassDefFoundError: org.joda.time.DateTime

    在 android 4 3 API 18 上启动应用程序时出现此错误 没有编译错误 并且库已添加到build gradle中 compile joda time joda time 2 9 2 在 android api 23 上工作没有问
  • Neo4j cpu 卡在 GC 上

    突然间 工作了一个月后 CPU 几乎没有使用 1 到 5 之间 neo4j 服务器在垃圾收集时 cpu 占用率达到 100 我在 ubuntu 4 处理器服务器上运行 neo4j entherprise 2 0 3 未嵌入 这是我的 neo