-
-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Description
Hey,
I have noticed that when running an Axum/mlua backend on AWS Graviton hardware (t4g.medium to be exact), there's a steady increase in memory usage over time. The growth is proportional to req/s, and can be reproduced like the following:
static COUNTER: AtomicU64 = AtomicU64::new();
async fn lua_endpoint() -> impl IntoResponse {
let lua = Lua::new();
let x = COUNTER.fetch_add(1, Ordering::Relaxed);
let res: mlua::Value = lua.load(format("1+{x}")).eval().unwrap();
Ok((StatusCode::OK, json!({"res": res}))
}
//axum hello world goes here
When spamming that endpoint with e.g. oha
, I'm observing a catastrophic increase in memory usage (with malloc and jemalloc too), which doesn't seem to occur on x86_64.
Metadata
Metadata
Assignees
Labels
No labels