lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Does it load all file in memory?

Open mvoidex opened this issue 8 years ago • 6 comments

We have logs with ~40kk lines


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mvoidex avatar Apr 04 '17 10:04 mvoidex

No, it will only buffer a small amount of the file content in memory and keep a small index entry for each line. lnav does need to read through the whole file on start to build the index.

tstack avatar Apr 04 '17 13:04 tstack

Ok, thanks.

lnav does need to read through the whole file on start to build the index

I see. It works fast for about 300k lines, but for 40kk there are lags. It'll be great, if index can be created in background. I understand, that it may be hard to implement, so you can close this issue.

mvoidex avatar Apr 04 '17 20:04 mvoidex

Pardon my ignorance, but I don't know what you mean by "40kk"... "kk" is not a unit I'm familiar with.

If you have some time, can you post some performance numbers for the file you're loading. For comparison, on my i7 MacBook Pro, a 535MB web log with 3.5 million lines takes about 4 seconds to index.

tstack avatar Apr 04 '17 20:04 tstack

40 millions, I'll post some more info (size and time to load) tomorrow

mvoidex avatar Apr 04 '17 20:04 mvoidex

Size of file: 2868042209 Lines: 34107116

It takes 30 seconds to load and then it works laggy

(this log is also being updated at the time i open it)

mvoidex avatar Apr 05 '17 09:04 mvoidex

Is it possible to display end of the file and then continue indexing? When large log is loading (10Gb+) it takes a while to get to the bottom i.e. last line

f9z avatar Nov 06 '22 10:11 f9z