Memory, cache and heap configuration in Neo4j in W

2019-06-10 07:19发布

问题:

I understand that explicit configuration of mapped memory, cache and heap is necessary when running Neo4j with large graphs.

Please provide me with some pointers on how can I change these settings? I realise you need to test with different settings, but what is a good starting point?

Neo4j Community version: 2.2RC01 Java Embedded database

Machine: 8GB RAM

Graph size: 20M nodes(5 properties), 220M edges(2 properties)

回答1:

See the manual for the config, for RC01 you only have to set the page-cache size, e.g. to 2G

dbms.pagecache.memory=2g

You can provide the settings to

new GraphDatabaseFactory() .newGraphDatabaseBuilder(PATH) .setConfig(config) .newDatabase()

Heap is configured when you run your java program, via JVM parameters.