Troubleshooting
Image processing is often resource-heavy and computational demanding. Anchor runs jobs in parallel, and issues often arise.
Here are some tips to resolve common issues.
Limiting parallel CPU cores
By default, Anchor uses all-except-once available CPU cores to execute operations in parallel.
Some tasks require more memory than others. For a particular task, there can be insufficient available memory to facilitate so much parallelism, especially if a computer has many processors.
It is then recommended to reduce the number of cores, by setting an explicit maximum with the -tp command-line option.
e.g. to permit *no more than 4 cores in parallel:
anchor -t resize -tp 4
-tp
values to find an appropriate number that doesn’t result in memory errors.Memory allocation
Anchor is a Java program that executes in a Java Virtual Machine (JVM). A JVM requires an explicit initial and maximum memory allocation.
How Anchor decides this limit, varies by operating system:
- For Windows, the
anchor.exe
launcher will initially allocate 20% of the heap memory, subject to an upper limit of 80%. - For Linux and MacOS, the
anchor
bootstrap script (in thebin/
directory) has hardcoded values of-Xms500m -Xmx16000m
.
The user is recommended to adjust the latter as makes sense.
For Windows, no adjustment is currently possible at runtime to the anchor.exe
loader, but as a fallback, consider starting Anchor in the traditional way using the java
command-line application, similar to the Linux/MacOS script.