Jetson Nano gigabit ethernet not working

I can not get Jetson Nano (ubuntu 18.04 , 4GB ram) to achieve gigabit ethernet speeds required for my ethernet GigE camera.
When running my code network speed seem to be limited to around 18 MiB/s.


I have a static IP with mtu of 9000 (required by camera), link negotiation is Automatic (using manual with speed 1Gb/s I only got around 10MiB/s).
I also ran the following lines but they did not improve the speed at all:

sudo sysctl -w net.core.rmem_max=33554432
sudo sysctl -w net.core.wmem_max=33554432
sudo sysctl -w net.core.rmem_default=33554432
sudo sysctl -w net.core.wmem_default=33554432

I designed my code in Windows 10, where everything runs seamlessly, meaning my hardware shouldn’t be a problem. When I run the same code on the same switch port on Windows 10 I get proper speeds(up to 150MiB/s), therefore I seem to be missing something in Jetson Nano’s settings.
My switch, PoE and PLC are all gigabit supported and do not cap the speed. Switch is also 9000 mtu rated so that is not a problem.
What can I try to get more speed from the ethernet port ?

Settings in ifconfig and ethtool seem to be correct as well.
ifconfig

eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 8972`
inet 192.168.250.3 netmask 255.255.255.0 broadcast 192.168.250.255
inet6 fe80::38f4:becc:6aae:484d prefixlen 64 scopeid 0x20
ether 00:04:4b:e7:66:b8 txqueuelen 1000 (Ethernet)
RX packets 4164405 bytes 5867953697 (5.8 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4494 bytes 288007 (288.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 151 base 0xb000

ethtool eth0
Settings for eth0:
    	Supported ports: [ TP ]
    	Supported link modes:   10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Full 
    	Supported pause frame use: No
    	Supports auto-negotiation: Yes
    	Supported FEC modes: Not reported
    	Advertised link modes:  10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Full 
    	Advertised pause frame use: No
    	Advertised auto-negotiation: Yes
    	Advertised FEC modes: Not reported
    	Speed: 1000Mb/s
    	Duplex: Full
    	Port: Twisted Pair
    	PHYAD: 0
    	Transceiver: internal
    	Auto-negotiation: on
    	MDI-X: Unknown
    Cannot get wake-on-lan settings: Operation not permitted
    	Current message level: 0x00000033 (51)
    			       drv probe ifdown ifup
    	Link detected: yes


Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eth0
    192.168.250.0   0.0.0.0         255.255.255.0   U     100    0        0 eth0

I doubt this is enough, but can you check the speed if you first do this:

sudo nvpmodel -m 0
sudo jetson_clocks

This is just making sure the system is running full clock speeds and not throttling back for some particular energy savings mode. If there is still a problem (and probably there will be), then someone else will need to answer.

The one thing I see which might be a problem (but probably is not) is the MTU reported on the Jetson’s ifconfig. The first line:
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 8972

Notice that the MTU is not exactly 9000 (it is 8972). I don’t know enough to say for sure if this is a problem. It is quite possible that this is the same as 9000, but has the packet header size subtracted before noting the MTU. If this is really not equivalent to 9000, then this would be the problem (there would be fragmentation and reassembly required on almost every packet).

Thanks for the reply!

Indeed I had set mtu differently in network connections and terminal, I set both 9000 but that did not change the speed.
I had already previously set the system in MAXN but I ran the commands again, but sadly made no difference. My Jetson is powered by 5V 5A(25W) PSU through barrel jack so power shouldn’t be a problem.

I’m going to try reflashing Jetson as I can’t think of anything to change.
A windows pc, which is connected to my switch and running identical code is achieving correct speeds, so maybe I messed up something somewhere during Jetson setup and updating.

Update:
I reflashed and without changing any settings, just installing required libraries, network speed is exactly the same, max 18 MiB/s.
After setting mtu to 9000 through terminal nothing changed.
After
sudo nvpmodel -m 0
sudo jetson_clocks
speed remains at 18MiB/s.

Commands

sudo sysctl -w net.core.rmem_max=33554432
sudo sysctl -w net.core.wmem_max=33554432
sudo sysctl -w net.core.rmem_default=33554432
sudo sysctl -w net.core.wmem_default=33554432

also did not change the speed.

This speed causes the camera buffers to be only partially show meaning stripes, combined images from partial buffers and artifacts everywhere on the screen.

But I found that upon lowering my camera resolution, the network speed also dropped instantly, which probably means that I might have missed something in camera settings.
If camera would send full packets network speed would be 150MiB/s, therefore lowering resolution by a bit shouldn’t drop Jetsons 18MiB/s, because the actual packets would still be way larger.
Currently dropping resolution from 1000x1200 to 1000x1100 made Jetson’s receiving speeds go from 18MiB/s to 16MiB/s.
Ill check camera settings about networking maybe Ill find something wrong

I found a solution.
My camera was set to autonegotiate packet size, Jetson for whatever reason negotiated a packet size lower than the one which is required. So I set packet size to be non-negotiable and static at 9000. Also same packet settings on Jetson and everything works as expected.