denoland / denoland/deploy_feedback

Metrics: Memory Usage stays ~170MB when idle but V8 heap drops to ~0

Open
#950 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Question

Is it expected that **process-level Memory Usage** stays flat (~170 MiB) during long idle periods (0 HTTP requests for several hours), while **V8 allocated heap size** drops to near zero in the same time range?

## Metrics screenshot (Last 24h)

![Deno Deploy metrics - Memory Usage flat at ~170 MiB while V8 heap drops to ~0 during idle period](https://github.com/user-attachments/assets/f2154643-63f4-4888-9500-73c1c1ec1dc9)

## Environment

- App: Deno Deploy, dynamic runtime
- `deno.json`: `deploy.runtime.memory_limit = 512`

## Observations (Last 24h Metrics dashboard)

During the **active** half of the window:

- HTTP req/min has spikes
- CPU Time has spikes
- V8 allocated heap fluctuates (up to ~500 MiB)
- Memory Usage fluctuates (~120–200 MiB)

During the **idle** half (confirmed by Logs: no application logs for hours):

- HTTP req/min = **0**
- CPU Time ≈ **0**
- V8 allocated heap ≈ **0**
- **Memory Usage stays flat at ~170 MiB** for the entire idle period

## What we checked

- Logs show **no requests** during the idle period (no application log output)
- [Runtime docs](https://docs.deno.com/deploy/reference/runtime/) say apps stop after 5s–10min without traffic
- Changelog mentions both **V8 heap metrics** and **process-level Memory Usage** as separate metrics

## Questions

1. When an isolate is fully stopped due to idle, should **Memory Usage** drop to 0 / stop reporting, similar to V8 heap?
2. If Memory Usage stays ~170 MiB while V8 heap is ~0 and requests are 0, does that mean:
- a warm process/isolate shell is still kept alive (native RSS baseline)?
- or the Memory Usage chart holds the last value / uses different aggregation during idle?
3. Is idle-time Memory Usage included in **memory-time (GB·h)** billing, or only periods when the isolate is actively running?

## Why it matters

Trying to understand whether ~170 MiB flat line during zero-traffic hours indicates real ongoing memory consumption vs. a metrics display artifact. V8 heap dropping to zero suggests application heap is released, but the flat Memory Usage line is confusing.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Runtime docs and the Last 24h Metrics dashboard, comparing the idle-period HTTP, CPU, V8 heap, and Memory Usage series. Check whether the reported flat process-level metric is documented as a warm-process baseline, chart aggregation behavior, or billable memory-time; done means providing a maintainer-confirmed explanation for both metric behavior and idle billing.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno
Domain
cloud, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.