anAccountName05
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Operational View For Neo4j ## Justification The log files are really important for developers when they want to resolve some bugs or when they want to understand the system that they are working on. Therefore, it would be helpful for developers to include a look-up table in this AD that matches different log levels with their triggering events and purposes. Furthermore, guidance regarding how to properly configure Neo4j should also be provided since the official documentation regarding configuration is not straightforward to understand. Because of the requirements above, it is reasonable to include an operational view in the AD. ## Scope The scope of this view is limited to Neo4j community edition version 4.4 * Features not included in this community edition are excluded from this view. The target audience for this view is developers. ### Logging Overview Four different logging levels are provided: * info * warn * debug * error Logging levels indicate the nature of the messages being logged. The format of each log and the location to which the logs are stored are configurable. **Possible Formats for Log:** JSON or plain text. **How logs are stored:** Log entries at info, error and warn level are stored in one file, and log entries at debug level are stored in another file. **Each log entry has the following fields** * time * level * category * message * stacktrace (if an exception is raised). **One interesting characteristic of logging in Neo4j:** If the operation triggered by the user request is complex and has different phases, more information is logged to indicate if a certain phase of the operation is successful; for example, before stopping a database, Neo4j needs to apply all the queued transactions, and whether all the queued transactions have been successfully applied is also logged. ### Logging Levels and Explanation ([Logging Module Source Code](https://github.com/neo4j/neo4j/tree/4.4/community/logging/src/main/java/org/neo4j/logging/log4j)) | Logging Level | Purpose | Example Triggering Events | Example Messages Logged at this level | |---------------|------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Info | Report the status of Neo4j's operations | The starting and completion of Neo4j's operations. | "Starting web server" <br/> <br/> "Web server started." | | Warn | Report errors that are not severe but need users' attention | Users fail to configure the system properly, and such failure has created errors. <br/> <br/> Users ask the system to do illegal operations. | "Old community lock manager is configured to be used. Ignoring and fallback to default lock manager." <br/> <br/> "No transaction logs were detected, but recovery was forced by user." | | Debug | Report more technical information regarding Neo4j's operations | Sub-operations within a Neo4j's operation, and that sub-operations usually involve technical details not relevant to the users who do not have a technical background | "Shutting down thread pool" <br/> <br/> "Thread pool shut down" | | Error | Report severe errors that need to be addressed immediately | Errors that might damage data integrity or prevent the Neo4j server from running. | " Failed to roll back transaction.{exception}" <br/> <br/> "Transaction logs are missing and recovery is not possible." | ### The Definition of the terms used in the table above **Operation**: operation is an abstraction that can refer to one method call or a series of method calls that serves the same or similar functionalities. ## Configuration Management Model ### Note There are hundreds of parameters that can be configured by the users of Neo4j. Therefore, only the parameters that are useful for the developers of Neo4j are included into this model. You can view all the parameters by clicking this [link](https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/) ### Configuration Groups | Configuration Group Name | Example Parameters in the Group | Purpose of This Configuration Group | |-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Memory parameters | dbms.memory.heap.initial_size=512m <br/> <br/> dbms.memory.heap.max_size=512m <br/> <br/> dbms.memory.transaction.global_max_size=256m <br/> <br/> dbms.memory.transaction.max_size=16m <br/> <br/> dbms.tx_state.memory_allocation=ON_HEAP | 1. Specify how much memory will be used during runtime for Neo4j related activities.<br/> 2. Determine the amount of memory that all the running transaction can consume, the amount of memory that a single transaction can consume, and transaction state location (for example on heap) etc. | | Network connection parameters | dbms.connector.bolt.enabled=true<br/> <br/> dbms.connector.bolt.tls_level=DISABLED<br/> <br/> dbms.connector.bolt.listen_address=:7687<br/> <br/> dbms.connector.bolt.advertised_address=:7687<br/> <br/> dbms.connector.http.enabled=true<br/> <br/> dbms.connector.https.enabled=false | 1. Specify what types of network connection is allowed and the listen addresses of these connections | | SSL policy parameters | dbms.ssl.policy.https.enabled=true<br/> <br/> dbms.ssl.policy.https.base_directory=certificates/https<br/> <br/> dbms.ssl.policy.https.private_key=private.key<br/> <br/> dbms.ssl.policy.https.public_certificate=public.crt<br/> <br/> dbms.ssl.policy.https.client_auth=NONE<br/> <br/> dbms.ssl.policy.bolt.enabled=true<br/> <br/> dbms.ssl.policy.cluster.enabled=true<br/> <br/> dbms.ssl.policy.backup.enabled=true<br/> <br/> dbms.ssl.policy.backup.base_directory=certificates/backup | 1. Configure the secure sockets layer for Bolt connection, HTTPs connection, backup databases and cluster. <br/> <br/> 2. Specify many security related properties for network connections. These safety related properties include but not limited to if authentication is needed or if a private key is needed. | | Logging parameters | dbms.logs.http.enabled=true<br/> <br/> dbms.logs.http.rotation.keep_number=5<br/> <br/> dbms.logs.http.rotation.size=20m<br/> <br/> dbms.logs.gc.enabled=true | 1. Configure the HTTP logs and garbage collection logs. Specify these logs' size, amount and threshold for rotations.<br/> <br/> 2. Specify if the HTTP logs and the garbage collection logs are enabled. | | JVM parameters | dbms.jvm.additional=-XX:+UseG1GC<br/> <br/> dbms.jvm.additional=-XX:-OmitStackTraceInFastThrow<br/> <br/> dbms.jvm.additional=-Djdk.nio.maxCachedBufferSize=262144<br/> <br/> dbms.jvm.additional=-XX:+DisableExplicitGC | 1. Configure the properties of JVM. These properties include but not limited to if stacktrace is omitted in fast throw, which type of garbage collector is used and if explicit garbage collection is enabled. | | Transaction parameters | dbms.transaction.timeout=10s<br/> <br/> dbms.lock.acquisition.timeout=10s | 1. Specify how long a transaction can be executed and how long a transaction can hold a lock. | ### Configuration Dependencies For any dependency relationship A->B, if B changes, A must change. #### Dependency Graph 1 ![](https://i.imgur.com/sNDeEII.png) #### Explanation For Dependency Graph 1: (Intergroup dependencies) If a connection is disabled in the *Network Connection Parameters Configuration Group*, then the parameters related to such connection in *SSL Policy Parameters Configuration Group* also need to be disabled. For instance, if dbms.connector.https.enabled = false, then the corresponding parameters in the *SSL Policy Parameters Configuration Group* also need to be disabled. To disable these parameters, users can just comment out these parameters. #### Dependency Graph 2 ![](https://i.imgur.com/yAcbY8z.png) #### Explanation For Dependency Graph 2: (Intergroup dependencies) If a user decreases the size of the heap memory allowed for Neo4j activities by changing the corresponding parameters in the *Memory Parameters Configuration Group*, then the user also needs to lower the size of cached JDK buffers by changing the Djdk.nio.maxCachedBufferSize parameter *in the JVM Parameters Configuration Group*. #### Dependency Graph 3 ![](https://i.imgur.com/56mGRwY.png) #### Explanation For Dependency Graph 3: (Intragroup dependencies) If a user decreases the size of the heap memory allowed for Neo4j activities, then the user also needs to decrease the amount of memory used by transactions. All the relevant parameters for this dependency are in the *Memory Parameters Configuration Group* ### Configuration Sets **High performance:** allocate as much amount of memory as possible to Neo4j and enable all possible network connections to Neo4j. This configuration can be applied when the developers expect a high volume of requests to Neo4j. **Low performance:** allocate as little amount of memory as possible to Neo4j and only enable necessary network connections to Neo4j. This configuration can be applied when the hardware is overheated. **Safety first:** only allow bolt connection and disable all other network connections. At the same time, Neo4j requires authentication and a private key for bolt connection. This configuration can be applied when the developers suspect that the safety of the network is compromised. ### Configuration Change Strategy All the parameters are located in the neo4j.conf file. Theoretically, users can configure these parameters however they would like by editing the neo4j.conf file, and Neo4j will just load the file when it starts. The default location of the file is illustrated by this [documentation](https://neo4j.com/docs/operations-manual/current/configuration/file-locations/#table-file-locations) Nevertheless, it is encouraged to set these configuration parameters according to the condition of the hardware hosting Neo4j. Also, it is encouraged to change one group of parameters at a time, so that it is easier to isolate which parameter change causes system failure or suboptimal performance during runtime. It is also possible to configure these parameters while Neo4j is running. Users need to type the corresponding commands into the cypher shell. For instance, user can type the following command into the cypher shell to set the transaction parameter ``` dbms.transaction.timeout=10s ``` However, it is not recommended to change some parameters while Neo4j is running. For instance, it is not recommended to change the memory parameters while Neo4j is still running since that change might lead to unexpected behavior or system failure. <!-- ## Performance and Scalability Perspective Since the community edition of Neo4j does not implement any useful metrics, the developers could only infer the performance of Neo4j using the log files, and this inference of performance only indicates if Neo4j has encountered any errors so far. Therefore, it is not feasible for us to extensively discuss the Performance and Scalability perspective in the operational view. [According to the official documentation of Neo4j, only the enterprise edition has implemented metrics.](https://neo4j.com/docs/operations-manual/current/monitoring/metrics/) -->

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully