Re: [systemd-devel] High CPU usage of journald

2013-02-19 Thread Lennart Poettering
On Tue, 19.02.13 19:21, Holger Hans Peter Freyther (hol...@freyther.de) wrote: > > Does this mean I will now optimize them all away for you? No, not > > really, I don't even have the appropriate hardware to profile this. Does > > this mean I will merge good patches that optimize this? Hell, yes! >

Re: [systemd-devel] High CPU usage of journald

2013-02-19 Thread Holger Hans Peter Freyther
On Tue, Feb 19, 2013 at 03:27:02AM +0100, Lennart Poettering wrote: > Well, to be fair: if an app just prints a "couple of log messages", then > the functions you point out should hardly matter... Optimize inner > loops, not just the stuff that happens to be called a "couple of" > times... I agre

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Lennart Poettering
On Mon, 18.02.13 08:00, Holger Freyther (hol...@freyther.de) wrote: > Cristian Rodríguez opensuse.org> writes: > > Good Morning Cristian, > > > Why should systemd stop using standard IO functions to please some > > obscure, out of the ordinary need? > > Could you please clarify obscure? So an

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Lennart Poettering
On Sun, 17.02.13 17:54, Holger Freyther (hol...@freyther.de) wrote: > So where does _int_malloc come from? I have used gdb to 'sample' > it by hand. So the answer is from a lot of places. Do you consider > cutting back on how you dynamically allocate strings? E.g. stop > using fopen, fgets, only h

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Lennart Poettering
On Mon, 18.02.13 19:52, Holger Hans Peter Freyther (hol...@freyther.de) wrote: > > On Mon, Feb 18, 2013 at 08:47:44AM -0800, David Strauss wrote: > > Dear David, all, > > > > It's possible that a lot of it could also allocate on the stack or use > > stack-style management of a pool in heap. Th

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Kok, Auke-jan H
On Mon, Feb 18, 2013 at 2:50 PM, Colin Guthrie wrote: > 'Twas brillig, and Holger Hans Peter Freyther at 18/02/13 18:52 did gyre > and gimble: >> On Mon, Feb 18, 2013 at 08:47:44AM -0800, David Strauss wrote: >> >> Dear David, all, >> >> >>> It's possible that a lot of it could also allocate on th

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Colin Guthrie
'Twas brillig, and Holger Hans Peter Freyther at 18/02/13 18:52 did gyre and gimble: > On Mon, Feb 18, 2013 at 08:47:44AM -0800, David Strauss wrote: > > Dear David, all, > > >> It's possible that a lot of it could also allocate on the stack or use >> stack-style management of a pool in heap. Th

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Holger Hans Peter Freyther
On Mon, Feb 18, 2013 at 08:47:44AM -0800, David Strauss wrote: Dear David, all, > It's possible that a lot of it could also allocate on the stack or use > stack-style management of a pool in heap. This is pretty > performance-critical code, and we're seeing similar CPU overhead. I think upstrea

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread David Strauss
On Sun, Feb 17, 2013 at 9:54 AM, Holger Freyther wrote: > Do you consider > cutting back on how you dynamically allocate strings? E.g. stop > using fopen, fgets, only have one dynamically tmp string for the > various format routines one is using sequentially? It's possible that a lot of it could

Re: [systemd-devel] High CPU usage of journald

2013-02-18 Thread Holger Freyther
Cristian Rodríguez opensuse.org> writes: Good Morning Cristian, > Why should systemd stop using standard IO functions to please some > obscure, out of the ordinary need? Could you please clarify obscure? So any embedded device that prints a couple of log messages on start of an application is

Re: [systemd-devel] High CPU usage of journald

2013-02-17 Thread Cristian Rodríguez
El 17/02/13 14:54, Holger Freyther escribió: So where does _int_malloc come from? I have used gdb to 'sample' it by hand. So the answer is from a lot of places. Do you consider cutting back on how you dynamically allocate strings? E.g. stop using fopen, fgets, only have one dynamically tmp strin

Re: [systemd-devel] High CPU usage of journald

2013-02-17 Thread Holger Freyther
Holger Freyther freyther.de> writes: > I am currently re-compiling my rootfs to not omit the framepointers and > then will hopefully be able to have useful output of perf. Is the current > behavior expected/wanted? Somehow backtrace generation is still broken (perf should be able to walk user s

[systemd-devel] High CPU usage of journald

2013-02-17 Thread Holger Freyther
Dear maintainers, first of all the good news. The same setup used to exhibit high memory usage (and exploding virtual address space). In a relatively idle system I see a constant CPU usage of journald of around 20% ( using the busybox top). The main issue with that is that the system starts to fee