diff --git a/confluent_server/confluent/discovery/protocols/slp.py b/confluent_server/confluent/discovery/protocols/slp.py index b84b0e27..f66975b2 100644 --- a/confluent_server/confluent/discovery/protocols/slp.py +++ b/confluent_server/confluent/discovery/protocols/slp.py @@ -492,8 +492,10 @@ def scan(srvtypes=_slp_services, addresses=None, localonly=False): """ net = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) net4 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - # TODO: increase RCVBUF to max, mitigate chance of + # increase RCVBUF to max, mitigate chance of # failure due to full buffer. + net.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 16777216) + net4.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 16777216) # SLP is very poor at scanning large counts and managing it, so we # must make the best of it # Some platforms/config default to IPV6ONLY, we are doing IPv4 diff --git a/confluent_server/setup.py.tmpl b/confluent_server/setup.py.tmpl index 445e2d08..9c089247 100644 --- a/confluent_server/setup.py.tmpl +++ b/confluent_server/setup.py.tmpl @@ -20,6 +20,7 @@ setup( 'pyghmi>=0.6.5'], scripts=['bin/confluent', 'bin/confluentdbutil'], data_files=[('/etc/init.d', ['sysvinit/confluent']), + ('/usr/lib/sysctl.d', 'sysctl/confluent.conf'), ('/usr/lib/systemd/system', ['systemd/confluent.service']), ('/opt/confluent/lib/python/confluent/plugins/console/', [])], diff --git a/confluent_server/sysctl/confluent.conf b/confluent_server/sysctl/confluent.conf new file mode 100644 index 00000000..3559d158 --- /dev/null +++ b/confluent_server/sysctl/confluent.conf @@ -0,0 +1,2 @@ +# Increase available receive buffers for discovery scans +net.core.rmem_max = 2097152