Thanks, that's what I was thinking, but I wanted to double check.

David Lang

On Thu, 6 Aug 2020, Rainer Gerhards wrote:

The first one is a bit unsafe, as rsyslog currently opens multiple
files in this case (there is one personal item for me on the todo list
to make this only once via a global cache, but nobody ever asked for
it, so it has low prio).

The performance of the second should be better, assuming that the
ruleset does not have a queue defined on it.

Rainer

El mié., 5 ago. 2020 a las 23:25, David Lang via rsyslog
(<[email protected]>) escribió:

I'm crafting a new enterprise-wide config and making heavy use of dynafiles
?path;json-fmt

is there any difference in how rsyslog handles it if I have a bunch of

if foo then
   set $.path=bar
   ?path
   stop
if bar than
   set $.path=baz
   ?path
   stop

type of logic vs

if foo then
   set $.path=bar
   call sendpath
   stop
if bar then
   set $.path=baz
   call sendpath
   stop

will the first cause rsyslog to have same file open multiple times (with
potentially overlapping writes, especially if there end up being multiple worker
threds) or does rsyslog have internal locking that makes this safe. Is there a
performance win to either?

doing the second with a queue on the sendpath ruleset is clearly safe, but given
that this is only doing file writes, there would probably be more congestion
over the queue locking than anything else.

David Lang
_______________________________________________
rsyslog mailing list
https://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
https://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.

Reply via email to