Summary: some tips/changes to make to improve the performance of your CAST Imaging instance.


CAST Imaging is a CPU and RAM intensive application, and this is especially true if you are importing large and complex applications. The following page lists some configuration changes that may help improve performance of CAST Imaging while importing and investigating applications.

Display performance

Optimize RAM allocated to CAST Imaging

By default Neo4j is set to use the following RAM:

CAST Imaging ≥ 2.5.0 8GB of RAM memory (initial and maximum)
CAST Imaging ≤ 2.4.x 3GB of RAM memory (initial and maximum)

If you are facing performance issues, it is possible to increase the RAM allocated to CAST Imaging - you can also run a memory test to provide you with suggested RAM allocation based on the total amount of RAM available on the host. See Optimize Neo4j memory allocation.

Optimize Neo4j disk usage - transaction log retention

By default Neo4j is set to retain transaction logs (used for database backup operations) for 7 days, however, transaction logs can grow significantly in size, increasing the overall size of the graph.db file and therefore reduce overall performance. If you are facing disk space/performance issues due to the size of the graph.db file, you can change the transaction log retention time. See Optimize Neo4j disk usage - transaction log retention.

Display preferences

See the options Node Limit / Edge Limit in Configuring display preferences to set the rendering threshold for nodes/edges.

Import application performance

Import batch size

Some applications can be very large and therefore can take a significant amount of time to import into CAST Imaging. During the application data import process (see Export and import the Application data), CAST Imaging is configured to import data in a batch of 1000 rows and then perform a commit. If you have allocated additional memory to Neo4j (see Optimize Neo4j memory allocation) it is possible to increase the default import batch size so that data commits are performed less, therefore increasing overall import performance. See Configuring import batch size.

Required disk space

The data import action is a multi-step process that requires free disk space to function correctly. The amount of free disk space required is directly proportional to the size of the application that is being imported into CAST Imaging - i.e. the larger the application, the more free disk space is required. The process is as follows:

  • An application import is started by the user, either by uploading an existing ZIP file in the UI, directly from Console as part of the analysis process, or using ETL tools.
  • the ZIP file (containing the data exported from the CAST schema where the application analysis results are stored) is first uploaded to the %TEMP%  or /tmp folder if it is larger than 32 MB (if it is smaller, this step is skipped)
  • the ZIP file is then extracted to %PROGRAMDATA%\CAST\ImagingSystem\Neo4j_data\import\neo4j and removed from %TEMP%  or /tmp (if it exists there)
  • Data from the extracted ZIP file is then inserted into the Neo4j database.
  • Following a successful insert into the database:
    • the extracted ZIP file data in %PROGRAMDATA%\CAST\ImagingSystem\Neo4j_data\import\neo4j is removed
    • the ZIP file is moved to %PROGRAMDATA%\CAST\ImagingSystem\Neo4j_data\import\neo4j\archive and retained.

Given the process above, and given an application of approximately 1GB when compressed into the ZIP file, the following free disk space is required:

  • temporarily at least 1GB free on the disk where %TEMP%  or /tmp is located (to store the file ZIP)
  • temporarily at least 1GB free on the disk where %PROGRAMDATA% is located (to store the file ZIP) + ~10x the size of the ZIP file for extraction depending on the compression used (e.g. 1GB ZIP to 10GB extracted).
  • permanently at least 1GB free on the disk where %PROGRAMDATA% is located to store the imported ZIP in the "archive" folder
  • permanently at least 1GB free for the storage in the Neo4j database.

If the disk where CAST Imaging is installed does not have sufficient free disk space, then the import action will fail and the following message will be logged:

ERROR FileUploadHandler: cannot read the filename error=multipart: NextPart: bufio: buffer full

In this situation you should ensure that your disk has sufficient free space in the following location:

  • the disk where  %TEMP%  or /tmp is located
  • the disk where Neo4j_data\import\neo4j\archive is located

Export application performance

PostgreSQL on Microsoft Windows

If you are attempting to export from a PostgreSQL instance installed on Microsoft Windows (i.e. CAST Storage Service) and your application is very large, you may find that the export process fails with an error which is caused by a timeout. To resolve this issue, see the section "[WinError 10054] An existing connection was forcibly closed by the remote host" in Automation tool export and import process and Export the CSV data.