Supabase Storage, ImgProxy & MinIO S3 Memory Tuning — SupaScale Docker Guide
Managed Supabase Pro bills $0.09/GB for uncached media egress plus per-origin image transform fees. SupaScale caps ImgProxy libvips arenas for flat-rate WebP/AVIF resizing.
SupaScale minimum floor: 8 GB RAM • Sweet-spot tier: 16 GB RAM (Public vendor rates retrieved 2026-11-12).
Decoding multiple 12 MP smartphone uploads concurrently causes darthsim/imgproxy (C libvips) to spawn multiple glibc malloc arenas—spiking RSS toward 1.8 GB+ if MALLOC_ARENA_MAX is left unset!
SupaScale Deterministic Memory Model Table: Supabase Storage, ImgProxy & MinIO S3 Memory Tuning
| Supabase Docker Subsystem | Baseline Idle Reserve | 50K MAU Projected Reserve | Memory Role |
|---|---|---|---|
| ImgProxy Default Uncapped glibc Arenas | 68 MB | 1,850 MB burst | OOM Spike Risk |
| ImgProxy Capped (MALLOC_ARENA_MAX=2, Conc=4) | 65 MB | 540 MB bounded | 70% Lower Peak |
| 2 TB Monthly Media Egress on Supabase Pro | 250 GB free | +$157.50/mo fee | $0.09/GB Metered |
| InterServer / Hostinger Bundled Transfer | Included | $0.00 overage | 8TB–30TB Quota |
SupaScale ImgProxy Arena Cap & S3 Storage Compose Override
services:
storage:
mem_limit: 512m
environment:
STORAGE_BACKEND: s3
GLOBAL_S3_BUCKET: supascale-media-prod
GLOBAL_S3_ENDPOINT: http://minio:9000
GLOBAL_S3_FORCE_PATH_STYLE: "true"
ENABLE_IMAGE_TRANSFORMATION: "true"
IMGPROXY_URL: http://imgproxy:5001
imgproxy:
mem_limit: 896m
environment:
IMGPROXY_CONCURRENCY: "4"
IMGPROXY_MAX_SRC_RESOLUTION: "25"
MALLOC_ARENA_MAX: "2"
1. Why SupaScale Enforces MALLOC_ARENA_MAX=2 on Every ImgProxy Container
Underneath its Go HTTP router, darthsim/imgproxy calls C libvips for fast image resizing. Under multi-core concurrency, GNU libc creates up to 8×CPU memory arenas and retains freed pages in process RSS. In our SupaScale override generator, setting MALLOC_ARENA_MAX=2 and IMGPROXY_CONCURRENCY=4 bounds peak memory predictably.
2. Local Bind-Mount Volumes vs MinIO S3 Object Storage in SupaScale Designs
Default self-hosted Supabase writes objects directly to ./volumes/storage. Once media libraries exceed 100 GB to 250 GB, we recommend switching STORAGE_BACKEND=s3 pointed at local MinIO on high-capacity InterServer Price-Lock storage slices for clean multipart uploads and rclone replication.
3. SupaScale Edge Caching Pattern for /storage/v1/render/image/ Endpoints
Place Cloudflare CDN cache rules or an Nginx proxy_cache volume in front of Kong public render endpoints so resized WebP/AVIF thumbnails are computed once and served from edge cache thereafter.
SupaScale Matched KVM & VDS Tiers for Supabase Storage, ImgProxy & MinIO S3 Memory Tuning
InterServer Price-Lock Storage & Ryzen Vault (S3 / MinIO + WAL Backups) — SupaScale
From $6/mo (~153k)
Ideal secondary MinIO S3 target + WAL archive vault or month-to-month Ryzen DB host.
Check InterServer Storage Vault Specs for Supabase Storage, ImgProxy & MinIO S3 Memory Tuning on SupaScale →Hostinger KVM NVMe VPS (1-Click Docker / Coolify + Supabase) — SupaScale
From $4.99/mo (~127k)
12–24 mo KVM 2 (8GB) or KVM 4 (16GB) locks lowest rate + stacks Extra 20% partner discount.
Compare Hostinger KVM VPS Options for Supabase Storage, ImgProxy & MinIO S3 Memory Tuning on SupaScale →SupaScale rate citation: Public vendor tariffs retrieved 2026-11-12; promotional and renewal prices change — verify exact checkout pricing before ordering.