Skip to content

feat: run lightning at cpu-8 (8 vCPU / 16 GiB) in dax benchmark#199

Open
rusenask wants to merge 1 commit into
computesdk:masterfrom
gridai:dax-lightning-cpu-8
Open

feat: run lightning at cpu-8 (8 vCPU / 16 GiB) in dax benchmark#199
rusenask wants to merge 1 commit into
computesdk:masterfrom
gridai:dax-lightning-cpu-8

Conversation

@rusenask

Copy link
Copy Markdown

What

Sizes the lightning provider to 8 vCPU / 16 GiB (cpu-8) in the dax benchmark, matching the standardized resource profile introduced in #196.

Why

Lightning was already in the dax matrix but had no resource sizing, so it ran on the SDK default cpu-1 (1 vCPU) while every other provider used 8 vCPU / 16 GiB — making its results incomparable (the same issue #196 fixed for the rest of the matrix).

How

Lightning can't be sized through DAX_RESOURCE_OPTIONS like most providers. The @computesdk/lightning wrapper applies instanceType from the provider factory config and overrides any instanceType passed to sandbox.create():

const params = { ...providerOptions, instanceType: config.instanceType ?? DEFAULT_INSTANCE_TYPE };

So sizing has to happen at createCompute time. This PR:

  • Reads LIGHTNING_INSTANCE_TYPE in createCompute (default cpu-1, the SDK default), mirroring how northflank reads its deployment plan from env with a fallback.
  • Sets LIGHTNING_INSTANCE_TYPE: cpu-8 in the dax workflow env, scoping the 8 vCPU sizing to the dax benchmark and leaving other modes (e.g. TTI) on the default.
  • Documents the mechanism in dax.ts (next to the existing E2B note) and env.example.

Verification

Ran the dax benchmark against lightning.ai with cpu-8:

lightning: 7/7 phases | total 41.93s | prepare 4.37s | clone 2.41s | install 12.91s | typecheck 16.04s (1/1 OK)

The sandbox reports 8 logical CPUs, confirming cpu-8 took effect, and all 7 dax phases complete.

🤖 Generated with Claude Code

@open-cla

open-cla Bot commented Jul 21, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

Lightning was in the dax matrix but had no resource sizing, so it ran on
the SDK default cpu-1 (1 vCPU) while other providers standardized to
8 vCPU / 16 GiB, making results incomparable.

Lightning's @computesdk/lightning wrapper sets instanceType from the
provider factory config and overrides any instanceType passed to
sandbox.create(), so it can't be sized through DAX_RESOURCE_OPTIONS like
most providers. Instead, read LIGHTNING_INSTANCE_TYPE in createCompute
(default cpu-1, the SDK default) and set it to cpu-8 in the dax workflow,
mirroring how northflank reads its plan from env with a fallback. This
scopes the 8 vCPU sizing to the dax benchmark and leaves other modes
(e.g. TTI) on the default.

Verified against lightning.ai: sandbox reports 8 logical CPUs, all 7
dax phases complete.
@rusenask
rusenask force-pushed the dax-lightning-cpu-8 branch from 33d0c60 to e7b2015 Compare July 23, 2026 18:11
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