2017-05-08 130 views
0

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

我正在加载一个csv文件到Neo4j数据库,我无法加载它,因为我需要增加Java堆大小... 我检查了我有超过100GB的免费...我也有16GB的内存。 我的.jar文件位于“C:\ Program Files文件\ Neo4j的CE 3.1.4 \ BIN \ Neo4j的桌面-3.1.4.jar

回答

0

您可以设置neo4j.conf,这是通过取消注释位于C:\Program Files\Neo4j CE 3.1.4\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])})