LinuxCNC and Linux and Ubuntu and PC and RPi ping issues with Mesa 7i96s

More
2 years 8 months ago - 2 years 8 months ago #293596 by RNZ
Here in New Zealand I should be sleeping...

I have been searching for "Broadcom" and "coalesce" and have found nothing so far. However, I did find that both the Pi 4 and Pi 5 both use the same Broadcom chips:

Broadcom BCM54213 Gigabit Ethernet PHY

Source: en.wikipedia.org/wiki/Raspberry_Pi#Specifications

The good news for me at this stage (following Rod's suggestion) is that I have run 500,000 pings between my Pi 5 and 7i96s and unlike previous horrors there were 0 lost packets !!! I am now running it overnight with a target of 30,000,000 pings, so here's hoping.

Thanks a lot guys for the pointer on this. The learning curve is steep, but if the RPi 5 can perform, it would be a great solution. It boots to the log screen in about 5 s so is pretty quick. It would be nice to physically mount it on or above the Mesa card...

If you are willing and able, could you take a minute and describe what you think the coalesce setting is doing? My understanding is that once an interrupt is generated by an incoming packet, future interrupts are disabled for some time period and replaced with polling in order to reduce CPU overhead required by the interrupt operation.
Last edit: 2 years 8 months ago by RNZ.

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #293601 by rodw

Here in New Zealand I should be sleeping...
 
Nah the night is still early. I tried to go to bed at midnight last night but was wide awake so stayed up to 3:30 so pulled an all nighter NZ time..
Bloody prednisone!

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #293640 by RNZ
30_000_000 pings last night with zero failed packets.

I would love to know the technical reasons that (I) packets are lost, and (I) Ethernet transfers stop, if the coalesce setting is not used.

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago - 2 years 8 months ago #293645 by PCW
It may have to do with the default rx-usecs setting.
If I run the ping test with a a small (but non zero) rx-usecs
setting, I don't lose any packets but if I use a larger value
(say 300 usec) I start to lose the first packet.

I never lose more than the first however.

Losing the link sounds more like a driver bug with the coalesce setting...
Last edit: 2 years 8 months ago by PCW.
The following user(s) said Thank You: RNZ

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago - 2 years 8 months ago #293717 by RNZ
I ran my RPi 5 and 7i96s overnight and completed 40 million pings with zero errors.

sudo chrt 99 ping -i .001 10.10.10.10 -c 40000000

At the same time in the background, I ran Latency Histogram and two Glxgears. I have attached photos in case anybody is interested in seeing the results.

I’m not sure what to make of the maximum ping time of just over 10 ms.

It seems that "hardware-irq-coalesce-rx-usecs 0" has fixed the issues I was having (aside from the 10 ms issue) at least on RPi 5 * GB with LinuxCNC 2.9.2.

======================================

What is this "coalesce" thing?

Interrupt coalesce settings ( access.redhat.com/documentation/en-us/re...ing_networking/index )

"By using interrupt coalescing, the system collects network packets and generates a single interrupt for multiple packets. This increases the amount of data sent to the kernel with one hardware interrupt, which reduces the interrupt load, and maximizes the throughput."

=====================================

My /etc/network/interfaces looks like this:

=============================

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.11
hardware-irq-coalesce-rx-usecs 0

===========================
Last edit: 2 years 8 months ago by RNZ.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #326589 by ErwinCNC
Hello Have you been able to fix the problem in the meantime?I am also thinking about using a pi 5 + 7i96s as I now have a second PC which is apparently not suitable for Linux CNC. If you were able to fix the problem, what was the cause and are you satisfied so far?

Regards Erwin 

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum