为什么查询一个耗时的cql,neo4j就会崩溃?
发布于 20 天前 作者 karl_fan 161 次浏览 来自 问答

捕获.PNG

6 回复

Cypher怎么写的?

jvm堆栈调大点

@graphway 我是对所有的节点和关系作为分类统计,在neo4j管理界面多刷几次,直接垃圾收集器停止,导致整个应用崩溃,然而我在SDN中做测试。开十五个线程,周期性循环五十次,直接导致CPU飙升,无法返回Cypher执行的结果。

@pangguoming 难道一定要64G这样的大内存才能扛住?

# 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.
dbms.memory.heap.initial_size=6G
dbms.memory.heap.max_size=6G

# The amount of memory to use for mapping the store files, in bytes (or
# kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g').
# If Neo4j is running on a dedicated server, then it is generally recommended
# to leave about 2-4 gigabytes for the operating system, give the JVM enough
# heap to hold all your transaction state and query context, and then leave the
# rest for the page cache.
# The default page cache memory assumes the machine is dedicated to running
# Neo4j, and is heuristically set to 50% of RAM minus the max Java heap size.
dbms.memory.pagecache.size=6g


图运算 都是载入到内存 再运算,得出 我们要查询的结果。 又因为JVM本身也是吃内存,所以 我觉得还是加大内存比较靠谱 @karl_fan

发Cypher上来看看

回到顶部