22.10.2013 18:17, David Lang:

I think this is going to be a source of ongoing confusion for users. I don't see it being reasonable to create a global() function that can do everything that anyone ever wants to do with global variables in one shot. At least not until you start allowing a series of statements to be passed to the funtion, effectively turning it into

atomic(
  statement1
  statement2
  statement3
)

that combines these statements into one as far as the SIMD engine is concerned.


Yes, that is what I've proposed earlier. I've also tried to emulate sequential behaviour with call:

ruleset (name="xxx" queue.dequeuebatchsize="1") {
    set $/zz = $/zz + 1;
    set $!msgcnt = $/zz;
}

call xxx

But, unfortunately, this does not work. Perhaps queue parameters are ignored in this case, because no queue is created. So each statement in called ruleset is evaluated inline.

going off on a slight tangent, reading on SIMD (since I didn't recognize the abbrevidation and had been misunderstanding your prior explanation), this approach seems odd to take on modern CPUs. by executing the same statement for each message in turn, and then going on to the next staement, it seems like you are thrashing the CPU cache as I would expect that the cache footprint for the data being manipulated in a mesage to be overwelmingly larger than the cache footprint of the statement being executed. It would seem that you would be in much better shape to run all the commands against a single message, keeping that message in the cache as much as possible, and then going on to the next message. Not to mention the increased memory use if processing each message sets a bunch of variables, because the current approach requires that all the variables for all the messages be generated at the same time, rather than creating all the variables for one message, then being able to throw them all away when you go to work on the next message.


I presume, that message data is substantially smaller than code size. Say, average message is 200 bytes and code to handle it is several hundreds of kilobytes. But I also wonder what is the reason of having SIMD engine. Perhaps it is possibility to submit all messages at once for a single action?


--
Pavel Levshin

_______________________________________________
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.

Reply via email to