RunSpec
One benchmark run: what to test, how to load it and what to record.
Schema file: schema/json/runspec.schema.json. Generated from servtuner commit 5b46cdad0e5c.
Top level
Section titled “Top level”| Field | Type | Required | Description |
|---|---|---|---|
apiVersion |
"servtuner.dev/v1" |
Yes | |
kind |
"RunSpec" |
Yes | |
name |
string |
Yes | DNS-label style run name. at most 63 characters; pattern ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ |
experiment |
string |
No | Optional grouping of runs that are compared. |
labels |
map of string |
No | Default: {}. |
knobs |
map of knobValue | No | The variables being compared, keyed like “vllm.max_num_seqs”. Default: {}. |
target |
target | Yes | |
engine |
engine | Yes | |
workload |
workload | Yes | |
workload_preset |
presetRef | No | |
load |
load | Yes | |
slos |
slos | No | |
prometheus |
prometheus | No | |
analysis |
analysis | No | |
storage |
storage | No |
Definitions
Section titled “Definitions”knobValue
Section titled “knobValue”A knob is a string, number or boolean.
Type: string or number or boolean
secretRef
Section titled “secretRef”Names a Kubernetes Secret. Secrets are never inlined.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes |
secretKeyRef
Section titled “secretKeyRef”Names one key of a Kubernetes Secret.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
key |
string |
Yes |
tlsMtls
Section titled “tlsMtls”mtls: present a client certificate from the named kubernetes.io/tls Secret and verify the server.
| Field | Type | Required | Description |
|---|---|---|---|
mode |
"mtls" |
Yes | |
secretRef |
secretRef | Yes |
tlsPlatform
Section titled “tlsPlatform”platform: plain HTTP, encryption asserted by the platform. Carries no certificate settings.
| Field | Type | Required | Description |
|---|---|---|---|
mode |
"platform" |
Yes |
tlsServer
Section titled “tlsServer”tls: server-authenticated TLS. Verify the server against the system pool plus SSL_CERT_FILE, and the optional ca.crt of caSecretRef; present no client certificate, so there is no secretRef.
| Field | Type | Required | Description |
|---|---|---|---|
mode |
"tls" |
Yes | |
caSecretRef |
secretRef | No | A Secret whose ca.crt is the private CA that signed the server certificate. Only ca.crt is read. |
Transport security of one connection, discriminated by mode. Required wherever it appears: the mode is never inferred.
Type: tlsMtls or tlsPlatform or tlsServer
workloadSelector
Section titled “workloadSelector”Kubernetes workload of the target, used for the config and resource snapshot.
| Field | Type | Required | Description |
|---|---|---|---|
namespace |
string |
Yes | |
selector |
map of string |
Yes |
upstream
Section titled “upstream”A backend behind a router target. Its tls is required: the mode of a call to an upstream endpoint is never inferred.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
endpoint |
string |
No | pattern ^https?:// |
workload |
workloadSelector | No | |
type |
targetType | No | What the upstream runs, which picks its adapter. Absent means openai-compatible. |
tls |
tls | Yes |
target
Section titled “target”| Field | Type | Required | Description |
|---|---|---|---|
type |
targetType | Yes | |
endpoint |
string |
Yes | pattern ^https?:// |
model |
string |
Yes | |
auth |
object |
No | |
admin |
object |
No | Credential for the target’s config API (for example Bifrost’s /api/config behind auth_config), when it differs from auth. A reference by name; the value is never in the RunSpec. |
workload |
workloadSelector | No | |
hardware |
declaredHardware | No | |
metrics |
targetMetrics | No | |
upstreams |
array of upstream | No | Default: []. |
tls |
tls | Yes |
engine
Section titled “engine”| Field | Type | Required | Description |
|---|---|---|---|
type |
engineType | Yes | |
version |
string |
No | “pinned” means the version pinned in the bench image. Default: "pinned". |
options |
object |
No | Engine-native passthrough (escape hatch). Default: {}. |
shards |
integer |
No | loadgen only: the number of bench processes (pods under the Kubernetes runner) that share the load. Each offers rate / shards; shard 0 leads, merges the others’ records and analyses. Absent means 1. ≥ 1; ≤ 32 |
sharedPrefix
Section titled “sharedPrefix”Every prompt starts with one of groups fixed prefixes of tokens tokens (a shared system prompt), so a prefix cache sees real reuse inside a run. input_tokens is the whole prompt, prefix included, so its mean must exceed tokens. Not with conversation or the embeddings api.
| Field | Type | Required | Description |
|---|---|---|---|
tokens |
integer |
Yes | Length of each shared prefix, in tokens. ≥ 1 |
groups |
integer |
Yes | How many different prefixes; each request uses one, chosen by the seed. ≥ 1 |
tokenDistribution
Section titled “tokenDistribution”| Field | Type | Required | Description |
|---|---|---|---|
mean |
number |
Yes | > 0 |
stddev |
number |
No | ≥ 0 Default: 0. |
dataset
Section titled “dataset”| Field | Type | Required | Description |
|---|---|---|---|
type |
datasetType | Yes | |
input_tokens |
tokenDistribution | Yes | |
output_tokens |
tokenDistribution | Yes | |
shared_prefix |
sharedPrefix | No | |
padding_bytes |
integer |
No | Filler text appended to every prompt, beyond input_tokens, so each request body grows by about this many bytes. For payload-size experiments against routers; the filler counts toward the reported input tokens. ≥ 0 Default: 0. |
workload
Section titled “workload”The request mix. Either a preset (“preset”: “name@version”), which supplies the dataset, conversation and api, or those fields written out; never both, so a preset name always means one exact workload. bench expands a preset when it resolves the spec. streaming is required either way, and seed may accompany a preset. api has a default that the generated types write back, so the schema cannot forbid it beside a preset; bench rejects an api that differs from the preset’s.
| Field | Type | Required | Description |
|---|---|---|---|
preset |
presetReference | No | A workload preset, name@version (schema/presets). Mutually exclusive with dataset and conversation; an api must match the preset’s. |
api |
workloadApi | No | Default: "chat". |
streaming |
boolean |
Yes | Required, not defaulted: go-jsonschema cannot round-trip an explicit false over a default of true. |
dataset |
dataset | No | |
seed |
integer |
No | Default: 0. |
conversation |
conversation | No |
| Field | Type | Required | Description |
|---|---|---|---|
rate |
number |
Yes | Offered requests per second. > 0 |
duration |
duration | Yes | |
is_burst |
boolean |
No | A burst probe (Assumptions): kept out of the capacity ladder and exempt from the minimum stage length, it checks the recommended queue (C + B) against a short step above the operating load. Its in-flight peak comes from the client’s records, not Prometheus. Absent means an ordinary stage. |
| Field | Type | Required | Description |
|---|---|---|---|
profile |
loadProfile | No | Default: "stages". |
stages |
array of stage | Yes | at least 1 item |
warmup |
duration | No | Excluded from summaries, kept in raw data. Default: "30s". |
pacing |
pacing | No | How requests are spaced inside a stage. profile says how stages are generated; pacing says how arrivals are scheduled. constant: evenly spaced at the stage rate. poisson: exponential gaps with the stage rate as mean. linear: the rate ramps from the previous stage’s rate to this stage’s rate across the stage; stage 0 has no previous stage and holds its rate. sine: the rate oscillates around the stage rate; requires sine. Default: "constant". |
sine |
sinePacing | No | Parameters of sine pacing; required when pacing is sine. |
| Field | Type | Required | Description |
|---|---|---|---|
ttft_p95 |
duration | No | |
e2e_p95 |
duration | No | |
itl_p95 |
duration | No | |
max_error_rate |
number |
No | ≥ 0; ≤ 1 |
extraQuery
Section titled “extraQuery”| Field | Type | Required | Description |
|---|---|---|---|
name |
metricName | Yes | |
query |
string |
Yes |
prometheus
Section titled “prometheus”| Field | Type | Required | Description |
|---|---|---|---|
url |
string |
Yes | pattern ^https?:// |
tls |
tls | Yes | |
catalogs |
array of string |
No | Added to the defaults chosen from target.type. Default: []. |
optional_catalogs |
array of string |
No | Collected only if detected. Default: []. |
extra_queries |
array of extraQuery | No | Default: []. |
step |
duration | No | Default: "5s". |
stageValidity
Section titled “stageValidity”Thresholds that make a stage valid.
| Field | Type | Required | Description |
|---|---|---|---|
min_achieved_rps_ratio |
number |
No | > 0; ≤ 1 Default: 0.97. |
max_send_lag_p99 |
duration | No | Default: "50ms". |
limitsPolicy
Section titled “limitsPolicy”Type: "follow", "set", "omit"
analysisLimits
Section titled “analysisLimits”Which limits the sizing recommends (“Limits policy”). cpu follow recommends a CPU limit only when the captured pod spec has one; memory defaults to set, because a memory limit is the OOM boundary; qos guaranteed sets limits equal to requests for every resource.
| Field | Type | Required | Description |
|---|---|---|---|
cpu |
limitsPolicy | No | Default: "follow". |
memory |
limitsPolicy | No | Default: "set". |
qos |
"burstable", "guaranteed" |
No | Default: "burstable". |
analysis
Section titled “analysis”Inputs to the resource and config recommendations.
| Field | Type | Required | Description |
|---|---|---|---|
target_rps |
number |
No | > 0 |
baseline_rps |
number |
No | > 0 |
stage_validity |
stageValidity | No | |
limits |
analysisLimits | No | |
headroom |
analysisHeadroom | No | |
expected_pod_lifetime |
duration | No | How long a pod runs between restarts; with a significant memory slope the memory limit allows for this much growth. Default: "24h". |
burst_factor |
number |
No | Multiplies the burst the queue must absorb (B_min), for traffic burstier than the run’s (Assumptions). ≥ 1 Default: 1. |
capacity_ladder_rps |
array of number |
No | Traffic levels of the capacity table; default 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, trimmed to the measured range. at least 1 item |
infra_pricing |
infraPricingPolicy | No | |
token_pricing |
tokenPricingPolicy | No |
storage
Section titled “storage”| Field | Type | Required | Description |
|---|---|---|---|
store |
string |
No | Name of the configured bundle store. Default: "default". |
targetType
Section titled “targetType”Type: "vllm", "litellm", "bifrost", "openai-compatible"
engineType
Section titled “engineType”Type: "loadgen", "inference-perf", "guidellm"
datasetType
Section titled “datasetType”Type: "synthetic"
workloadApi
Section titled “workloadApi”Type: "chat", "completion", "embeddings"
loadProfile
Section titled “loadProfile”v0 supports explicit stages only; sweep and concurrent are additive later.
Type: "stages"
pacing
Section titled “pacing”Type: "constant", "poisson", "linear", "sine"
sinePacing
Section titled “sinePacing”| Field | Type | Required | Description |
|---|---|---|---|
period |
duration | Yes | |
amplitude_ratio |
number |
Yes | Peak deviation from the stage rate as a fraction of it; at most 1 so the rate never goes negative. > 0; ≤ 1 |
adminSecretRef
Section titled “adminSecretRef”Names the keys of a Kubernetes Secret that hold an admin credential: either one bearer token (tokenKey) or a username and password (usernameKey and passwordKey). Names only, never values.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
tokenKey |
string |
No | |
usernameKey |
string |
No | |
passwordKey |
string |
No |
analysisHeadroom
Section titled “analysisHeadroom”Headroom fractions of the sizing: request over p95 usage, limit over the peak, replicas under the SLO-max, and GPU memory.
| Field | Type | Required | Description |
|---|---|---|---|
request |
number |
No | ≥ 0; ≤ 2 Default: 0.2. |
limit |
number |
No | ≥ 0; ≤ 2 Default: 0.3. |
replicas |
number |
No | ≥ 0; < 1 Default: 0.2. |
gpu |
number |
No | ≥ 0; ≤ 1 Default: 0.1. |
targetMetrics
Section titled “targetMetrics”Where Prometheus finds the series of a target that is not a Kubernetes workload (a bare process or a host outside the cluster). The scrape job attaches these namespace and pod labels to the target (deploy/prometheus/servtuner-external.values.yaml), so bench selects its series as it selects a pod’s. Not used with workload: a Kubernetes target is found through its snapshot.
| Field | Type | Required | Description |
|---|---|---|---|
job |
string |
No | The scrape job. Default: "servtuner-external". |
namespace |
string |
Yes | |
pod |
string |
Yes | |
node |
string |
No | The host label its GPU exporter’s series carry, which that scrape job sets to a stable name (deploy/prometheus/servtuner-external.values.yaml): the dcgm catalog selects an off-cluster GPU by it, as it selects a Kubernetes node by name. |
infraPricingPolicy
Section titled “infraPricingPolicy”Where infrastructure prices come from. bench snapshots the resolved prices into pricing/infra.json, and servtuner analyze prices from that copy.
| Field | Type | Required | Description |
|---|---|---|---|
source |
"none", "static", "aws" |
No | none disables the infrastructure cost objectives; static reads the table below; aws queries the AWS Price List API for the snapshot’s node instance type. Default: "none". |
discount |
number |
No | A multiplier on every resolved price, for Spot, reserved instances or Savings Plans, which are not modelled. > 0; ≤ 1 Default: 1. |
static |
staticPriceTable | No | |
aws |
awsPricing | No |
staticPriceTable
Section titled “staticPriceTable”Prices for local and on-prem hardware. A node type is priced per hour with its allocatable resources, so a pod’s share can be computed; a GPU model is priced per GPU-hour, directly or from the owned-hardware helper.
| Field | Type | Required | Description |
|---|---|---|---|
nodes |
map of staticNodePrice | No | Keyed by node.kubernetes.io/instance-type, or local. |
gpus |
map of staticGpuPrice | No | Keyed by the GPU model the snapshot records (hardware_profile.accelerator). |
declaredHardware
Section titled “declaredHardware”The machine a target outside Kubernetes runs on, as its host record says: there are no nodes to read it from. The analysis scopes and prices the run by it when the snapshot has no hardware profile for the target; a captured profile always wins.
| Field | Type | Required | Description |
|---|---|---|---|
host |
string |
Yes | The host’s name: the run’s node_instance_type. |
accelerator |
string |
Yes | The GPU model, or none. |
gpu_count |
integer |
Yes | The GPUs the target uses: one replica’s. ≥ 0 |
gpu_memory_bytes |
integer |
No | ≥ 0 |
driver_version |
string |
No | |
cpu_model |
string |
No | |
cpu_cores |
integer |
No | ≥ 0 |
staticNodePrice
Section titled “staticNodePrice”| Field | Type | Required | Description |
|---|---|---|---|
usd_per_hour |
number |
Yes | ≥ 0 |
cores |
number |
Yes | Allocatable cores. > 0 |
memory_gib |
number |
Yes | Allocatable memory, GiB. > 0 |
gpus |
integer |
No | ≥ 0 Default: 0. |
staticGpuPrice
Section titled “staticGpuPrice”Either usd_per_hour, or owned hardware: purchase_usd ÷ amortization_hours + watts ÷ 1000 × usd_per_kwh.
| Field | Type | Required | Description |
|---|---|---|---|
usd_per_hour |
number |
No | ≥ 0 |
purchase_usd |
number |
No | ≥ 0 |
amortization_hours |
number |
No | > 0 |
watts |
number |
No | Board power: the GPU’s TDP, since measured power needs DCGM. ≥ 0 |
usd_per_kwh |
number |
No | ≥ 0 |
Exactly which fields are allowed together is restricted further by the schema.
awsPricing
Section titled “awsPricing”| Field | Type | Required | Description |
|---|---|---|---|
region |
string |
Yes | The region the nodes run in (the Price List API’s regionCode filter), for example us-east-1. |
tokenPricingPolicy
Section titled “tokenPricingPolicy”Token cost for routers in front of priced providers. With datasheet, servtuner run fetches the pricing datasheet once and stores it in the bundle; the analysis prices only from that copy. With manual, the prices are given here (a private API no datasheet lists).
| Field | Type | Required | Description |
|---|---|---|---|
source |
"none", "datasheet", "manual" |
No | Default: "none". |
from_price_book |
boolean |
No | Fetch the datasheet the operator supplied in the install’s price book, from the api (GET /runs/{id}/datasheet) with the run’s token. Needs servtuner run –api-url. Not with url. Default: false. |
url |
string |
No | The datasheet to fetch. Default: the price book’s (from_price_book), else the Bifrost target’s own framework_config.pricing_url, else https://getbifrost.ai/datasheet, which servtuner run –offline never fetches. The format is LiteLLM’s model-price JSON. |
manual |
manualTokenPrices | No |
manualTokenPrices
Section titled “manualTokenPrices”Token prices as given, per million tokens, for every model the requests name.
| Field | Type | Required | Description |
|---|---|---|---|
usd_per_1m_input_tokens |
number |
Yes | ≥ 0 |
usd_per_1m_output_tokens |
number |
Yes | ≥ 0 |
conversation
Section titled “conversation”Multi-turn chat. Request i is turn (i / concurrent) mod turns of the conversation in slot i mod concurrent, so this many conversations interleave and each restarts after its last turn. A turn sends the whole history: the earlier user messages (input_tokens each) and synthetic assistant replies (output_tokens each), the same text every turn, so the server sees a growing, repeated prefix. The replies are stand-ins, not the server’s own, so a turn does not wait for the previous one: pacing stays RPS-driven. Chat only.
| Field | Type | Required | Description |
|---|---|---|---|
turns |
integer |
Yes | ≥ 2; ≤ 100 |
concurrent |
integer |
No | Conversations in progress at once. ≥ 1 Default: 64. |
presetReference
Section titled “presetReference”A preset name and version joined by @, for example chat-short@1.
Type: string (pattern ^[a-z][a-z0-9-]*@[1-9][0-9]*$)
presetRef
Section titled “presetRef”The preset a workload was expanded from. Written by bench into spec.resolved.json, never by users; it records the name that is deliberately kept out of the workload hash.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | pattern ^[a-z][a-z0-9-]*$ |
version |
integer |
Yes | ≥ 1 |