Database Reference
In-Depth Information
Note
When we cover HA, we'll also look at the concept of cache sharding , which can be used
to help load appropriate portions of the graph into memory across multiple machines.
Specific scenarios and configuration examples for the memory-mapped IO caches are
provided in the “Memory mapped IO settings” section of the official Neo4j Manual at ht-
tp://docs.neo4j.org/chunked/stable/configuration-io-examples.html .
Default configuration
In the absence of any configuration from the user, Neo4j will try to work out what it thinks
is best, given its knowledge of the system and the amount of RAM available to it.
Object cache
The filesystem cache goes a long way to improving performance by reducing disk IO, but
Neo4j is a JVM-based application that deals with the concepts of nodes and relationships
(stored as Java objects) rather than only interacting with raw files.
Neo4j's object cache is an area within the JVM heap where Neo4j stores the Java object
versions of nodes and relationships in a form that's optimized for use in traversals and
quick retrievals by the core Neo4j APIs.
The previous section showed you how utilizing the filesystem cache could provide a per-
formanceboostofupto500timescomparedtoaccessingthesamedataonaspinningdisk.
The object cache allows for yet another performance boost over and above the filesystem
cache. Accessing data from within the object cache (as opposed to going to the filesystem
cache) is about 5,000 times faster!
Configuring the object cache
There are two aspects to configuring the object cache. The first involves configuring
the JVM, and specifically the JVM heap, which is done by providing an appropriate -
Xmx???m parameter to the JVM upon startup. The second is choosing an appropriate
Search WWH ::




Custom Search