Mailing List Archive

omfile flushing behaviour
Another minor question.

In legacy format, you may prefix each entry with the minus "-" sign to
omit syncing the file after every logging.

What's the equivalent when directly using omfile?  Is it
flushOnTXEnd="off", or sync="off"? (the latter is default anyway)

Thanks,

Brian.

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: omfile flushing behaviour [ In reply to ]
El mié., 11 sept. 2019 a las 15:56, Brian Candler via rsyslog
(<rsyslog@lists.adiscon.com>) escribió:
>
> Another minor question.
>
> In legacy format, you may prefix each entry with the minus "-" sign to
> omit syncing the file after every logging.

nope - it has no meaning at all. Sync never happens exceot when
explicitely enabled. I don't know why distros still have it in their
default...

>
> What's the equivalent when directly using omfile? Is it
> flushOnTXEnd="off", or sync="off"? (the latter is default anyway)
>

"sync" it is.

doc: https://www.rsyslog.com/doc/v8-stable/configuration/modules/omfile.html

Rainer
> Thanks,
>
> Brian.
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: omfile flushing behaviour [ In reply to ]
by default, rsyslog always buffers logs and doesn't sync after each message, so
the - is ignored.

David Lang

On Wed, 11 Sep 2019, Brian Candler via rsyslog wrote:

> Date: Wed, 11 Sep 2019 14:55:55 +0100
> From: Brian Candler via rsyslog <rsyslog@lists.adiscon.com>
> To: Brian Candler via rsyslog <rsyslog@lists.adiscon.com>
> Cc: Brian Candler <b.candler@pobox.com>
> Subject: [rsyslog] omfile flushing behaviour
>
> Another minor question.
>
> In legacy format, you may prefix each entry with the minus "-" sign to
> omit syncing the file after every logging.
>
> What's the equivalent when directly using omfile?  Is it
> flushOnTXEnd="off", or sync="off"? (the latter is default anyway)
>
> Thanks,
>
> Brian.
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
> LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: omfile flushing behaviour [ In reply to ]
The original intent of sync, to guarantee a successful commit to hard
disk for every write, is generally lost in modern environments. 
Virtualization, and the use of object storage, obfuscate the physical
constructs beneath such that the application and/or server can no longer
make hardware guarantees. For this reason attempting sync in that kind
of environment might make you feel good, but it isn't doing exactly what
that old school guarantee implies.

In the case of a physical server with a local disk sync can still
provide the guarantee, but it is expensive from a resource standpoint to
do so.  Advances in controller and disk technology have come a very long
way since the functionality of sync was introduced, and to this old
admins view most of the reasons for using it are in the process of
disappearing into history.

It probably explains why the "-" is now meaningless in the config files,
why not doing it is the default, and why you must explicitly enable the
behavior yourself assuming the responsibility for any performance
degradation.

Regards,




On 9/11/19 12:57 PM, David Lang via rsyslog wrote:
> by default, rsyslog always buffers logs and doesn't sync after each
> message, so the - is ignored.
>
> David Lang
>
> On Wed, 11 Sep 2019, Brian Candler via rsyslog wrote:
>
>> Date: Wed, 11 Sep 2019 14:55:55 +0100
>> From: Brian Candler via rsyslog <rsyslog@lists.adiscon.com>
>> To: Brian Candler via rsyslog <rsyslog@lists.adiscon.com>
>> Cc: Brian Candler <b.candler@pobox.com>
>> Subject: [rsyslog] omfile flushing behaviour
>>
>> Another minor question.
>>
>> In legacy format, you may prefix each entry with the minus "-" sign
>> to omit syncing the file after every logging.
>>
>> What's the equivalent when directly using omfile?  Is it
>> flushOnTXEnd="off", or sync="off"? (the latter is default anyway)
>>
>> Thanks,
>>
>> Brian.
>>
>> _______________________________________________
>> rsyslog mailing list
>> http://lists.adiscon.net/mailman/listinfo/rsyslog
>> http://www.rsyslog.com/professional-services/
>> What's up with rsyslog? Follow https://twitter.com/rgerhards
>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
>> myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT
>> POST if you DON'T LIKE THAT.
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
> myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST
> if you DON'T LIKE THAT.


_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.