Neo4J metrics and disk space provisioning

David de los Santos Boix
6 min readJul 15, 2020

When using any piece of software, you will probably need some kind of monitoring and alerting system watching on that software so you can know when is it about to collapse or if it is down. For doing that you will need to enable some metrics of your system to investigate what happened, how to solve the problem and how to prevent this from happening again.

Neo4J is no different from any piece of software, and it comes with the ability to export a bunch of customisable metrics to different systems, so you can visualise, monitor and watch for those values.

To do so, Neo4J provides some configuration properties to be added to the neo4j.conf file, so you can enable the metrics you are interested in, and where they go. Here are some of the Neo4J 4.1 default values regarding metrics on neo4j.conf:

metrics.csv.enabled=true
metrics.csv.interval=3s
metrics.csv.rotation.keep_number=7
metrics.csv.rotation.size=10.00MiB

That means that, by default, Neo4J has CSV metrics enabled, writing to disk every 3 seconds, keeping 7+1 files per CSV it creates (the working CSV and the 7 historic files), being each file up to 10 MiB, but, how does Neo4J spill metrics to disk? Could it be this default configuration a disk space problem? Let’s find out.

Defaults can be dangerous

--

--