it looks like adding dyn_stats calls makes a small, but noticable difference in my throughput. The documentation for dyn_stats says that it tries to get a lock, but if it can't it doesn't wait and retry, instead it just throws away the update.

This makes me thing that the dyn_stats stuff (and probably pstats as well) is built on the wrong model.

Instead of having a master variable that gets updated from multiple threads, requiring a lock, we should have thread-local variables that can be updated without locks, and when pstats runs, it pulls the data (flagging it to be cleared if appropriate).

This adds more overhead when spitting out the stats, but it reduces the overhead in the much more common fast path while we are processing messages.

David Lang
_______________________________________________
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