Dynamic runtime limits
The following resource limits apply to each Magic Containers application running on the dynamic runtime:- CPU: 8 CPUs
- Memory: 32 GiB
- Network ingress: 1 Gbps
- Network egress: 1 Gbps
- Ephemeral storage: 10 GB
Persistent volume limits
The following I/O limits are defined in the pod cgroup and apply to each persistent volume individually. If a pod has multiple volumes attached, each volume receives these limits:- Read throughput: 10 MB/s
- Write throughput: 10 MB/s
Once an application consumes 10 GB of ephemeral storage, the container/pod will be evicted and automatically restarted. Any data stored in ephemeral storage is lost during this process.
CPU core detection
While Magic Containers allocates 8 CPUs worth of CPU time to each pod, applications running inside the container may still detect the total number of CPU cores available on the host machine (which can be 32 or more cores). This can lead to suboptimal performance because many applications automatically spawn threads based on the detected CPU count, resulting in excessive thread contention when only 8 CPUs worth of processing time is actually available.Symptoms of incorrect CPU detection
- Application performance is significantly slower than expected
- CPU utilization appears low despite the application being busy
- Multi-threaded workloads (encoding, compilation, etc.) perform worse than on less powerful machines
Optimizing multi-threaded applications
To achieve optimal performance, configure your applications to use 8 threads or fewer. Below are examples for common use cases.FFmpeg video encoding
FFmpeg and its video encoders may auto-detect the host’s CPU count and spawn too many threads. Here’s how to configure different encoders for optimal performance on Magic Containers: x265 (HEVC) encoding Create a wrapper script/usr/local/bin/ffmpeg-x265-optimized:
General thread configuration
For other applications, look for thread or worker count configuration options and set them to 8 or fewer. Common environment variables and settings include:OMP_NUM_THREADS=8- OpenMP applicationsGOMAXPROCS=8- Go applicationsUV_THREADPOOL_SIZE=8- Node.js applications--workers=8or-j8- Various CLI tools
Port Limits
Our platform applies default restrictions to inbound and outbound traffic on the following ports: 25, 465, 587, and 2525. This is to maintain a secure environment and prevent unauthorized mail relay.If your application requires any of these ports to be opened, contact our support team for assistance. They will review and enable the necessary configurations to ensure your application functions correctly.
Account-level limits
Standard accounts
By default, the following limits apply to each standard (non-trial) account on the Magic Containers platform:- Number of applications per account: 10.
- Number of regions per application: No limit (all available regions).
- Number of instances/pods per region per application: Up to 10.
- Number of persistent volumes per application: 2.
- Maximum persistent volume size: 100 GB.
Trial accounts
If you are on a trial account, additional restrictions apply:- Credit card information is required.
- Number of applications per account: 10
- Number of regions per application: 5
- Number of instances/pods per region per application: 2
- Number of persistent volumes per application: 1.
- Maximum persistent volume size: 30 GB.