[opensuse] searching the journal is incredibly slow?
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal? -- Per Jessen, Zürich (10.7°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tuesday 18 of March 2014 09:35:58 Per Jessen wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
Try filefrag on the files at /var/log/journal/*/*, they are extremely fragmented (5k fragments for a 100MB file!?). This is a known problem with journald and there was some post on this list a while ago that indicated that it won't be fixed soon, if at all. Regards, Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
F. Per Jessen <per@computer.org> wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
From what I recall of conversations on factory, yes.
You can either host the journal on a SSD or extract a static text version as needed to search through. I don't recall details beyond the above. GREG -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-03-18 13:48, Greg Freemyer wrote:
F.
Per Jessen <per@computer.org> wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
From what I recall of conversations on factory, yes.
You can either host the journal on a SSD or extract a static text version as needed to search through.
Do we have some filesystem that runs on disk with a heavy dedicated ram cache? tmpfs spills over to swap, but that is not what I mean. I mean a filesystem that works mainly from memory, but with full copy on disk so that it is permanent, and at the same time fast because requests go to ram first, and only when needed, go to disk. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2014-03-18 13:56, I wrote:
On 2014-03-18 13:48, Greg Freemyer wrote:
Do we have some filesystem that runs on disk with a heavy dedicated ram cache?
tmpfs spills over to swap, but that is not what I mean. I mean a filesystem that works mainly from memory, but with full copy on disk so that it is permanent, and at the same time fast because requests go to ram first, and only when needed, go to disk.
Failing that, I would try mounting the journal directory on different filesystem types to find out which one runs faster. I would try XFS and reiserfs. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
El 18/03/14 05:35, Per Jessen escribió:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
This is a known issue for which there is no optimum solution other than placing the journal in an SSD drive. The time it takes to search in the journal depends on the fragmentation of the files, the filesystem..etc.. it is even suspected there is a kernel bug that contributes to this, but such bug so far has not been isolated. (afaik greg KH tried with no luck) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Cristian Rodríguez wrote:
El 18/03/14 05:35, Per Jessen escribió:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
This is a known issue for which there is no optimum solution other than placing the journal in an SSD drive.
The time it takes to search in the journal depends on the fragmentation of the files, the filesystem..etc.. it is even suspected there is a kernel bug that contributes to this, but such bug so far has not been isolated. (afaik greg KH tried with no luck)
Okay, thanks everyone. I don't have a spare disk-slot on this system nor the time to experiment with this, so I'll just have to live with it :-) Not to mention the minimum price for an SSD drive (SAS, 24/7) seem to be about CHF700, and all models unavailable at my supplier :-( -- Per Jessen, Zürich (17.4°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-03-18 14:21, Per Jessen wrote:
Okay, thanks everyone. I don't have a spare disk-slot on this system nor the time to experiment with this, so I'll just have to live with it :-)
There are also hybrid disks, rotating plus small ssd, in the same enclosure. The ssd acts as a big cache of the magnetic media. I believe these are firmware implementations, transparent to the operating system (only one SATA port). There is also a technology, used on some Windows laptops, combining an SSD and HD in a similar manner (two SATA ports), but controlled by the operating system, which can thus decide what to cache on the SSD. Windows places there the files used for boot, for instance. I believe everything is eventually written to the HD, too. I never remember the proper name of this technology. I think it comes form Intel. AFAIK we don't have the equivalent on Linux. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Tue, Mar 18, 2014 at 4:35 AM, Per Jessen <per@computer.org> wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
Per, I went back and scanned the old factory discussion: http://markmail.org/message/3lqwawpcawl4avn2 Per it, if you install syslog in addition to what you have, you will get traditional text logs in addition to the binary logs. You may want to read that thread, but it is pretty long, so I just hit the highlights. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Greg Freemyer wrote:
On Tue, Mar 18, 2014 at 4:35 AM, Per Jessen <per@computer.org> wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
Per,
I went back and scanned the old factory discussion:
http://markmail.org/message/3lqwawpcawl4avn2
Per it, if you install syslog in addition to what you have, you will get traditional text logs in addition to the binary logs.
Hi Greg I always have syslog installed (audit trail), and rarely use the journal at all. This time I couldn't find the lines I needed (a failed startup), but as this system happened to have a journal, I decided to try it out. /Per -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 03/18/2014 04:35 AM, Per Jessen wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
Are you using Recoll? It will take a long time to index, but then it will be pretty quick to find something. --doug -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-03-18 16:16, Doug wrote:
On 03/18/2014 04:35 AM, Per Jessen wrote:
I have a journal with about 1million lines in it - going through it page by page is fine, but trying to skip a few hundred thousand lines or search for e.g. /^Mar/ takes ages. Is this normal?
Are you using Recoll? It will take a long time to index, but then it will be pretty quick to find something.
http://software.opensuse.org/package/recoll «Recoll is a personal full text search tool for Unix/Linux.» The systemd journal is not a text file, it is a database, AFAIK. Will "Recoll" work on that? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
El 18/03/14 12:26, Carlos E. R. escribió:
The systemd journal is not a text file, it is a database, AFAIK. Will "Recoll" work on that?
Nope, however GNOME has a new log viewer built for the journal. It will however manifest exactly the same slowness as it is just a consumer of the journald api. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
auxsvr@gmail.com
-
Carlos E. R.
-
Cristian Rodríguez
-
Doug
-
Greg Freemyer
-
Per Jessen