Skip to content

flashbox-l1: trim lighthouse resource footprint via flags#162

Draft
MoeMahhouk wants to merge 1 commit into
mainfrom
moe/flashbox-l1-lighthouse-resource-flags
Draft

flashbox-l1: trim lighthouse resource footprint via flags#162
MoeMahhouk wants to merge 1 commit into
mainfrom
moe/flashbox-l1-lighthouse-resource-flags

Conversation

@MoeMahhouk

Copy link
Copy Markdown
Member

The L1 beacon node only needs to drive the searcher's EL via the Engine API (forkchoice). It has no attached validators, serves no REST consumers, proposes no blocks, and does not need to serve historical state/blobs or light-client data to peers. Tune flags to that reality.

Add to lighthouse.service ExecStart:

  • --target-peers 50: default is 200; the node only follows head, so cut gossip-validation CPU, bandwidth, and per-connection memory while keeping a healthy head-following margin.
  • --disable-light-client-server: LC server is on by default; we don't serve light clients.
  • --disable-upnp: no UPnP gateway exists in the TEE/cloud environment.
  • --hdiff-buffer-cache-size 1: default 16; each buffer ~ one BeaconState and is irrelevant for a pruning node, so cap the RAM ceiling.
  • --epochs-per-migration 4: default 1; batch hot->cold migration to reduce disk writes.
  • --prune-payloads true / --prune-blobs true: already the v8.1.3 defaults, set explicitly to document the minimal-footprint intent.

Left --beacon-processor-max-workers at default so it auto-scales to the CVM's vCPU budget (a deploy-time decision, not baked into the image).

Verified against a locally-built lighthouse v8.1.3 (the version pinned in mkosi.build): the exact full ExecStart is accepted by clap and boots into runtime. End-to-end Engine API drive was not exercised.

The L1 beacon node only needs to drive the searcher's EL via the Engine
API (forkchoice). It has no attached validators, serves no REST consumers,
proposes no blocks, and does not need to serve historical state/blobs or
light-client data to peers. Tune flags to that reality.

Add to lighthouse.service ExecStart:
- --target-peers 50: default is 200; the node only follows head, so cut
  gossip-validation CPU, bandwidth, and per-connection memory while keeping
  a healthy head-following margin.
- --disable-light-client-server: LC server is on by default; we don't serve
  light clients.
- --disable-upnp: no UPnP gateway exists in the TEE/cloud environment.
- --hdiff-buffer-cache-size 1: default 16; each buffer ~ one BeaconState and
  is irrelevant for a pruning node, so cap the RAM ceiling.
- --epochs-per-migration 4: default 1; batch hot->cold migration to reduce
  disk writes.
- --prune-payloads true / --prune-blobs true: already the v8.1.3 defaults,
  set explicitly to document the minimal-footprint intent.

Left --beacon-processor-max-workers at default so it auto-scales to the
CVM's vCPU budget (a deploy-time decision, not baked into the image).

Verified against a locally-built lighthouse v8.1.3 (the version pinned in
mkosi.build): the exact full ExecStart is accepted by clap and boots into
runtime. End-to-end Engine API drive was not exercised.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant