WildFly 10.1 Warnings & Tweaking Ubuntu 17.04

On a fresh workstation install of WildFly it may throws some warnings about memory and buffer resources available. A few tweak to these settings in Linux will resolve these warnings.

sysctl -w net.core.rmem_max=26214400
sysctl -w net.core.wmem_max=26214400
sysctl -w net.core.rmem_default=65536
sysctl -w net.core.wmem_default=65536
sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'
sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608'
sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608'

 

If you wish for these settings to survive a reboot edit /etc/sysctl.conf and append the following lines to the bottom of the file:

net.core.rmem_max=26214400
net.core.wmem_max=26214400
net.core.rmem_default=65536
net.core.wmem_default=65536
net.ipv4.tcp_rmem='4096 87380 8388608'
net.ipv4.tcp_wmem='4096 65536 8388608'
net.ipv4.tcp_mem='8388608 8388608 8388608'
net.ipv4.route.flush=1