Skip to content

Commit c650d05

Browse files
author
Paulo Remoli
committed
Performance comparison
1 parent cdbc4e4 commit c650d05

3 files changed

Lines changed: 56 additions & 0 deletions

File tree

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,62 @@ A fast terminal log viewer for files of any size — including multi-GB logs. Bu
1616

1717
---
1818

19+
## Performance
20+
21+
22+
### Headless mode
23+
24+
Benchmarked against [lnav](https://lnav.org/) with headless mode filtering a [**3.3 GB web server access log with 10 million+ lines**](https://www.kaggle.com/datasets/eliasdabbas/web-server-access-logs), with a cold disk cache, measured on 10 runs.
25+
26+
**logana**
27+
```
28+
$ hyperfine --prepare 'rm filtered.log;sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \
29+
'logana ~/logs/access.log -i food --headless > filtered.log' --runs 10
30+
31+
Benchmark 1: logana ~/logs/access.log -i food --headless > filtered.log
32+
Time (mean ± σ): 999.9 ms ± 2.9 ms [User: 2277.7 ms, System: 3057.0 ms]
33+
Range (min … max): 995.2 ms … 1003.6 ms 10 runs
34+
```
35+
36+
**lnav**
37+
```
38+
$ hyperfine --prepare 'rm filtered.log;sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' \
39+
'lnav ~/logs/access.log -c ":filter-in food" -n > filtered.log' --runs 10
40+
41+
Benchmark 1: lnav ~/logs/access.log -c ":filter-in food" -n > filtered.log
42+
Time (mean ± σ): 11.197 s ± 0.140 s [User: 14.177 s, System: 1.580 s]
43+
Range (min … max): 10.980 s … 11.483 s 10 runs
44+
```
45+
46+
**logana is ~11× faster than lnav.**
47+
48+
<p align="center">
49+
<img src="docs/src/performance.gif" alt="logana performance comparison with lnav" />
50+
</p>
51+
52+
The headless mode was used for more reliable measurements.
53+
54+
55+
### TUI
56+
57+
Same 3.3GB file with the TUI (filter passed as command argument, quit once data was fully loaded and filter applied):
58+
59+
```
60+
$ time logana ~/logs/access.log -i food
61+
logana ~/logs/access.log -i food 5.21s user 3.61s system 197% cpu 4.475 total
62+
63+
$ time lnav ~/logs/access.log -c ":filter-in food"
64+
lnav ~/logs/access.log -c ":filter-in food" 12.14s user 1.37s system 114% cpu 11.819 total
65+
```
66+
67+
**~2.6× faster end-to-end with the UI.**
68+
69+
Hardware: AMD Ryzen 9 8945HS · 32 GB DDR5 5600 MHz · PCIe NVMe 4.0 x4
70+
71+
**Note:** lnav is a mature tool with a significantly broader feature set.
72+
73+
---
74+
1975
## Features
2076

2177
- **Auto-detected log formats** — JSON, syslog, journalctl, logfmt, OpenTelemetry, DLT (AUTOSAR), and more

docs/logana-icon.png

-594 KB
Binary file not shown.

docs/src/performance.gif

1.03 MB
Loading

0 commit comments

Comments
 (0)