Database Reference
In-Depth Information
How much space do i need for my graph database?
The amount of space required obviously depends on how much data you plan on storing in
Neo4j, and on any additional space required to support the runtime operation of Neo4j.
All Neo4j data lives under a single, top-level Neo4j directory (by default, data/graph.db in
a server-based setup). This includes the core graph data, which lives in a set of store files
(covered in section 11.1.3 ) , transaction logs (covered in section 11.1.5 ) , and the rest (in-
cluding things like indexes and other minor files) in other files.
All of the main store files that contain the core graph structure are consistent in the amount
of space they occupy—they have fixed record sizes, which can help you estimate the ulti-
matefilesizes.Thishelpsgreatlyincalculatingwhatthecoredatabasesizingrequirements
are, although this alone isn't always enough to work it out exactly. This is partly due to the
fact that Neo4j itself will sometimes create additional files as part of its internal runtime
optimizations, which can't necessarily be anticipated upfront. Indexes and labels will also
take up more space.
You can do rough math based on your estimates of the number of nodes, relationships,
and properties required. The general formula for calculating the space required for the core
graph data is
Core Graph Size (in bytes) =
(num nodes X node store record size in bytes) +
(num relationships X relationship store record size in bytes) +
(num properties X average bytes per property)
The fixed record sizes are discussed in more detail in the next section, but at the time of
writing, the node store uses 14 bytes and the relationship store uses 33 bytes. Remember
thattherewillbeadditionaldiskstoragerequirementsforindexes,transactionlogs,andthe
like, and these should also be taken into account when calculating the total amount of disk
spacerequired.Havingsaidthat,calculatingthecoregraphdatasize,whichisusuallywhat
takes up much of the disk space used by Neo4j, is relatively straightforward.
Neo4j hardware sizing calculator
Neo Technology provides an online hardware sizing calculator to provide rough estimates
for the minimum hardware configuration required, given a certain set of inputs, such as
Search WWH ::




Custom Search