[lxc-users] systemd and logging in containers

Fajar A. Nugraha list at fajar.net
Fri Jun 20 10:41:47 UTC 2014


On Fri, Jun 20, 2014 at 5:36 PM, István Király <LaKing at d250.hu> wrote:
>
> I enabled systemd-journald on all containers now, and in each container it was using ~ 7% cpu power. Since there are over 100 containers, it slowed down the system too much. 0% idle.
>
> :(
>
> Seems I need another solution for logging.
>

Have you tried this:
http://permalink.gmane.org/gmane.comp.file-systems.btrfs/35844
Basically Storage=volatile and use syslog-ng . Might be relevant.

-- 
Fajar


>
>
> On Wed, Jun 11, 2014 at 12:15 AM, Michael H. Warfield <mhw at wittsend.com> wrote:
>>
>> On Tue, 2014-06-10 at 16:51 -0400, Leonid Isaev wrote:
>> > Hi,
>> >
>> > On Tue, Jun 10, 2014 at 03:43:12PM -0400, Michael H. Warfield wrote:
>> > > Date: Tue, 10 Jun 2014 15:43:12 -0400
>> > > From: "Michael H. Warfield" <mhw at WittsEnd.com>
>> > > To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
>> > > Subject: Re: [lxc-users] systemd and logging in containers
>> > > X-Mailer: Evolution 3.10.4 (3.10.4-2.fc20)
>> > >
>> > > On Tue, 2014-06-10 at 21:19 +0200, István Király wrote:
>> > > > Hi list, ..
>> > >
>> > > > Fedora 20 host and containers.
>> > >
>> > > > Some programms are logging normal, apache, mariadb, ..
>> > >
>> > > > But some others have no log at all, for example maillog is 0 in all my
>> > > > containers, but they have postfix / dovecot running.
>> > >
>> > > > I experimented a little today, with a custom script echoing messages
>> > > > to standard output, and created a systemd unit file for it. ..
>> > >
>> > > > When I run this script as service on the host, I get the messages from
>> > > > systemctl status test.service.
>> > >
>> > > > When I run this script from a container, the messages are not in
>> > > > systemctl status, and I can't find them.
>> > >
>> > > > Checked if maybe packages are missing, but all seems to be okay, ..
>> > >
>> > > > .. anyone have any ideas?
>> > >
>> > > Yes.
>> > >
>> > > Several revs back on systemd, the systemd-journald.service was horribly
>> > > broken and, at random, eating CPU time for lunch, particularly in
>> > > containers.  That turned out to be a bug involving (iirc) logging
>> > > objects and object id's and user logs with conflicting ids.
>> > >
>> > > During this period of time, I coded the Fedora template to disable and
>> > > mask systemd-journald.service.  They have since fixed this bug and I've
>> > > reenabled it in the template, but containers built prior to this will
>> > > have the systemd-journal service disabled and masked.
>>
>> > I'm surprised it actually worked -- what systemd version was that?
>>
>> It did at the time.  :-)=)  I don't recall the specific version but I
>> recall having a hell of a time with journald sucking down the CPU under
>> F18 and F19.
>>
>> > I don't think you can 'disable' (stop) journal in new-ish systemd (i.e. >=210)
>> > because it is a core module, so the best you can do is to set Storage=none in
>> > journald.conf.
>>
>> I'll have to look into that.
>>
>> > HTH,
>>
>> Thanks!
>>
>> Regards,
>> Mike
>> --
>> Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
>>    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>>    NIC whois: MHW9          | An optimist believes we live in the best of all
>>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
>>
>>
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
>
> --
> Király István
> +36 209 753 758
> LaKing at D250.hu
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list