neo4j-admin批量导入很慢的问题
发布于 5 年前 作者 karl_fan 2531 次浏览 来自 问答

我有641万的节点和关系,使用neo4j-admin批量导入用时7h,这是什么情况?

8 回复

可能是服务器的性能问题吧,我这边导入900万实体,600万关系不到两分钟。 看下是不是你的数据放到系统盘里了,最好修改conf文件,把db的路径定位到/data盘或其他容量大的盘中。

@sariel Linux阿里云服务器,我这只给了6G内存,是不是因为内存太小了?

# 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

调成导入变成1分半钟

# 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=8G

# 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=10g

我也遇到类似问题,66万个节点,300万条关系,使用neo4j-admin导入csv文件,竟然在95%处停了2天多了,还在导入中,我使用了系统默认的conf文件(应该是尽力而为的模式),服务器物理内存有60G,请问大侠们是什么原因?

@karl_fan 你就调整了dbms.memory.pagecache.size这一个参数么?

@iropse 是的 只是修改了以上配置

@mingliang 配置文件修改下

回到顶部