I need to increase UDP input plugin performance only for port 514.
I have a machine with 16 CPU and 32 GB RAM
I use logstash 2.3.3 version with "-b 500 -w 2" options
What does the rest of the pipeline configuration look like? If filters and outputs can't keep up, backpressure will cause the udp inputs to drop packets.
I have spent A LOT of time figuring out how to get the most performance from the UDP input, which is critical for syslog and especially for flow (Netflow, IPFIX, sFlow) use-cases. I am planning a more complete article on this topic, explaining the "why" behind the following. For now, just try this...
Run these commands and add them to a file under /etc/sysctl.d so they are applied at each new start:
In the startup.options file change LS_NICE to 0 and re-run system-install:
# Nice level
LS_NICE=0
After making these changes you can (re)start Logstash. You should see a significant boost in throughput.
That all said, what @magnusbaeck says is true. Back pressure can cause the inputs to slow/pause which can cause lost packets once buffers fill. The above changes will help, but if throughput of your pipeline is less than the rate of incoming messages, increases kernel buffers and input queue_size will only delay the inevitable.
Back pressure during event peaks remains one of the biggest reasons to add a message queue (like redis or kafka) to the ingest architecture:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.