-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] speedup journal export #3615
Comments
Hi @champtar . I get the same or similar times when running in different RHELs and Fedoras, with different journal sizes. What can you tell us about the machine where these commands were run? |
Innovative idea, I like that approach of thinking. Comparing it with the call flow of a command execution:
I am bit afraid most of implementations would suffer to their complexity or insufficient robustness due to above facts. If somebody does see some good implementation, I would be definitely interested in. |
Unless I'm mistaken, using tail or heads after calling journalctl will still load the whole file, which may be a waste. We have already --size, wouldn't that work better than having to use 'tail' or 'head' on the full file? Assuming that the time to capture the log is proportional to the size, we could capture the last 24 or 12 hours of logs and then apply size limits on top of that. In other words: --all-logs gets everything, we don't need to filter. |
I'm extremely surprise by your results, my tests always show differences. Some other numbers (running each commands twice, showing the second run): On a small Fedora 39 VPS
On an 8 years old laptop, Fedora 39, SSD, encrypted disk, ext4
On an old desktop acting as NAS, SSD,
You are mistaken :) For the implementation, the quick and dirty way is to pass Right now We could do it in 2 steps:
If we timeout in step 1, we have the latest logs which is often what we want, and we don't need to have the full logs in memory at any point |
I've played a bit with the journal cursor but it's slower
|
While generating sos reports, journal exports takes pretty long
Using
journalctl --reverse
we can get pretty significant speedupsThe text was updated successfully, but these errors were encountered: