在 Neo4j 上增加 Java 堆大小
Increasing Java Heap Size on Neo4j
有人知道如何增加 Java 堆大小 one Neo4j 吗?
我正在将一个 csv 文件加载到 Neo4j 数据库中,但我无法加载它,因为我需要增加 Java 堆大小...
我检查过我有超过 100GB 的可用空间……我还有 16Gb 的 RAM。
我的 Jar 文件位于“C:\Program Files\Neo4j CE 3.1.4\bin\neo4j-desktop-3.1.4.jar
您可以设置位于 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
前缀批量处理您的交易。来自 docs
的例子
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])})
有人知道如何增加 Java 堆大小 one Neo4j 吗?
我正在将一个 csv 文件加载到 Neo4j 数据库中,但我无法加载它,因为我需要增加 Java 堆大小... 我检查过我有超过 100GB 的可用空间……我还有 16Gb 的 RAM。 我的 Jar 文件位于“C:\Program Files\Neo4j CE 3.1.4\bin\neo4j-desktop-3.1.4.jar
您可以设置位于 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
前缀批量处理您的交易。来自 docs
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])})