Database Reference
In-Depth Information
For a more detailed discussion about JVM- and GC-based performance optimizations
within Neo4j, consult the official documentation at http://docs.neo4j.org/chunked/stable/
configuration-jvm.html .
Construct a sample graph early on to help determine memory (and disk) require-
ments
There'sgenerallynofoolproofandcompletelyaccuratewaytocalculateexactlyhowmuch
heap space the JVM will require to hold and process your graph in memory. What many
people choose to do is construct a small, but relatively accurate (if possible) representation
of their graph as early on in the development process as possible. Even though this sample
graph may change as time goes on, it can be used to help work out how much space and
memory might be required for a larger dataset with a similar structure and access patterns.
This is useful for working out appropriate settings for the filesystem cache, object cache,
and general storage requirements.
The second configuration is the cache_type parameter in the neo4j.properties file. This
controls how node and relationship objects are cached. For the purposes of brevity, we'll
listtheoptionsavailable withthebriefdescriptions specified intheofficialdocumentation;
this can be seen in table 11.2 . For more information see the “Caches in Neo4j” section of
the Neo4j Manual at http://docs.neo4j.org/chunked/stable/configuration-caches.html .
Table 11.2. Object cache-type options as per the official documentation
cache_type
Description
none
Doesn't use a high-level cache. No objects will be cached.
Provides optimal utilization of the available memory. Suitable for high-performance traversal. May
run into GC issues under high load if the frequently accessed parts of the graph don't fit in the
cache.
soft [ * ]
Provides short life span for cached objects. Suitable for high-throughput applications where a larger
portion of the graph than can fit into memory is frequently accessed.
weak
Holds on to all data that gets loaded and never releases it again. Provides good performance if your
graph is small enough to fit in memory.
strong
Provides a means of dedicating a specific amount of memory to caching loaded nodes and relation-
ships. Small footprint and fast insert/lookup. Should be the best option for most scenarios. A high-
performance cache.
hpc [ ** ]
 
Search WWH ::




Custom Search