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:
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
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).
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.
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.