You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory duplication when scaling ML models – any plan to support shared memory / copy‑on‑write? #83
First, thank you for plumber2 – it's a fantastic tool.
When scaling an API that serves a large ML model, each worker process loads its own full copy of the model. On Linux, a forking model (like RestRserve + Rserve) would allow copy‑on‑write sharing, drastically reducing memory usage and cloud costs.
I understand plumber2 is built on httpuv/libuv, which isn't fork‑safe. But is there any interest in:
an optional fork‑based backend (even experimental)?
helpers to load models into shared memory (e.g., via mmap)?
official guidance to delegate prediction to a separate forking service?
If not, I'll continue using workarounds. Just wanted to raise this as a real pain point for production ML in R.
Activity
jrosell commentedon Apr 19, 2026
Recently I learned about {morai} by @shikokuchuo but I didn't try yet.