Node limits and budgets
The memory plan, every bound on a Nova node, and what a client sees when one is reached.
Every buffer, cache, and population on a node has a bound, and reaching it makes callers wait or refuses them. Nothing grows without limit. Most bounds come from one place, the memory plan, which a node computes once at startup from its memory ceiling. This page lists the plan's figures, then every other bound with its flag and what happens at the limit. Backpressure explains why the bounds are arranged this way.
The memory plan
The node starts from its memory ceiling: --memory-ceiling, or three quarters of the container's memory limit. It takes away room for the garbage collector to grow the heap, half the ceiling at the default GOGC=100, then the fixed budgets: the write buffers, the caches, the queue window, and the process itself. The populations then share what is left, in order, each taking a share of what the one before it left:
- Held one-shot appends and queue sends take an eighth, at 24 KiB each, up to 8,192.
- Subscriptions take a quarter, at 28 KiB each, up to 16,384.
- Producer sessions take half, at 28 KiB each.
- The ingress budget for HTTP requests keeps the rest, and never less than its floor: 64 MiB, or four of the largest possible requests if that is more.
Each population gets at least 64, however small the node. The node logs the whole plan at startup. This is a node with a 6 GiB ceiling, an 8 GiB pod:
[INFO] novad: memory plan node_id=01a204ba-4d1b-719e-a6f2-418b9ac859f3 limit_bytes=0 ceiling_bytes=6442450944 gogc=100 gc_headroom_bytes=3221225472 admission_bytes=268435456 tail_cache_bytes=134217728 footer_cache_bytes=268435456 oneshots=8192 oneshot_cost_bytes=24576 oneshots_bytes=201326592 subscriptions=13019 subscription_cost_bytes=28672 subscriptions_bytes=373280768 sessions=19529 sessions_operator=0 session_cost_bytes=28672 sessions_bytes=559935488 queue_window_bytes=536870912 auth_cache_bytes=0 address_cache_bytes=16777216 connections_bytes=0 waiting_rooms_bytes=268435456 process_bytes=33554432 metadata_cache_bytes=0 ingress_bytes=559955968 ingress_floor_bytes=67108864 ingress_planned_bytes=559955968 overrun_bytes=0 maximal_request_bytes=7605616 override=false floored=false no_ceiling=false| Line | 8 GiB pod | What it is |
|---|---|---|
ceiling_bytes | 6 GiB | The memory ceiling |
gc_headroom_bytes | 3 GiB | Room for the heap to grow before a collection |
admission_bytes, waiting_rooms_bytes | 256 MiB each | Standard's write buffer, and one-shots waiting for room in it |
tail_cache_bytes | 128 MiB | Recent records kept for reads from the leader |
footer_cache_bytes | 256 MiB | Decoded object footers, for cold reads |
queue_window_bytes | 512 MiB | Queue messages read ahead of delivery |
address_cache_bytes, process_bytes | 16 MiB, 32 MiB | The address cache, and the process at rest |
oneshots, subscriptions, sessions | 8,192, 13,019, 19,529 | The population caps |
ingress_bytes | 534 MiB | HTTP request bytes the node reads and decodes at once |
The figures above come from a node with authentication off and the metadata store in memory. Other settings take their own lines first and leave the populations less:
| Line | Charged when | Effect |
|---|---|---|
auth_cache_bytes | The node verifies tokens | 16 MiB; on an 8 GiB pod, 12,873 subscriptions and 19,309 sessions |
connections_bytes | --fleet-listen is set | 96 KiB for each connection the listener caps allow: 576 MiB at the defaults. Measured on an 8 GiB pod: 5,546 one-shots, 8,320 subscriptions, 12,480 sessions |
metadata_cache_bytes | The node embeds oxia | Oxia's cache |
| An Express class | Express buckets are set | Its write buffer, waiting room, and fan-out buffer |
| Pod memory | Ceiling | One-shots | Subscriptions | Producer sessions | Ingress |
|---|---|---|---|---|---|
| 4 GiB | 3 GiB | 426 | 640 | 64 | 64 MiB, its floor |
| 8 GiB | 6 GiB | 8,192 | 13,019 | 19,529 | 534 MiB |
| 16 GiB | 12 GiB | 8,192 | 16,384 | 74,020 | 2,024 MiB |
On a 16 GiB pod that verifies tokens, the sessions are 73,728. On a 4 GiB pod, the fixed budgets fill what the collector's room leaves, and the node warns at startup:
[WARN] novad: memory plan leaves the ingress budget only its floor, 13877248 bytes past the ceiling: the standing budgets fill what the GC headroom leaves of it, so lower them or raise the ceilingLower --footer-cache-mib, --tail-window-cache-mib, or the queue window, or give the node more memory. Three flags change the plan directly:
Populations and requests
| Bound | Default | Set by | At the limit |
|---|---|---|---|
| Producer sessions per node | The plan's | --max-producer-sessions lowers it | ResourceExhausted "producer sessions at the cap"; HTTP 429 |
| Subscriptions per node | The plan's, at most 16,384 | The plan | ResourceExhausted "subscriptions at the cap" |
| One-shot appends and queue sends held per node | The plan's, at most 8,192 | The plan | Refused before the body is read: ResourceExhausted "busy, retry", with when to retry; nothing was appended |
| HTTP request bytes read and decoded at once | The plan's ingress budget | --ingress-budget-mib | The request waits for room; one without its own deadline waits up to --ingress-max-wait (30 s) |
| An HTTP request body that stops sending | 10 s | --ingress-progress | The body is cut off |
| Unacknowledged bytes in one session | 48 MiB Standard, 8 MiB Express | --session-window-standard-mib, --session-window-express-mib; a producer can ask for less | The producer waits; the node reads no further frames |
| Unacknowledged batches in one session | 1,024 | --session-max-batches | The producer waits |
| One append batch | 1 MiB and 1,000 records | --max-batch-bytes, --max-batch-records | The batch is refused whole, before it waits for anything |
| One record | 1 MiB | --max-record-bytes | The batch is refused |
| One gRPC message | One batch plus 1 MiB | --max-batch-bytes | ResourceExhausted, unread |
| One read response | 8 MiB, 8,192 records | --max-read-bytes, --max-read-records | The page returns short; one record is always served |
| Client connections, with a fleet listener | 4,096, and 512 from one address | --max-client-connections, --max-client-connections-per-address | Closed at accept |
| Fleet connections | 2,048; 256 not yet showing a credential, 8 of those from one address | --max-fleet-connections, --max-fleet-unproven-connections, --max-fleet-unproven-per-address | Closed at accept; past the unproven cap, one unproven connection is evicted |
| gRPC receive window per stream | 64 KiB | --grpc-stream-window-kib | The sender waits on that stream |
| Placement capacity across the cluster | Every node saturated or draining | Add nodes | ResourceExhausted; the SDK retries within its budget |
Without a fleet listener, one listener serves everyone and the client connection caps are off.
To see how close a node runs to these bounds, compare nova_dataplane_sessions with nova_dataplane_sessions_limit, nova_ingress_reserved_bytes with nova_ingress_limit_bytes, and nova_listener_connections with nova_listener_limit. Refusals are counted in nova_dataplane_shed_total, nova_ingress_refused_total, and nova_listener_shed_total, each by reason.
Write, read, and cleanup budgets
| Budget | Flag | Default | Bounds | At the limit |
|---|---|---|---|---|
| Standard write buffer | --s3-memory-buffer-mib | 256 MiB | Append bytes from decode until acknowledgement | Appends wait; the transport stops reading frames, so producers feel it through gRPC flow control |
| Standard backlog | --s3-wal-backlog-flights | 1,024 flights | Acknowledged writes waiting to be indexed in metadata | Appends wait; each stall is counted with its cause |
| Express WAL | Fixed | 256 MiB pool; 1,024 flights or 4 GiB of backlog | The same, for Express | Appends wait |
| Express fan-out buffer | --s3-express-memory-buffer-mib | 32 MiB | Bytes the Express fan-out store buffers | Admission waits |
| Tail window cache | --tail-window-cache-mib | 128 MiB | Recent acknowledged records kept for reads, across classes | The oldest is evicted; a miss reads object storage |
| Footer cache | --footer-cache-mib | 256 MiB | Decoded object footers | The oldest is evicted; a miss fetches the footer again |
| Queue window | Set by the embedder | 512 MiB a node, 8 MiB a range | Queue messages read ahead of delivery | Read-ahead waits |
| Auditor requests | --auditor-s3-budget | 50 a second | Object-store requests per auditor | Jobs wait; the due age grows |
| Auditor rewrites | --auditor-rewrite-mib | 64 MiB a second | Bytes rewrites move through the node | Rewrites wait |
| Auditor deletes | --auditor-delete-budget | 1,000 keys a second | Deletes per bucket, shared by every auditor | Deletes wait |
| Auditor reads | --auditor-read-budget, --auditor-read-concurrency | 10,000 a second; 64 open | Reads per bucket, shared; reads one auditor holds open | Reads wait |
| Auditor workers | --auditor-workers | 2 | Concurrent cleanup jobs | Jobs queue |
| Fetch cache | --auditor-fetch-cache-dir, --auditor-fetch-cache-mib | Off; 40,960 MiB once a directory is set | Scratch disk for whole-object downloads during denorm | A read the cache cannot admit uses a ranged GET |
Watch the write buffer in nova_direct_pending_bytes against nova_direct_pending_limit_bytes, and the backlog in nova_wal_backlog_flights and nova_wal_backlog_age_seconds. The auditor's limits leave work in its queues until there is room. Watch the queues' due age, nova_auditor_due_age_seconds, not their rates; see the auditor. The queue bounds an embedder sets, such as 512 work sessions a node and 1,024 unspent credits a session, are in Queue node bounds.
Read plans and the Gateway
| Bound | Default | Set by | At the limit |
|---|---|---|---|
| A read plan's life: presigned URL expiry, and a raw fetch's | 5 minutes | Half of --auditor-read-grace (10 minutes) | A plan never outlives the grace before an object is deleted |
| The Gateway's fetch bytes in flight | 64 MiB | novagateway --fetch-inflight | Responses wait their turn |
| The Gateway's footer cache | 32 MiB | novagateway --footer-cache-bytes | The oldest entry is evicted |
| The Gateway's load on one cache instance | 1.25 times the mean | novagateway --object-cache-load-factor | A hot key spills to the next instance |
Watch the Gateway's fetch budget in nova_gateway_fetch_inflight_bytes against nova_gateway_fetch_limit_bytes, and the time a fetch waits for it in nova_gateway_fetch_wait_seconds.