Introduction
This document will explain how to use TCP with LUCID’s Atlas10 cameras.
Prerequisites
- Windows 10 64-bit (Windows 7 not supported)
- Atlas10 camera firmware v1.10.0.0 or higher
Note: ATX314S does not support TCP. - Arena SDK for Windows v1.0.31.5 or higher
Test Environment
System 1 – Streaming 1x Atlas10 camera
Motherboard | ASUS PRIME Z270-A |
Processor | Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz |
Memory | Kingston KHX2400C15D4 16GB (2x8GB) DDR4 SDRAM |
Operating System | Microsoft Windows 10 Professional (x64) version 19.09, build 18363.1082 |
Video | Intel HD Graphics 630 |
Storage | Samsung SSD 850 EVO 500GB |
Network Interface Card | PCIE-POE1-MG2 (MFR P/N: IOI GE10P-PCIE4XG301, 1-port 10G/5G/2.5G/1G PoE+ NBASE-T) |
System 2 – Streaming 4x Atlas10 cameras
Motherboard | ASUS WS X299 PRO/SE Intel LGA2066 M.2 PCIe USB3.1 Dual Lan ATA |
Processor | Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz |
Memory | Corsair VENGEANCE LPX 128GB (8x16GB) DDR4 DRAM 2933MHz (Quad Channel) |
Operating System | Microsoft Windows 10 Pro 64-bit version 20H2, build 19042.804 |
Video | Zotac nVidia GeForce GT710 2GB GDDR3 PCIe |
Storage | Kingston A2000 M.2 2280 500GB Internal Solid State Drive (SA2000M8/500G) |
Network Interface Card | 2x PCIE-POE2-MG (MFR P/N: IOI DGEAP2X-PCIE8XG302, 2-port 10G/5G/2.5G/1G PoE+ NBASE-T) |
PCIE-POE-MG2 Settings
- MFR P/N: IOI GE10P-PCIE4XG301
- 10G/5G/2.5G/1G PoE+ NBASE-T Ethernet Card
- Chipset: Marvell Aquantia AQC107
- Driver Version: 3.1.3, Date: 7/5/2021
PCIE-POE2-MG Settings
- MFR P/N: IOI DGEAP2X-PCIE8XG30
- 10G/5G/2.5G/1G PoE+ NBASE-T Ethernet Card
- Chipset: Marvell Aquantia AQC107
- Driver Version: 3.1.3, Date: 7/5/2021
Initial NIC Setup
Open your NIC properties window. Uncheck all Networking options except:
- LUCID Vision Labs Lightweight Filter Driver
- Internet Protocol Version 4 (TCP/IPv4)
- Internet Protocol Version 6 (TCP/IPv6) (not used by Arena SDK, but this must be enabled to utilize receive side coalescing)
Assign an IP Address and Subnet to your NIC:
Apply the following to cards featuring the Marvell Aquantia AQC107 chipset:
- Transmit Buffers: 4096
- Receiver Buffers: 4096
- Jumbo Packets: 16348 Bytes
- Interrupt Moderation: Enabled
- Interrupt Moderation Rate: Adaptive
- IPv4 Checksum Offload: Rx & Tx enabled
- TCP/UDP Checksum Offload (IPv4): Rx & Tx enabled
- Energy-Efficient Ethernet: Disabled
- Receive Segment Coalescing (IPv4): Enabled
- Receive Segment Coalescing (IPv6): Enabled
- Allow the computer to turn off this device to save power: Unchecked
Set TCP Receive Window Auto-tuning
We set the TCP autotuning to restricted to optimize the TCP connection. See the following article for more information:
Set Receive Window Auto-tuning Level to Restricted
netsh interface tcp set global autotuninglevel=restricted
Confirm you have set the auto-tuning level by looking at the output of:
netsh interface tcp show global
Example output:
Querying active state... TCP Global Parameters ---------------------------------------------- Receive-Side Scaling State : enabled Receive Window Auto-Tuning Level : restricted Add-On Congestion Control Provider : default ECN Capability : disabled RFC 1323 Timestamps : disabled Initial RTO : 1000 Receive Segment Coalescing State : enabled Non Sack Rtt Resiliency : disabled Max SYN Retransmissions : 4 Fast Open : enabled Fast Open Fallback : enabled HyStart : enabled Pacing Profile : off
Set TCP Acknowledgement Frequency
We set the TCP Acknowledgement Frequency to 1 to enable the NIC to immediately acknowledge packets. See the following article for further information:
Determine your Interface GUID in PowerShell (administrator permission required):
Get-NetAdapter | Format-List Name,InterfaceDescription,InterfaceGuid
Example output:
Name : Ethernet InterfaceDescription : Intel(R) Ethernet Connection I219-V InterfaceGuid : {8EA428C5-8537-4FC2-BCEF-406CEDE78660} Name : Ethernet 3 InterfaceDescription : Marvell FastLinQ Edge 10Gbit Network Adapter InterfaceGuid : {76BD61F4-3BE7-43FC-8126-8923C7C5CFE4}
Set the TcpAckFrequency = 1 for your NIC:
1. Go to the following location in your registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
where InterfaceGuid is the value found with the PowerShell command seen in the previous steps.
2. Create a new REG_DWORD entry: TcpAckFrequency, Value: 1
3. Reboot the system after applying this registry key
Enable Receive Side Coalescing
Receive Side Coalescing (RSC) allows the NIC to combine smaller packets into larger segments, reducing the number of smaller packets needed to be processed by the CPU.
List RSC-compatible NICs in PowerShell (administrator permission required):
Get-NetAdapterRsc | Format-List Name, InterfaceDescription
Example output:
Name : Ethernet 3 InterfaceDescription : Marvell FastLinQ Edge 10Gbit Network Adapter
Enable RSC on your NIC:
Set-NetAdapterRsc -Name "Ethernet 3"
where Ethernet 3 is the name of your NIC
Set-NetAdapterRsc -Name "*"
will enable RSC for all compatible NICs
Verify that RSC has been enabled with no errors with the following PowerShell command:
Get-NetAdapterRsc
Example output:
Using TCP
To turn on TCP mode, set TCPEnable = True:
In C++ code:
Arena::IDevice* pDevice = pSystem->CreateDevice(deviceInfos[0]); Arena::SetNodeValue<bool>(pDevice->GetNodeMap(), "TCPEnable", true); // When using TCP, there is no need to enable packet resend. // The packet delay and bandwidth reserve should be set to 0 // to maximize TCP efficiency. std::cout << TAB1 << "GevSCPD = " << 0 << std::endl; Arena::SetNodeValue<int64_t>(pDevice->GetNodeMap(), "GevSCPD", 0); std::cout << TAB1 << "DeviceLinkThroughputReserve = " << 0 << std::endl; Arena::SetNodeValue<int64_t>(pDevice->GetNodeMap(), "DeviceLinkThroughputReserve", 0); // It is not necessary to set the GevSCPSPacketSize node when TCPEnable = true. // The NIC should be set to the maximum available jumbo frame size.
When the camera is streaming, you can verify that TCP packets are being coalesced on the NIC with the following PowerShell command:
(Get-NetAdapterStatistics -Name "Ethernet 3").RscStatistics
where Ethernet 3 is the name of your NIC
Example output: