rsyslog转发日志非常缓慢

我configuration了rsyslog,通过udp端口将一些日志转发到logstash。 我正在发送很多事件给rsyslog。 Rsyslog正确地获取所有的事件队列。 但是Rsyslog发送的事件非常缓慢

logstash每30到40秒获得大约50-100个事件。 不立即或连续发送。

我configuration了将事件发送到文件的rsyslog conf。 另外,我创build了用于发送事件的RAM磁盘以避免磁盘I / O性能问题。

结果是一样的。 Rsyslog在主队列中有很多事件(5000-10000),每20-30秒发送大约30-40个事件

Rsyslog版本是8.21

问题在我的configuration中

Rsyslog.conf:

module(load="imudp") input(type="imudp" port="5550" ruleset="rs1") module( load="impstats" interval="5" # how often to generate stats resetCounters="on" # to get deltas (eg # of messages submitted in the last 10 seconds) log.file="/tmp/stats" # file to write those stats to log.syslog="off" # don't send stats through the normal processing pipeline. More on that in a bit ) main_queue( queue.type="LinkedList" queue.workerthreads="4" queue.dequeueBatchSize="100" queue.size="10000" ) ruleset(name="rs1") { action(type="omfwd" Target="localhost" Port="5570" Protocol="udp") #action(type="omfile" dirCreateMode="0777" FileCreateMode="0777" File="/run/shm/messages" }