@@ -107,7 +107,8 @@ def _set_net_value(commands_needed: list[str], sudo: str, name: str, value: int)
107107 return None
108108
109109
110- TARGET_RMEM_SIZE = 2097152 # prev was 67108864
110+ TARGET_RMEM_SIZE = 67108864
111+ TARGET_RMEM_SIZE_MACOS = 2097152 # why not 67108864 ?
111112TARGET_MAX_SOCKET_BUFFER_SIZE_MACOS = 8388608
112113TARGET_MAX_DGRAM_SIZE_MACOS = 65535
113114
@@ -133,7 +134,7 @@ def check_buffers() -> tuple[list[str], int | None]:
133134 current_max = _set_net_value (
134135 commands_needed , sudo , "kern.ipc.maxsockbuf" , TARGET_MAX_SOCKET_BUFFER_SIZE_MACOS
135136 )
136- _set_net_value (commands_needed , sudo , "net.inet.udp.recvspace" , TARGET_RMEM_SIZE )
137+ _set_net_value (commands_needed , sudo , "net.inet.udp.recvspace" , TARGET_RMEM_SIZE_MACOS )
137138 _set_net_value (commands_needed , sudo , "net.inet.udp.maxdgram" , TARGET_MAX_DGRAM_SIZE_MACOS )
138139 else :
139140 # For other systems, skip buffer configuration
@@ -155,7 +156,7 @@ def check_system() -> None:
155156 multicast_commands = check_multicast ()
156157 buffer_commands , current_buffer_size = check_buffers ()
157158
158- # Check multicast first - this is critical
159+ # Multicast configuration
159160 if multicast_commands :
160161 logger .error (
161162 "Critical: Multicast configuration required. Please run the following commands:"
@@ -165,7 +166,7 @@ def check_system() -> None:
165166 logger .error ("\n Then restart your application." )
166167 sys .exit (1 )
167168
168- # Buffer configuration is just for performance
169+ # Buffer configuration is critical for throughput and packet loss
169170 elif buffer_commands :
170171 if current_buffer_size :
171172 logger .warning (
0 commit comments