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
-tpvalues to find an appropriate number that doesn’t result in memory errors.
How Anchor decides this limit, varies by operating system:
- For Windows, the
anchor.exelauncher will initially allocate 20% of the heap memory, subject to an upper limit of 80%.
- For Linux and MacOS, the
anchorbootstrap script (in the
bin/directory) has hardcoded values of
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.