Dyno Memory Behavior
Last updated December 03, 2024
Table of Contents
Memory Behavior
The maximum amount of RAM available to your application depends on the dyno size you use. The dyno manager restarts your dyno and logs an R15 error when the memory usage reaches the following limits for each dyno size.
For Cedar-Generation Apps
- Eco, Basic or Standard-1X dyno: 1 GB, two times its quota.
- Standard-2X dyno: 2 GB, two times its quota.
- Performance-M dyno: 5 GB, two times its quota.
- Performance-L dyno: 28 GB, two times its quota.
- Performance-L-RAM dyno: 36 GB, 1.2 times its quota.
- Performance-XL dyno: 74 GB, 1.2 times its quota.
- Performance-2XL dyno: 151 GB, 1.2 times its quota.
- Private-S or Shield-S dyno: its quota of 1 GB.
- Private-M or Shield-M dyno: its quota of 2.5 GB.
- Private-L or Shield-L dyno: its quota of 14 GB.
- Private-L-RAM or Shield-L-RAM dyno: its quota of 30 GB.
- Private-XL or Shield-XL dyno: its quota of 62 GB.
- Private-2XL or shield-2XL dyno: its quota of 126 GB.
For Fir-Generation Apps
- 1X-Classic: its quota of 500MB
- 2X-Classic: its quota of 1GB
- 1X-General: its quota of 4GB
- 2X-General: its quota of 8GB
- 4X-General: its quota of 16GB
- 8X-General: its quota of 32GB
- 16X-General: its quota of 64GB
- 1X-Compute: its quota of 4GB
- 2X-Compute: its quota of 8GB
- 4X-Compute: its quota of 16GB
- 8X-Compute: its quota of 32GB
- 16X-Compute: its quota of 64GB
- 1X-Memory: its quota of 8GB
- 2X-Memory: its quota of 16GB
- 4X-Memory: its quota of 32GB
- 8X-Memory: its quota of 64GB
- 16X-Memory: its quota of 128GB
Using a dyno size that’s too small can cause constant memory swapping, which degrades application performance. Application metrics data, including memory usage, is available via the Metrics
tab of the Heroku Dashboard. You can also measure memory with log-runtime-metrics. Memory leaks in your app can also cause usage problems. If you suspect a memory leak, try using memory profiling tools.
Swap isn’t available on all dynos in Private Spaces or Fir Private Spaces, for example. Private-M. Dynos that vastly exceed their memory quota typically emit R15 errors without using swap space. Instead, the platform kills processes consuming large amounts of memory, but may not kill the dyno itself.
Using small amounts of swap space and infrequent memory swapping are usually not problematic. Even when your application hasn’t reached its memory limit, it’s common to see small amounts of memory being swapped to disk as the operating system manages memory and available disk cache.