Skip to content

Instantly share code, notes, and snippets.

@matthew-cox
Last active January 12, 2016 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthew-cox/9df6ed27e355d4b39c06 to your computer and use it in GitHub Desktop.
Save matthew-cox/9df6ed27e355d4b39c06 to your computer and use it in GitHub Desktop.
Neo4j 3.x Filesystem Feedback

Logs

logs/
    debug.log
    http.log
    neo4j.log
    queries.log

The question I would raise about the above structure is: which of these files are truely global versus having enough context to be considered database specific?

Off the top of my head debug.log and neo4j.log (nee messages and console respectively) seem global to me. They are about server and HA status. The others seem less clear.

queries.log

This seems straight forward, slow queries definitely pertain to the database content. This should be a database specific log.

http.log

This is less clear to me. Given today's request logging: it might be per-database. I don't know what this will look like with BOLT. If there is any sort of query identification: it would seem to be database specific.

gc.log

I assume this will still exist and I would make the argument that memory usage and collection patterns seem tied to db content and access patterns. There might be an argument to be made to make it database specific.

On the other hand, gc pauses affect server availability and it would be easiest to monitor this at a global level.

Monitoring

Speaking of monitoring, this structure makes no mention of where the performance data I hear that 2.3 writes out will live. Would this be under logs? It might be more Linux-like to have it with the other state data in /var/lib/neo4j like /var/lib/neo4j/(monitoring|performance|something) .

There might be other questions here if there is performance related information that also might be considered database specific.

Suggestion

I might propose the following structure:

logs/
    databases/
        default/
            gc.log
            http.log
            queries.log
        testdb/
            gc.log
            http.log
            queries.log
        ...
    debug.log
    neo4j.log
    ...

Configuration

Overriding Defaults

On the note of configuration, please, please, please make it possible to overide the defaults contained in the init scripts with the correct OS level mechanism.

Meaning /etc/default/neo4j on Debian or /etc/sysconfig/neo4j on RedHat based systems.

Config Includes

It's great to see simplification of the overall database configuration. Please support the inclusion of multiple config files. Either via a specific directive in the global neo4j.conf ( include conf.d/*.conf ) or allowing the creation of files in the correct location. Perhaps CONFIGDIR/conf.d/*.conf

config/
    config.d/
        default.conf
        testdb.conf
    neo4j.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment