Memory management
Due to the relatively large size of images compared to other data, the high number of images, and the limitations in available system memory, it is important to keep an eye on how much is used by JIPipe.
Computers have three main memory types:
Hard drive (HDD) space / SSD space
System memory (RAM)
Graphics card memory (vRAM)
If you run out of memory in one of these categories, you will experience problems like crashes and slowdowns.
Preventing HDD/SSD space issues
While most modern PCs are equipped with sufficient hard drive space, you still may want to regularly remove temporary files left behind by JIPipe workflows.
If you save a project into a directory and execute it in any form, you will notice a JIPipe.tmp.dir directory next to the project file.
This directory contains various files that JIPipe uses to execute workflows. And while JIPipe usually automatically removes unnecessary files, some may be left behind for various reasons, for example if a workflow crashes.
It is thus a good idea to regularly remove such directories if you are sure that JIPipe is currently not running.
Monitoring RAM usage
The available random access memory (RAM) of a PC is usually considerably lower than the available disk space. For example, current consumer PCs have over 1TB HDD space, but may only have up to 16GB RAM.
JIPipe and all other programs use the RAM to store data. This includes the memory cache results produced by nodes.
We highly recommend to monitor how much RAM JIPipe is utilizing via the dedicated UI at the bottom right:
If the bar reaches nearly 100%, JIPipe will slow down or may crash.
You can prevent this by following a few tips:
Avoid using Cache immediate results for larger batch processing pipelines or use it strategically. You can use on an earlier step to "stop" the function from propagating to the beginning.
JIPipe's way of batch processing makes it susceptible to unnecessarily using large amounts of memory for batch processing tasks. Use graph partitions to create loops.
You can also split up your data yourself and run it in batches if you do not want to use graph partitions.
Monitoring vRAM usage
JIPipe itself does not actively allocate memory space on your graphics card. This is usually done by third-party tools, especially ones that are related to AI/deep learning (e.g., Cellpose) if they are running in GPU mode.
As the monitoring of vRAM is not trivial (especially as there may be multiple GPUs), JIPipe currently does not provide any interface to track the allocated memory.
Please research the appropriate tools for your operating system (e.g., nvidia-smi
for Linux and the task manager for Windows).