Optimizations for Shared Hosting Environments

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Optimizations for Shared Hosting Environments

Post by rednoah »

If you are a tenant on a shared hosting multi-user environment, then you may need to manually configure JAVA_OPTS with the correct per-process or per-user resource limitations.



1. Limit RAM usage to 256 megabytes and CPU usage to 1 core:

Shell: Select all

export JAVA_OPTS="-Xmx256m -XX:ActiveProcessorCount=1"
filebot -script fn:sysinfo
:!: You may need to adjust these limits depending on your host and use case. Please ask your hosting provider for details on enforced resource limits.

:!: If you do not configure the resource limitations correctly, then the process may inherit the physical limitations of the machine (e.g. 128 cores, 512 GB memory, etc) and get killed at random depending on actual per-run resource usage.



2. Use flock to ensure that only 1 filebot process is running at any point in time:

Shell: Select all

flock ~/filebot.lock filebot -script fn:sysinfo
:idea: Please read the FAQ and How to Request Help.
Post Reply