Imaging V3 - memory


Overview

Out of the box Neo4j - the graph database system used to power the CAST Imaging results - is set to use 8GB of RAM memory (JVM heap, initial and maximum).

This configuration is a value that is designed to work in most situations, however, it may not be enough for your use case. In general, a sure sign that you need to modify the amount of RAM memory allocated to Neo4j is when objects fail to load in the results - particularly if there are a large number of objects to display - this is because the query used to fetch the objects for display is not completing before a timeout occurs. This timeout will manifest itself as a 504 (gateway timeout) error in the browser. Allocating additional RAM to Neo4j can help reduce the time required to complete the query.

{{< alert color="info" >}}You can read more about Neo4j memory usage in https://neo4j.com/docs/operations-manual/current/performance/memory-configuration.{{< /alert >}}

Step 1 - Edit the neo4j.conf file

Locate the following file depending on your operating system:

{{< tabpane text=false >}} {{< tab header="Microsoft Windows" >}}%PROGRAMDATA%\CAST\Imaging\CAST-Imaging-Viewer\setup-config\neo4j\neo4j.conf{{< /tab >}} {{< tab header="Linux via Docker" >}}/opt/cast/installation/imaging-viewer/neo4j/configuration/neo4j.conf{{< /tab >}} {{< /tabpane >}}

Edit the file, update the following entries as required by your environment and then save the file:

dbms.memory.heap.initial_size=8G
dbms.memory.heap.max_size=8G

Step 2 - Run the update script (Microsoft Windows only)

Run the following command (from a CMD window with elevated permissions (right click, Run as administrator)) to ensure that the service is updated with the new configuration:

%PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Viewer\neo4j\bin neo4j windows-service update

Step 3 - Restart services

Finally, restart the following services/containers to ensure your changes are taken into account:

Microsoft Windows service Linux via Docker container
  • CAST Imaging Viewer Neo4j Graph DB
  • neo4j
Note: Please refer to the original article at https://doc.castsoftware.com/administer/neo4j/memory/.
Have more questions? Submit a request

Comments

Powered by Zendesk