Overview
Garnet uses eBPF (Extended Berkeley Packet Filter) for monitoring, which provides near-zero overhead compared to traditional monitoring solutions.Resource Usage
Typical Overhead
Resource | Impact | Notes |
---|---|---|
CPU | <1% | Per-core overhead during normal operation |
Memory | 50-100MB | Base agent memory footprint |
Network | <10KB/s | Event telemetry to Garnet Platform |
Disk I/O | Negligible | Only for local event buffering |
Compared to Alternatives
Solution Type | CPU Overhead | Memory Overhead |
---|---|---|
Garnet (eBPF) | <1% | 50-100MB |
Traditional agents | 5-15% | 200-500MB |
Network taps | N/A | Requires separate infrastructure |
Application instrumentation | 10-30% | Varies |
Benchmark Results
GitHub Actions
Tested onubuntu-latest
runners:
Kubernetes Workloads
Tested on 3-node cluster (4 CPU, 8GB RAM each):Metric | Without Garnet | With Garnet | Difference |
---|---|---|---|
Request latency (p95) | 45ms | 46ms | +2.2% |
Throughput (req/s) | 1,250 | 1,235 | -1.2% |
Pod memory | 512MB | 522MB | +2.0% |
Node CPU usage | 35% | 35.5% | +1.4% |
Docker Containers
Single container benchmark (alpine-based):Performance Factors
What Affects Performance
Event Volume
Event Volume
High network/process activity increases CPU usage
- More events = more eBPF processing
- Typically still <2% CPU even under heavy load
- Events are batched and sent asynchronously
Number of Processes
Number of Processes
More concurrent processes = more monitoring points
- Each process requires eBPF attachment
- Memory scales with process count
- Agent automatically handles cleanup
Kernel Version
Kernel Version
Newer kernels = better eBPF performance
- Kernel 5.15+: Optimized eBPF JIT
- Kernel 5.10-5.14: Good performance
- Kernel <5.10: Not supported
Network Policies
Network Policies
More policies = slightly more filtering overhead
- Each policy adds ~0.01% CPU
- Policies are evaluated in-kernel (very fast)
- Compiled to eBPF bytecode
Optimization Tips
1
Use Scoped Policies
Apply network policies at the most specific scope:
2
Filter Noisy Destinations
Reduce event volume by allowing known-good destinations:
3
Right-Size Agent Resources
Adjust resource limits in Kubernetes:
4
Monitor Agent Health
Check agent metrics in dashboard:
- Event processing rate
- Memory usage trends
- Network throughput
- CPU utilization
Scaling Considerations
GitHub Actions
- Impact: Per-runner overhead
- Scaling: Automatically scales with workflow concurrency
- Cost: No additional cost beyond Garnet subscription
Kubernetes
- DaemonSet deployment: One agent per node
- Small clusters (1-10 nodes): <0.5% cluster CPU
- Large clusters (100+ nodes): <0.3% cluster CPU
- Auto-scaling: Agent memory is bounded and predictable
Docker / Standalone
- Single agent per host
- Shared across all containers
- Resource limits configurable via Docker run flags
Performance Monitoring
Agent Metrics
Available in Garnet Dashboard:Event Rate
Events processed per second
Memory Usage
Agent memory consumption
CPU Usage
Percentage CPU utilization
Network Throughput
Data sent to platform
Performance Alerts
Configure alerts for:- Agent CPU usage >5%
- Agent memory usage >200MB
- Event processing lag >10s
- Agent disconnections
Troubleshooting Performance Issues
High CPU Usage (>2%)
Check Event Volume
Check Event Volume
Kernel Compatibility
Kernel Compatibility
Resource Limits
Resource Limits
High Memory Usage (>200MB)
Process Count
Process Count
Event Buffering
Event Buffering
Event Processing Lag
Network Latency
Network Latency
API Token Issues
API Token Issues
Production Best Practices
FAQs
Does Garnet affect my application latency?
Does Garnet affect my application latency?
No. eBPF monitoring happens outside the application’s execution path. There’s no inline interception of requests.
What happens if the agent crashes?
What happens if the agent crashes?
Your applications continue running normally. eBPF programs are safely removed by the kernel. The agent auto-restarts via supervisor (Kubernetes/systemd).
Can I run Garnet in production?
Can I run Garnet in production?
Yes. Garnet is designed for production use with <1% overhead. Used by companies processing millions of requests per day.
How do I benchmark Garnet in my environment?
How do I benchmark Garnet in my environment?
- Measure baseline metrics (CPU, memory, latency)
- Deploy Garnet agent
- Run normal workload for 24 hours
- Compare metrics