Frame drops when 5G camera connects to 10G adapter

Hi,

I am using Aravis 0.8.26.

My camera’s resolution is 4096 x 4096, 16bit.
Maximum frame rate is 17.69fps.
When set to the maximum frame rate, 1 frame will be dropped periodically, and after gradually reducing the frame rate, no frame loss will be found at 17.60fps.

Then I changed another camera for testing and the same problem occurred.
Another camera’s resolution is 5120 x 5120, 12bit.
Maximum frame rate is 15.09fps.
When it is set to the maximum frame rate, it will periodically drop 1 frame. After gradually reducing the frame rate, it will no longer drop frames when the frame rate is 15.00fps.

I calculated that both cameras transmit about 563.2MB of data per second without dropping frames. Does it mean that the performance of aravis can only reach this amount of data?
Or is there any other way to make these two cameras not drop frames at the maximum frame rate?

I have set Jumbo frame to 9014.
Set auto_packet_size, the packet size = 7728.
socket-buffer-size = payload x 6.

Hi Cynthia,

I have never ran Aravis over a 10Gb/s connection. The transfer is probably limited by the CPU. Could you check the CPU use when arv-camera-test-0.8 is running and report the value here ?

Please also send the output of arv-camera-tes-0.8 with debugging enabled (-d all). It will tell us the number of missing packets.

You may try the packet socket mode. It requires some elevated privileges, so you have to run arv-camera-test-0.8 as root. Please tell us if it improve things for you, and the CPU use.

Thanks.

Hi, Emmanuel.
I don’t know how to set the size of socket-buffer using the arv-camera-tes-0.8 program, if I don’t set it all frames are lost. The output as flows:

Looking for the first available camera
vendor name = Vi
model name = Science16m17f5g
device serial number = 999999
image width = 4096
image height = 4096
horizontal binning = 1
vertical binning = 1
exposure = 1004.48 µs
gain = 0 dB
payload = 33554432 bytes
gv n_stream channels = 1
gv current channel = 0
gv packet delay = 0 ns
gv packet size = 7728 bytes
0 frame/s - 0 MiB/s - 11 errors
0 frame/s - 0 MiB/s - 14 errors
0 frame/s - 0 MiB/s - 12 errors
0 frame/s - 0 MiB/s - 14 errors
0 frame/s - 0 MiB/s - 13 errors
n_completed_buffers = 0
n_failures = 64
n_underruns = 0
n_timeouts = 64
n_aborted = 0
n_missing_frames = 21
n_size_mismatch_errors = 0
n_received_packets = 161425
n_missing_packets = 279671
n_error_packets = 1
n_ignored_packets = 0
n_resend_requests = 993666
n_resent_packets = 24769
n_resend_ratio_reached = 0
n_resend_disabled = 1
n_duplicated_packets = 0
n_transferred_bytes = 1242181660
n_ignored_bytes = 0

I modified arvcameratest.c and set socket-buffer-size to payload*6. The test output is as follows:

Looking for the first available camera
[15:01:11.276] 🅸 interface> Found 0 USB3Vision device (among 6 USB devices)
[15:01:11.276] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.1.55 (192.168.1.255)
[15:01:11.276] 🅸 interface> [GvDiscoverSocket::new] Add interface 127.0.0.1 (127.255.255.255)
[15:01:11.386] 🅸 interface> [GvInterface::discovery] Device ‘Vi-Science16m17f5g-999999’ found (interface 192.168.1.55) user_id ‘’ - MAC ‘00:e0:0c:7e:02:9f’
[15:01:11.386] 🅸 device> [GvDevice::new] Interface address = 192.168.1.55
[15:01:11.386] 🅸 device> [GvDevice::new] Device address = 192.168.1.12
[15:01:11.486] 🅸 device> [GvDevice::load_genicam] xml url = ‘Local:Science16m17f5g_V1.0.0.xml;FEC00000;00029F9D’ at 0x200
[15:01:11.486] 🅸 device> [GvDevice::load_genicam] Xml address = 0xfec00000 - size = 0x29f9d - Science16m17f5g_V1.0.0.xml
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘DeviceVersion’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘DeviceManufacturerInfo’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentIPConfigurationLLA’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentIPConfigurationDHCP’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentIPConfigurationPersistentIP’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentIPAddress’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentSubnetMask’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevCurrentDefaultGateway’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevNumberOfNetworkInterfaces’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevPersistentIPAddress’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevPersistentSubnetMask’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevPersistentDefaultGateway’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevStreamChannelCount’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevStreamChannelSelector’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPAddrCalc’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevTimestampTickFrequency’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPHostPort’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPSFireTestPacket’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPSDoNotFragment’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPSBigEndian’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPSPacketSize’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCPD’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCDA’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCSP’
[15:01:11.986] 🅸 genicam> [Gc::set_default_node_data] Add ‘ArvGevSCCFGMultipart’
[15:01:11.986] 🅸 device> [GvDevice::new] Device endianness = big
[15:01:11.986] 🅸 device> [GvDevice::new] Packet resend = yes
[15:01:11.986] 🅸 device> [GvDevice::new] Write memory = yes
[15:01:11.986] 🅸 device> [GvDevice::new] Legacy endianness handling = no
[15:01:11.996] 🅸 device> [GvDevice::auto_packet_size] Try packet size = 4144 (4144 - min: 4144 - max: 8240 - inc: 512)
[15:01:11.996] 🅸 device> [GvDevice::auto_packet_size] Try packet size = 6192 (6192 - min: 4144 - max: 8240 - inc: 512)
[15:01:11.996] 🅸 device> [GvDevice::auto_packet_size] Try packet size = 7216 (7216 - min: 6192 - max: 8240 - inc: 512)
[15:01:11.996] 🅸 device> [GvDevice::auto_packet_size] Try packet size = 7728 (7728 - min: 7216 - max: 8240 - inc: 512)
[15:01:11.996] 🅸 device> [GvDevice::auto_packet_size] Packet size set to 7728 bytes
“Packet size set to 7728 bytes on camera Vi-999999”
vendor name = Vi
model name = Science16m17f5g
device serial number = 999999
image width = 4096
image height = 4096
payload = 33554432 bytes
frame rate = 17.69000
gv n_stream channels = 1
gv current channel = 0
gv packet delay = 0 ns
[15:01:11.996] 🅸 device> [GvDevice::create_stream] Number of stream channels = 1
[15:01:12.006] 🅸 device> [GvDevice::auto_packet_size] Current packet size check successfull (7728 bytes)
[15:01:12.006] 🅸 stream> [GvStream::stream_new] Stream channel = 0
[15:01:12.006] 🅸 stream> [GvStream::stream_new] Packet size = 7728 byte(s)
[15:01:12.006] 🅸 stream> [GvStream::stream_new] Destination stream port = 53906
[15:01:12.006] 🅸 stream> [GvStream::stream_new] Source stream port = 53906
[15:01:12.006] 🅸 stream> [GvStream::loop] Standard socket method
gv packet size = 7728 bytes
socket buffer size = 6 payload
stream buffer size = 50
[15:01:12.006] 🆆 genicam> [GcEnumeration::set_string_value] entry Continuous not found
[15:01:12.046] 🅸 stream-thread> [GvStream::update_socket] Socket buffer size set to 201326592
T 17 frames/s - 570 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
last_frame_id 473, frame-id 475
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
last_frame_id 710, frame-id 712
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
last_frame_id 948, frame-id 950
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 18 frames/s - 604 MiB/s
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
last_frame_id 1186, frame-id 1188
T 17 frames/s - 570 MiB/s
T 18 frames/s - 604 MiB/s
n_completed_buffers = 1203
n_failures = 0
n_underruns = 0
n_timeouts = 0
n_aborted = 0
n_missing_frames = 4
n_size_mismatch_errors = 0
n_received_packets = 5261686
n_missing_packets = 0
n_error_packets = 0
n_ignored_packets = 0
n_resend_requests = 0
n_resent_packets = 0
n_resend_ratio_reached = 0
n_resend_disabled = 0
n_duplicated_packets = 0
n_transferred_bytes = 40488064904
n_ignored_bytes = 0
[15:02:20.480] 🅸 stream> bins ;frame_retent; packet_time;inter_packet
0; 0; 172807; 5267054
2000; 0; 192871; 1
4000; 0; 178706; 0
6000; 0; 185628; 0
8000; 0; 192885; 0
10000; 0; 174216; 0
12000; 0; 190133; 0
14000; 0; 192888; 0
16000; 0; 172030; 0
18000; 0; 192305; 0
20000; 0; 192852; 0
22000; 0; 171766; 0
24000; 0; 192521; 0
26000; 0; 192630; 0
28000; 0; 171803; 0
30000; 0; 192844; 0
32000; 0; 192555; 0
34000; 0; 171713; 0
36000; 0; 192966; 0
38000; 0; 192038; 0
40000; 0; 172279; 0
42000; 0; 192882; 0
44000; 0; 190910; 0
46000; 0; 173487; 0
48000; 0; 192829; 0
50000; 0; 187731; 0
52000; 0; 176609; 0
54000; 0; 192914; 0
56000; 1205; 80462; 0
-------------
>= 58000; 0; 0; 0
< 0; 0; 0; 0
min : 56688; 0; 0
max : 56865; 56865; 2107
last max at : 941; 4118412; 3940921
counter : 1205: 5268260: 5267055
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_completed_buffers = 1205
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_failures = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_underruns = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_timeouts = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_aborted = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_missing_frames = 4
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_size_mismatch_errors = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_received_packets = 5268260
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_missing_packets = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_error_packets = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_ignored_packets = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_resend_requests = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_resent_packets = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_resend_ratio_reached = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_resend_disabled = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_duplicated_packets = 0
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_transferred_bytes = 40538508780
[15:02:20.480] 🅸 stream> [GvStream::finalize] n_ignored_bytes = 0
[15:02:20.480] 🅸 stream> [Stream::finalize] Flush 48 buffer[s] in input queue
[15:02:20.480] 🅸 stream> [Stream::finalize] Flush 2 buffer[s] in output queue

Among these printed contents, I deleted more than 20,000 lines of the following content:
“🆆 stream-thread> [GvStream::loop] receive_messages failed: Unable to complete a non-blocking socket operation immediately.”