The Elasticsearch, Logstash, Kibana stack — ELK — has been the default answer to “how do I manage logs” for a decade. And for a decade, small teams have been discovering the same painful truth: Elasticsearch is a memory monster that will happily consume every gigabyte of RAM you give it and ask for more. Running ELK on a single VPS alongside your actual application is an exercise in resource contention that usually ends with either your app or your log infrastructure falling over at 3 AM.
The good news is that the log management landscape has changed dramatically. Lightweight alternatives exist that give you 80-90% of ELK’s capabilities at a fraction of the resource cost. If you are running on a budget — a single server, a small cluster, or a modest cloud bill — there are better options.
Why ELK Is Overkill for Most Small Teams
Let me be precise about the problem. Elasticsearch’s minimum viable deployment consumes 1-2 GB of RAM at idle. Add Logstash for log parsing and Kibana for visualization, and you are looking at 3-4 GB of RAM before you have ingested a single log line. On a 4 GB VPS that also runs your application, database, and web server, that is not viable.
Beyond memory, Elasticsearch requires ongoing maintenance: index lifecycle management, shard rebalancing, mapping conflicts, and storage management. The operational burden is justified when you are ingesting terabytes of logs per day across hundreds of services. When you are ingesting a few gigabytes per week from three services on one server, it is overhead that does not earn its keep.
The search capabilities are extraordinary — full-text search across billions of log lines in milliseconds. But most small teams are not doing full-text search across billions of log lines. They are grepping for an error message, tailing recent logs, and building a handful of dashboards. You do not need a search engine for that.
The Alternatives, Compared
Grafana Loki: The Log Aggregator That Thinks Like Prometheus
Loki is the standout option for resource-constrained environments. Created by Grafana Labs, it takes a fundamentally different approach to log storage: instead of indexing the content of every log line (like Elasticsearch), Loki only indexes the metadata labels (service name, log level, hostname) and stores log content as compressed chunks. When you query, it filters by labels first, then scans the relevant chunks.
The resource implications are dramatic. Loki in single-binary mode runs comfortably in 256-512 MB of RAM. That is one-eighth of a minimal Elasticsearch deployment. It stores logs on local disk or object storage (S3, MinIO), and compression ratios are excellent — expect 10:1 or better for typical application logs.
The tradeoff: Loki is not great at ad-hoc full-text search across all logs. Queries that do not specify label selectors are slow because they require scanning all chunks. If your primary use case is “search all logs for a specific error string across all services,” Loki will frustrate you. If your use case is “show me the last hour of error logs for the API service,” Loki is fast and efficient.
Ideal setup: Loki + Grafana (for querying and dashboards) + Alloy or Promtail (for log collection). Total RAM: under 1 GB for the entire stack.
Grafana Alloy: The All-in-One Collector
Alloy (formerly Grafana Agent) deserves special attention because it replaces multiple tools in one binary. It collects logs (replacing Promtail), scrapes metrics (replacing Prometheus for many use cases), and collects traces — all in a single process with a single configuration file.
For a small team, this is significant. Instead of running Promtail for logs, Prometheus for metrics, and an OTLP collector for traces, you run Alloy. It supports the same pipelines and transformations that the individual tools offer, but with lower total resource consumption and simpler operations.
Alloy uses a flow-based configuration language that is more readable than Prometheus’s YAML and more powerful than Promtail’s pipeline stages. You define components (sources, processors, exporters) and wire them together. It is genuinely pleasant to configure.
RAM footprint: 100-200 MB for a typical collection workload, depending on pipeline complexity and buffer sizes.
Vector: The High-Performance Data Pipeline
Vector, built by Timber (now part of Datadog, though Vector remains open source), is a log and event data pipeline written in Rust. It is fast — benchmarks show it processing 10x more events per second per MB of RAM than Logstash. It can collect, transform, and route log data to virtually any destination: Loki, Elasticsearch, S3, ClickHouse, or dozens of other sinks.
Where Vector shines is flexibility. If you want to collect logs from files, parse them with custom patterns, enrich them with metadata, sample high-volume streams, and route different log types to different destinations — Vector handles all of this with a single, declarative TOML configuration.
The tradeoff: Vector is a pipeline, not a complete stack. You still need a storage backend (Loki, ClickHouse, S3) and a query/visualization layer (Grafana). Its strength is replacing Logstash or Fluentd in your pipeline with something dramatically more efficient.
RAM footprint: 50-150 MB depending on pipeline complexity and throughput. Significantly less than Logstash’s 500 MB+ baseline.
ClickHouse: When You Need Serious Query Power
If your log volumes are high enough that Loki’s scan-based queries become slow (typically north of 50 GB/day), ClickHouse is worth considering as a log storage backend. It is a columnar database designed for analytical queries, and it is remarkably efficient at scanning large datasets. A query that takes 30 seconds in Elasticsearch might complete in 2 seconds in ClickHouse.
ClickHouse’s approach to logs is different from both Elasticsearch and Loki. It treats logs as structured data in a table with columns for timestamp, level, service, message, and whatever other fields you extract. Queries use SQL, which most developers already know.
The tradeoff: ClickHouse has a steeper learning curve for administration. Schema design matters — you need to think about partitioning, ordering keys, and data types upfront. It is not a drop-in replacement; it is a different paradigm that rewards investment.
RAM footprint: 1-2 GB minimum, but it uses RAM for caching and can work effectively in constrained environments if you tune the buffer and cache settings.
Recommended Stacks by Budget
The Single VPS Stack (2-4 GB RAM, under $20/month)
Alloy (collection + basic processing) sending to Loki (storage) with Grafana (visualization). Total overhead: 500-800 MB RAM. This leaves plenty of headroom for your actual application on a 4 GB server.
Configuration is straightforward. Alloy reads your application log files, applies basic parsing (JSON logs are ideal — no parsing needed), adds labels, and ships them to Loki over HTTP. Grafana connects to Loki and gives you a query interface with LogQL and the ability to build dashboards.
The Small Cluster Stack (8-16 GB total, $50-100/month)
Vector (collection and pipeline) sending to Loki or ClickHouse (storage) with Grafana (visualization). Vector gives you more powerful transformations: sampling high-volume logs, extracting structured fields from unstructured messages, routing different log types to different retention tiers.
At this budget level, you can afford to keep 30 days of logs at full resolution and 90 days of sampled or aggregated logs. The pipeline approach lets you make these decisions at ingestion time rather than dealing with index lifecycle management after the fact.
The Hybrid Stack (When You Outgrow DIY)
If your log volume exceeds what a small self-hosted setup can handle, consider a hybrid approach: collect and process logs locally with Vector or Alloy, then ship them to a managed service like Grafana Cloud (free tier includes 50 GB/month of logs), Axiom (generous free tier), or Better Stack. You avoid the operational burden of running storage infrastructure while keeping control of collection and processing.
Practical Tips for Any Stack
Use structured logging from day one. JSON logs are dramatically easier to query than unstructured text. Every major logging library supports structured output. The five minutes you spend configuring structured logging saves hours of writing parsing rules later.
Be aggressive about log levels. Do not log everything at INFO. Reserve INFO for events you would want to see in a dashboard. Use DEBUG for details you only need when investigating a specific issue, and make sure DEBUG is off in production by default. Reducing log volume by 50% is the cheapest infrastructure optimization you can make.
Set retention policies early. Decide how long you need logs before you run out of disk space at 3 AM. Seven days of full-resolution logs and 30 days of error-only logs is a reasonable default for most small applications.
Alert on log patterns, not just metrics. Loki and Grafana support alerting on log query results. An alert for “more than 10 error-level logs per minute from the payment service” catches problems that metric-based monitoring misses.
My Recommendation
For most small teams reading this: start with Alloy + Loki + Grafana. The total resource overhead is minimal, the setup takes an afternoon, and you get log aggregation, querying, dashboards, and alerting. When your needs outgrow this stack — and you will know when they do because queries get slow or you need more powerful transformations — graduate to Vector in the pipeline and consider ClickHouse for storage.
The ELK stack is excellent software that solves real problems at scale. But scale is the operative word. If you are not at that scale, you are paying an infrastructure tax for capabilities you are not using. Spend those resources on your product instead.
Key Takeaways
- ELK’s minimum footprint (3-4 GB RAM) makes it impractical for small teams running on budget infrastructure. Loki achieves 80% of the functionality in 256-512 MB.
- Grafana Alloy replaces three separate tools (Promtail, Prometheus agent, OTLP collector) in a single 100-200 MB binary — ideal for resource-constrained environments.
- Vector (Rust-based) processes 10x more events per MB of RAM than Logstash and offers powerful transformation pipelines for complex routing and enrichment.
- The budget stack (Alloy + Loki + Grafana) costs under 800 MB of RAM and provides log aggregation, querying, dashboards, and alerting.
- Structured JSON logging and aggressive log-level management are the cheapest optimizations — they reduce volume and eliminate parsing complexity regardless of which stack you choose.
