-
Notifications
You must be signed in to change notification settings - Fork 63
Extending Network Buffers
You can extend maximal network buffer sizes by doing following steps:
- Add the following text to file
/etc/sysctl.conf
:
# Extended network buffers for UltraGrid
net.core.wmem_max = 8388608
net.core.rmem_max = 72990720 # for uncompressed 8K
- After the file is edited, run
sudo sysctl -p
to apply the changes
Note: The above values are recommended for 8K uncompressed video. For lower resolution video it can be proportionally lower.
For UltraGrid to run smoothly, you need to extend the network buffers. To do this, open the file /etc/sysctl.conf
with any text editor and the text to it (or modify the current entry, if the values are already present in the file):
# Extended network buffers for UltraGrid
kern.ipc.maxsockbuf=23777280
net.inet.udp.recvspace=21135360 # this may not be necessary
You should also execute following command to apply the setting instantly without reboot and to check if it proceeds flawlessly:
sudo sysctl -w kern.ipc.maxsockbuf=23777280
If macOS is reporting something like:
sysctl: kern.ipc.maxsockbuf=23777280: Result too large
You'd need to execute following command and reboot:
sudo nvram boot-args="ncl=262144" # or 131072 for OS X 10.6 or below
If you are not allowed to execute the above command, it is necessary to boot into the macOS Recovery to extend the mbuf pool size. To do so, please follow About macOS Recovery. In the Recovery mode launch Terminal from the Utilities menu in the menu bar and execute the above command.
You must restart your computer for the changes to take effect:
sudo shutdown -r now
Note: Given network buffer sizes are 4K (~20 MB).
- open configuration dialog of your NIC (Control Panels → Device Manager → Network Adapters → Device)
- select tab Advanced
- from the list, select Performance Options, click Properties button
- set Receive Buffers to 2048 KiB or more if possible (the actual maximum depends on driver and may vary from 2 MiB (integrated NIC) to 32 MiB (10 GE NIC)
If you have any technical or non-technical question or suggestion please feel free to contact us at