Discussion:
[rsyslog] Limiting memory queuing in kilobyte/megabyte values
Alan Martinovic
2018-11-16 11:02:58 UTC
Permalink
Hi,
I'm trying to limit the amount of memory rsyslog will use for queuing.
All the other queues besides the main queue are direct.

The settings related to this are:
* queue.size -> This is the maximum size of the queue in number of messages. [1]
* $MaxMessageSize -> allows to specify maximum supported message size [2]

I'm assuming that queue.size * $MaxMessageSize = RAM queuing limit.

Example:
$MaxMessageSize 8k
queue.size="1000"

Am expecting that wont consume more then ~8kB (it might be ie. 12mB
but wont ever be 50mB) of ram for queuing.


Is this the correct interpretation?

Be Well,
Alan


[1] https://www.rsyslog.com/doc/v8-stable/rainerscript/queue_parameters.html#queue-dequeuebatchsize
[2] https://www.rsyslog.com/doc/v8-stable/configuration/global/index.html
_______________________________________________
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.
David Lang
2018-11-16 18:48:30 UTC
Permalink
Post by Alan Martinovic
Hi,
I'm trying to limit the amount of memory rsyslog will use for queuing.
All the other queues besides the main queue are direct.
* queue.size -> This is the maximum size of the queue in number of messages. [1]
* $MaxMessageSize -> allows to specify maximum supported message size [2]
I'm assuming that queue.size * $MaxMessageSize = RAM queuing limit.
$MaxMessageSize 8k
queue.size="1000"
Am expecting that wont consume more then ~8kB (it might be ie. 12mB
but wont ever be 50mB) of ram for queuing.
Is this the correct interpretation?
you have the right idea, but the storage per message is considerably larger. The
message gets parsed into various fields, so the per-message storage is a bit
larger than 2x maxmessagesize. In addition, you can create your own variables
(including from parsing the message) and those variables are then stored in a
JSON structure. If you do a lot with that, the resulting storage can be
significantly larger per message. If you don't, the memory footprint of the
queue won't be a lot more than 2x max message size * queue size

log some messages with the format of RSYSLOG_DebugFormat and you will see the
type of thing I'm talking about.

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.
Continue reading on narkive:
Loading...