Victorialogs vs Loki - Benchmarking Results

Built for Speed: ~10ms Latency, Even Under Load
Blazingly fast way to build, track and deploy your models!
- Handles 350+ RPS on just 1 vCPU â no tuning needed
- Production-ready with full enterprise support
TL;DR â After sideâbyâside testing on a 500â¯GB/7âday workload, VictoriaLogs cut query latencies by 94â¯%, shrank storage by â40â¯%, and used <â¯50â¯% of the CPU & RAM we previously allocated to Loki. This post explains why we switched.
Background & Requirements
Truefoundry helps developers run multiâtenant ML workloads on Kubernetes.
Developers need:
- Fast, adâhoc search
- Good Ingestion rate
- Live tailing for debugging.
- Minimal operational overhead â singleâbinary deployments preferred.
- Resourceâefficient operation on a 4â¯vCPU / 16â¯GiB RAM node
- High compression ratio on stored Logs
- Block Storage  > S3 preferred, to reduce overhead. + Latency
Loki served us well initially, but as volume grew we saw >30â¯s search latencies and high I/O amplification. This triggered an evaluation of VictoriaLogs.
What Is Loki?
Loki is GrafanaâLabsâ log aggregation system that stores logs in compressed chunks accompanied by an index built from labels (keyâvalue pairs). Queries are expressed in LogQL and rely heavily on label filters followed by line filtering.
- Strengths: tight Grafana integration, cheap index, horizontally scalable.
- Limitations for us: labelâonly index means expensive fullâscan regex searches; high chunk compaction I/O; Go GC overhead at high ingestion.
What Is VictoriaLogs?
VictoriaLogs is a log database by the VictoriaMetrics team. It uses columnar LSMâstyle storage with perâfield indices, SIMDâaccelerated search and SQLâlike LogSQL syntax.
- Strengths: fullâtext index on all tokens; singleâbinary; very low memory footprint; fast coldâcache scans.
- Tradeâoffs: smaller ecosystem, fewer builtâin integrations (we pipe data via Vector).
Benchmark Methodology
Query Suite
- Stats â total lines for a filter in the last 24â¯h.
- Needle in a Haystack â 3-4 static line
[UNIQUE-STATIC-LOG] ID=abc123 XYZin heavy log filled  namespace over 7â¯days. - Negative â string that does not exist (forces full scan) over 7â¯days.
đ Query Performance
1. Stats Query (log count over 24h)
Purpose: Total log lines from app="servicefoundry-server"
2. Needle-in-Haystack Query (7 days, ~500 GB)
Purpose: Search for a unique static log line in truefoundry namespace
3. App Restart Log Match (7 days) (Extra query to verify Step 2)
Purpose: Search for known restart pattern :3000 in a small subset of logs (targeting a single shard)
Result sets were verified to be identical.
4. Non-Existence Log Match (7 days)
Purpose: Search for non-existing log, triggering a full data search
Result sets were verified to be identical.
On 500GB processing data, Loki behaved strangely. The resources got choked. and query response halted.
Loki vs VictoriaLogs: Results at a Glance
Our evaluation focused on three dimensions that matter dayâtoâday for platform engineers:
- How fast can we get answers?
- How many resources does that speed cost?
- How stable is the experience under real load?
Query Performance
â
Why the gap? VictoriaLogs maintains a perâtoken index, so even regexâlike scans are indexâassisted. Loki, by contrast, filters lineâbyâline after a label query, which devolves to a bruteâforce scan when the label set is broad.
đĒī¸ Âˇ Ingestion Performance
We also stress-tested ingestion with 120 replicas of our  flog generator.
The results were eye-opening:

Loki:

Loki spikes to 3â4 vCPU, nears its 8 GiB limit and shows throttling under the same workload
VictoriaLogs:

đ Key takeaway: VictoriaLogs delivered 3Ã higher ingestion speed while consuming 72% less CPU and 87% less memory compared to Loki.
VictoriaLogs stays comfortably below its 4 vCPU / 8 GiB limits even during ingestion bursts
2 ¡ Resource Footprint (7âday retention)
Loki

Memory Used: Â consistently using 6-7GB Ram
Cpu peak: 3 vCPU
â
VictoriaLogs

Memory Used: 800 MB - 900 MB
Peak Cpu Usage: 1.1 Â vCPU
3 ¡ RealâWorld Load (Locust 2âmin run @ 10 users & 2 Rampup )
Queries were similar, with Random Limits and Random Time-range, to ensure Cache bursts.
Victoria Logs

Loki

đ Despite handling 36% higher RPS, VictoriaLogs showed lower p95% and tail latenciesâproving its indexing model holds under pressure with 3.6x faster p99%ile

âThis test reinforced our decision: VictoriaLogs isn't just faster in theoryâit scales better under stress in production-like workloads.
TL;DR of the Numbers
- 70â94 % faster across common search patterns.
- â40 % smaller on disk with the same retention window.
- Half the compute, freeing a full vCPU and ~1â2â¯GiB RAM on our smallest nodes.
Bottom line: For a logâheavy, searchâcentric use case, VictoriaLogs lets us answer questions in seconds instead of minutes while cutting infra costs.
Key Findings
- Fullâtext index matters â VictoriaLogsâ perâtoken index eliminates bruteâforce line filtering.
- Storage layout â columnar + LSM vastly reduces onâdisk size and disk seeks.
- Memory efficiency â we freed ~2â¯GiB RAM per node, allowing denser scheduling.
- Operational simplicity â both are singleâbinary, but VictoriaLogs needed zero custom tuning to hit these numbers.
Conclusion
For workload profiles heavy on adâhoc text search, VictoriaLogs provided orderâofâmagnitude faster queries and material cost savings. Loki remains an excellent choice when tight Grafana integration and labelâfirst queries dominate, but VictoriaLogs is now our default for highâingestion, developerâcentric clusters.
References
- Loki Documentation
- VictoriaLogs Documentation
- Promtail Documentatio
- Vector Documentation
- Alloy Documentation
- Grafana Alloy Configurator
Frequently Asked Questions
What is the key difference betweeen Victorialogs and Loki?
The key difference in victorialogs vs loki is VictoriaLogs' advanced per-token indexing and columnar storage. This enables much faster query performance and significantly lower resource usage compared to Loki's label-only indexing, which often results in slower full-scan searches and higher operational overhead for log management.
Is VictoriaLogs faster than Loki?
Yes, in our rigorous benchmarking, VictoriaLogs demonstrated superior speed compared to Loki. For victorialogs vs loki comparisons, VictoriaLogs reduced query latencies by 94% and achieved 12x faster search times for complex queries. It also delivered 3x higher ingestion performance, making it significantly more efficient.
What is the default port for VictoriaLogs?
When evaluating victorialogs vs loki, knowing setup details is helpful. VictoriaLogs typically uses port 8428 for its default HTTP API and scraping endpoints. This port allows access and interaction with the log database. While our blog focuses on performance, understanding deployment basics, like the default port, is crucial for system configuration.
What are VictoriaLogs vs Loki benchmark results?
In benchmarks comparing victorialogs vs loki, VictoriaLogs delivered superior performance. It achieved a 94% reduction in query latencies, decreased storage usage by approximately 40%, and consumed less than 50% of allocated CPU and RAM. VictoriaLogs also showcased 3x higher ingestion throughput, making it highly efficient.
Which is better: VictoriaLogs or Loki?
In our benchmark of victorialogs vs loki, VictoriaLogs proved superior. It cut query latencies by 94%, reduced storage by 40%, and used over 50% less CPU/RAM. TrueFoundry in the US chose VictoriaLogs for its enhanced performance and efficiency managing ML workloads.
TrueFoundry AI Gateway delivers ~3â4 ms latency, handles 350+ RPS on 1 vCPU, scales horizontally with ease, and is production-ready, while LiteLLM suffers from high latency, struggles beyond moderate RPS, lacks built-in scaling, and is best for light or prototype workloads.
The fastest way to build, govern and scale your AI
















.webp)


.png)
.webp)
.webp)


.webp)
.webp)
.webp)
.png)









