Documentation Index
Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
Use this file to discover all available pages before exploring further.
This topic applies to Linux only.
/dev/shm when running in multiprocessing mode.
This functionality is intended for users running FRE in environments where the default shared memory mount is restricted or too small and cannot be changed, such as AWS Lambda, specific containers, or other managed Linux environments.
Overview
By default, FRE for Linux uses/dev/shm as the location for shared memory when running in multiprocessing mode. If the size of the shared memory mount is too small, this can lead to errors during processing. To work around this issue, you can configure FRE to use a custom tmpfs location that has sufficient space and can be resized as needed.
Use a custom tmpfs path when:
- Running FRE in AWS Lambda or similar environments
/dev/shmis too small and cannot be increased- Multiprocessing fails or is unstable due to shared memory limits
The custom tmpfs path is used only when multiprocessing is enabled:MultiProcessingMode =
Auto or Parallel
ProcessesCount > 1Configuring a custom location
There are two options for configuring a custom tmpfs location for FRE:- API
- INI File
API configuration
To configure a custom tmpfs location using the API, set theCustomTmpfsRootPath property of the MultiProcessingParams Object to the desired path, and then set the UseCustomTmpfsRootPath property to TRUE. For example:
INI file configuration
To configure a custom tmpfs location using an INI file, create an INI file and modify your source code to callLoadMultiProcessingParamsFromProfile() to load the settings from the INI file.
Add the following lines to the INI file:
Performance considerations
Changing the default tmpfs path may negatively impact performance, especially if the custom location is on a regular filesystem instead of a tmpfs mount. Use a tmpfs mount for the custom location whenever possible to maintain optimal performance and security. See Important Notes below for additional performance details.Important notes
-
The SDK does not validate the filesystem type.
FRE will use the path you provide without checking whether it is tmpfs.
If the path is not tmpfs:
- Files are written to disk instead of memory
- Processing becomes significantly slower
- Temporary data may persist on disk
-
You must mount tmpfs yourself and ensure it is mounted correctly. The size of the tmpfs mount can be adjusted using the
sizeoption when mounting. For example:If the mount is missing or misconfigured, FRE will still run but may behave incorrectly or inefficiently.Using a custom tmpfs path does not reduce the amount of memory FRE requires. - This change only redirects where shared memory is allocated. Memory limitations must still be managed through system configuration.
