diff --git a/tangostationcontrol/tangostationcontrol/clients/udp_receiver.py b/tangostationcontrol/tangostationcontrol/clients/udp_receiver.py index c8d364c7bd2ea50b46dce5327cccf021082a851a..52170d5431d5b90394fd1b8cf647d9e5ebd07c5a 100644 --- a/tangostationcontrol/tangostationcontrol/clients/udp_receiver.py +++ b/tangostationcontrol/tangostationcontrol/clients/udp_receiver.py @@ -83,11 +83,15 @@ class UDPReceiver(Thread, StatisticsClientThread): ) if self.parameters["recv_buffer_size"] < self.options["recv_buffer_size"]: + # Typically this is the host OS not allowing us to allocate buffers + # of this size. Try increasing it using (as root): + # sysctl -w net.core.rmem_max=$((16*1024*1024)) logger.error( f"OS does not allow requested buffer size. " f"This could result in UDP packet loss. " f'Requested {self.options["recv_buffer_size"]} bytes, ' - f'got {self.parameters["recv_buffer_size"]}.' + f'got {self.parameters["recv_buffer_size"]}. Verify ' + f'if "sysctl net.core.rmem_max" is sufficiently large.' ) # specify what host and port to listen on diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics.py b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics.py index 1c8f0de551c3d387c7abb1fe7a680541ec6a7bb6..fe1f1093256253ab7757cfe8f40f8a81986c9a61 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics.py @@ -58,6 +58,7 @@ class Statistics(OPCUADevice): ) # size of UDP receive buffer udp_recv_buffer_size_R = AttributeWrapper( + doc="Buffer size for receiving UDP packets.", comms_id=StatisticsClient, comms_annotation={"type": "udp", "parameter": "recv_buffer_size"}, datatype=numpy.uint64,