mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
Adds litellm-rust/loadtest: a mock LLM (OpenAI chat, Anthropic messages, Bedrock invoke with event-stream framing) that takes its timing from the prompt, an open-loop load generator with workloads covering 10k to 1M token contexts, 6 minute non-streaming calls and 30 minute streams, a config and virtual key generator, a summarizer and a /proc sampler, plus Terraform for an AWS rig with load generators, gateway and mocks on separate machines The gateway sets TCP_NODELAY on accepted sockets, removing a ~40 ms stall per streamed response, and its Docker build takes LTO and CODEGEN_UNITS build args for faster iteration builds
27 lines
1.6 KiB
JSON
27 lines
1.6 KiB
JSON
{
|
|
"name": "2 hour soak at a steady realistic mix: memory growth, fd leaks, stuck streams",
|
|
"stages": [{"duration_s": 7200, "rps": 30}],
|
|
"nonstream_max_s": 360,
|
|
"warmup_s": 60,
|
|
"new_conn_fraction": 0.05,
|
|
"keys": {"file": "out/keys.txt", "zipf_s": 1.1},
|
|
"models": {"chat": {"prefix": "gpt-6-astra-", "count": 10}, "messages": {"prefix": "claude-opus-5-5-", "count": 10}},
|
|
"classes": [
|
|
{"name": "chat-interactive", "weight": 45, "endpoint": "chat", "stream_fraction": 0.8,
|
|
"context_tokens": {"dist": "loguniform", "min": 10000, "max": 100000},
|
|
"ttft_ms": {"dist": "uniform", "min": 300, "max": 1500},
|
|
"duration_s": {"dist": "loguniform", "min": 1, "max": 60}},
|
|
{"name": "messages-agent", "weight": 40, "endpoint": "messages", "stream_fraction": 0.9,
|
|
"context_tokens": {"dist": "loguniform", "min": 20000, "max": 200000},
|
|
"ttft_ms": {"dist": "uniform", "min": 500, "max": 3000},
|
|
"duration_s": {"dist": "loguniform", "min": 5, "max": 300}},
|
|
{"name": "long-stream", "weight": 5, "endpoint": "messages", "stream_fraction": 1,
|
|
"context_tokens": {"dist": "loguniform", "min": 50000, "max": 300000},
|
|
"ttft_ms": {"dist": "uniform", "min": 1000, "max": 5000},
|
|
"duration_s": {"dist": "uniform", "min": 300, "max": 900}},
|
|
{"name": "huge-context", "weight": 10, "endpoint": "messages", "stream_fraction": 0.7,
|
|
"context_tokens": {"dist": "choice", "values": [500000, 800000, 1000000]},
|
|
"ttft_ms": {"dist": "uniform", "min": 2000, "max": 10000},
|
|
"duration_s": {"dist": "loguniform", "min": 10, "max": 300}}
|
|
]
|
|
}
|