0

有谁知道如何增加一个 Neo4j 的 Java 堆大小?

我正在将一个 csv 文件加载到 Neo4j 数据库中,但我无法加载它,因为我需要增加 Java 堆大小……我检查了我有超过 100GB 的可用空间……我还有 16Gb 的 RAM。我的 Jar 文件位于“C:\Program Files\Neo4j CE 3.1.4\bin\neo4j-desktop-3.1.4.jar

4

1 回答 1

1

C:\Program Files\Neo4j CE 3.1.4\conf\您可以通过取消注释并设置以下行来设置 neo4j.conf :

# 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=512m
#dbms.memory.heap.max_size=512m

# 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

要知道,如果您正在使用LOAD CSV功能,您可以使用USING PERIODIC COMMIT前缀批量交易。文档中的示例

USING PERIODIC COMMIT 1000
LOAD CSV FROM 'https://neo4j.com/docs/developer-manual/3.1/csv/artists.csv' AS line
CREATE (:Artist { name: line[1], year: toInt(line[2])})
于 2017-05-08T22:54:50.787 回答