Increase OS UDP Buffers to Improve Performance

Linux places very restrictive limits on the performance of UDP protocols by limiting the size of the UDP traffic that is allowed to buffer on the receive socket. It is highly recommended that you increase these OS limits to at least 25MB before trying to run UDP traffic to your server. 25MB is just a recommendation.

Linux

Check the current UDP/IP receive buffer default and limit by typing the following commands:

If the values are less than 26214400 bytes (25MB) you should add the following lines to the /etc/sysctl.conf file:

Changes to /etc/sysctl.conf do not take effect until reboot. To update the values immediately, type the following commands as root:

BSD/Darwin

On BSD/Darwin systems you need to add about a 15% padding to the kernel limit socket buffer. Meaning if you want an 25MB buffer (8388608 bytes) you need to set the kernel limit to 26214400*1.15 = 30146560. This is not documented anywhere but happens in the kernel here.

Check the current UDP/IP buffer limit by typing the following command:

If the value is less than 30146560 bytes you should add the following lines to the /etc/sysctl.conf file (create it if necessary):

Changes to /etc/sysctl.conf do not take effect until reboot. To update the values immediately, type the following commands as root:

Go & Software enthusiast. Working at @InfluxDB. Huge fan of @Marutaro2000.

Go & Software enthusiast. Working at @InfluxDB. Huge fan of @Marutaro2000.

Ubuntu doesn’t ship with snmp installed, nor does it ship with common MIB files that make OID lookup easier. Not only that, by default Ubuntu disables auto-loading of MIB files.

Here are steps to get SNMP working properly on Ubuntu:

Now you should be able to lookup your SNMP OIDs and MIBs:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store