Skip to content

target-snapshot schema

target/snapshot-pre.json and target/snapshot-post.json: the target workload and each upstream, read-only, before and after the load. The two files share this schema and differ in phase.

Schema file: schema/json/bundle/target-snapshot.schema.json. Generated from servtuner commit 5b46cdad0e5c.

Field Type Required Description
phase snapshotPhase Yes
captured_at utcTimestamp Yes
workloads array of workload Yes at least 1 item

Type: "pre", "post"

Type: "target", "upstream"

Kubernetes resource quantities by resource name, for example cpu, memory, nvidia.com/gpu.

Type: map of string

An environment variable. A redacted one carries no value: a run never stores a secret.

Type: object or object

Field Type Required Description
name string Yes
image string Yes
image_digest string No The resolved digest, from the pod’s container status. pattern ^sha256:[0-9a-f]{64}$
args array of string No
env array of envVar No
requests resourceQuantities No
limits resourceQuantities No
restart_count integer No ≥ 0
last_termination_reason string No For example OOMKilled.
Field Type Required Description
name string Yes
node string No
containers array of container Yes at least 1 item
Field Type Required Description
desired integer Yes ≥ 0
ready integer Yes ≥ 0

Labels of a node the workload runs on (instance type, GPU model).

Field Type Required Description
name string Yes
labels map of string Yes
Field Type Required Description
type string Yes
name string Yes
target string Yes Target value as Kubernetes prints it.

HorizontalPodAutoscaler of the workload. min_replicas <= max_replicas is not expressible here and is a servtuner validate rule.

Field Type Required Description
name string Yes
min_replicas integer Yes ≥ 0
max_replicas integer Yes ≥ 0
current_replicas integer Yes ≥ 0
metrics array of hpaMetric No

What the workload reports about itself.

Field Type Required Description
version string No As the workload reports it, for example vLLM /version.
models array of string No Model ids from /v1/models.
cache_config map of string No vLLM cache_config_info labels.

Hardware the results are scoped to. Requires the accelerator (or none) and the node instance type or the CPU model; fields that cannot be read are omitted.

Field Type Required Description
hardware_profile_id string No Hash of the other fields.
accelerator string Yes GPU model, or none when the workload has no accelerator.
gpu_count_per_pod integer No ≥ 0
gpu_memory_bytes integer No ≥ 0
gpu_interconnect "nvlink", "pcie" No
driver_version string No
cuda_version string No
node_instance_type string No The cloud instance type, or local.
cpu_model string No
cpu_cores integer No ≥ 0

Exactly which fields are allowed together is restricted further by the schema.

Field Type Required Description
role workloadRole Yes
upstream_index integer No Position in the RunSpec’s target.upstreams; present only when role is upstream. ≥ 0
target_type targetType Yes
pods array of pod Yes
replicas replicas No
nodes array of node No
hpa hpa No
target_info targetInfo No
hardware_profile hardwareProfile No