OpenClaw Performance Benchmarks
Real-world benchmark results for OpenClaw across different models, task types, and deployment configurations. Use these numbers to set realistic performance expectations and choose the right model for your use case.
Benchmark Methodology
All benchmarks were run on a standard EC2 t3.medium instance (2 vCPU, 4GB RAM) with OpenClaw v1.5.2. Each test ran 100 iterations; results show median (P50) and P95 latencies. LLM calls used the provider's public API with US-East endpoints.
Latency Benchmarks by Model
Simple Task (single LLM call, no tools)
| Model | P50 latency | P95 latency | Cost / 1K tasks |
|---|---|---|---|
| GPT-4o-mini | 0.9s | 2.1s | $0.02 |
| GPT-4o | 2.4s | 5.8s | $0.50 |
| Claude 3 Haiku | 0.8s | 1.9s | $0.025 |
| Claude 3.5 Sonnet | 2.1s | 4.7s | $0.60 |
| Llama 3 8B (Ollama) | 1.2s | 3.0s | $0 (local) |
| Llama 3 70B (Ollama) | 8.5s | 18.2s | $0 (local) |
Complex Task (3 tool calls + reasoning)
| Model | Sequential P50 | Parallel P50 | Speedup |
|---|---|---|---|
| GPT-4o-mini | 8.2s | 3.9s | 2.1× |
| GPT-4o | 18.7s | 9.4s | 2.0× |
| Claude 3 Haiku | 7.4s | 3.5s | 2.1× |
| Llama 3 8B (Ollama) | 14.1s | 7.0s | 2.0× |
Throughput Benchmarks
Concurrent task processing capacity with different max_workers settings on a t3.large (2 vCPU, 8GB RAM):
| max_workers | Tasks / minute | CPU usage | Memory |
|---|---|---|---|
| 1 (default) | 6 | 15% | 180MB |
| 4 | 22 | 45% | 320MB |
| 8 | 38 | 72% | 510MB |
| 16 | 41 | 88% | 780MB |
Diminishing returns appear above 8 workers — the bottleneck shifts from CPU to LLM API rate limits.
Impact of Response Caching
Benchmark: 1,000 tasks from a real-world FAQ-answering workload (typical 40% cache hit rate):
| Configuration | Total time | Total cost | Avg latency |
|---|---|---|---|
| No caching | 82 min | $4.80 | 4.9s |
| In-memory cache (TTL 1h) | 51 min | $2.88 | 3.1s |
| Redis cache (TTL 24h) | 49 min | $2.76 | 2.9s |
| Semantic cache (threshold 0.92) | 44 min | $2.16 | 2.6s |
Semantic caching (matching similar but not identical queries) achieves the best results at 55% cost reduction. See Response Caching for setup.
Token Usage Benchmarks
Token costs are often more impactful than latency. Here's how different context management strategies compare:
| Strategy | Tokens / task | Cost / 1K tasks | Quality impact |
|---|---|---|---|
| No optimization | 3,400 | $0.51 | Baseline |
| max_tokens: 2048 | 2,100 | $0.32 | Minimal |
| Context summarization | 1,800 | $0.27 | None (long sessions) |
| RAG (retrieve only relevant) | 1,200 | $0.18 | None or positive |
| All optimizations combined | 900 | $0.14 | Minimal |
Run Your Own Benchmarks
OpenClaw includes a benchmark runner. Create a benchmark file:
# benchmark.yaml
name: "My Benchmark Suite"
tasks:
- prompt: "Summarize the key benefits of Python decorators"
expected_keywords: ["wrapper", "function", "decorator"]
- prompt: "List 5 uses of Redis in production"
expected_keywords: ["cache", "queue", "session"]
runs: 50
models: [gpt-4o-mini, claude-3-haiku]
compare_profiles: [dev, production]openclaw benchmark run benchmark.yaml --output results.json
openclaw benchmark report results.json --format htmlThe HTML report shows latency histograms, cost breakdowns, and quality scores side by side.
Benchmark Methodology
Meaningful benchmarks measure what your production workload actually does, not what a synthetic test does. Before running any benchmark, define the specific question you're trying to answer: "How many tasks per minute can this agent process with this model?" or "What is the p95 latency for a typical file analysis task?" A well-defined question determines which metrics to collect, what workload to simulate, and what constitutes a satisfactory result. Tests without a specific question tend to produce data that looks impressive but doesn't guide actionable decisions.
Use production-representative inputs for your benchmark workload. Synthetic inputs (all the same length, all the same structure) produce misleading results because the model's behavior varies significantly with input characteristics. Sample a hundred representative tasks from your production logs and use those as your benchmark input corpus. This ensures your benchmark captures the real variance in your workload — some tasks will be fast, some slow, and the distribution will match what users actually experience.
Key Metrics to Track
Track throughput (tasks per minute), latency at p50/p95/p99 percentiles, token consumption per task, tool call count per task, and error rate. Don't optimize for just one metric — a configuration that maximizes throughput by reducing model quality is counterproductive. Track all metrics together and look for trade-off points: where does increasing max_tokens improve output quality without significantly hurting throughput? Where does adding another tool call improve results without meaningfully increasing latency? These trade-off insights guide configuration decisions grounded in data rather than intuition.
Run benchmarks in conditions that match production as closely as possible: same network environment, same hardware tier, same model, same time of day (API rate limits and response times can vary). A benchmark run on a developer's laptop at night produces different results than production traffic on cloud infrastructure during peak hours. Establish your benchmark environment as close to production as feasible and run all comparison tests in the same environment.
Interpreting Results
Statistical significance matters for benchmark results. A single run may show a 5% improvement that is pure measurement noise. Run each configuration at least 5 times and compare the distributions rather than individual runs. If the 95% confidence intervals of two configurations overlap, the difference is not statistically significant — you haven't demonstrated a real improvement. Report median and p95 latency rather than mean — outlier-heavy distributions make the mean misleading, while median and p95 tell you what typical and worst-case behavior look like.
Benchmark Tooling
Use openclaw bench --runs 10 --task-file benchmark-inputs.jsonl --output results.csv to run a standardized benchmark suite. The --runs flag controls how many times each input is evaluated — more runs increase statistical confidence but cost more. Export to CSV for analysis in a spreadsheet or import into a monitoring dashboard. Store benchmark results alongside your git commits to track performance over time and quickly identify the commit that caused a regression.