On Fri, 7 Apr 2017, Peter Viskup wrote:
Just did some analysis of rsyslog stats counters and found the following.
The maxrss counter is increasing accordingly to size of queue.
Seems there is much higher overhead than expected.
I tried the message sizes of 1840/940/640/340 characters.
These are the outcomes:
size avg_mem_footprint_per_message
340 ~1024
640 ~1330
940 ~1630
1840 ~2530
size VmPeak_150000_messages_in_queue
340 859108 kB
640 715740 kB
940 859128 kB (stopped at ~145000 messages in queue)
1840 1053580 kB
From these numbers it is obvious the static overhead of memory
footprint for one message logged (doesn't matter of the message
length) to file is ~690 Bytes.
I suspect that it's not quite this simple, but close. I would guess that the
length of the hostname and syslogtag affect this, and if the timestamp is the
short traditional timestamp or the longer new format that includes year and
timezone will affect this a bit.
but those variations probably don't have that big an effect (tens of bytes, not
hundreds)
That's more overhead than I expected.
would you mind posting this to the mailing list? I thing others would find it
useful.
David Lang
Numbers were counted from rsyslog stats module only. With one TCP
forward queue (target not available).
Messages generated by:
~# while true; do echo -n .; logger -t perftest -i "xx(how log the
message is needed)xx"; done
Then stat counters processed by (may be improved):
~# awk '{gsub(/size=|maxrss=/,"")} /resource-usage/{m=$9} /action 1
queue:/{q=$9} {print m"\t"q}' /var/log/rsyslog-stats.300
_______________________________________________
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.