Jump to content

Defaults for Ethernet coalesce?


vmiceli

Recommended Posts

Hello folks,

 

I have completed my Armbian NTP server based on the wonderful little NanoPi Neo3. However something bothers me a bit, i.e. how much delay or latency is in eth0 (It is a 1Gbs port).

By checking the default eth0 settings (ethtool -c eth0) I have the parameters below. In particular rx-usec = 327usec means that when a packet is received, the IRQ to alert the CPU can be delayed up to 327usec. With these settings on the nanopi (NTP server) I get about 1msec delay on the NTP client (Windows PC). By cutting the rx-usecs to 35 usecs I get a delay on the client of  about 450usec, so a massive improvement and 30% faster than rpi 4.

 

At the moment, in order to change this parameter after boot, I have the two lines below into /etc/rc.local, the delay is needed as the command may be issued before eth0 is ready to accept it (I found this the hard way):

sleep 10
sudo ethtool -C eth0 rx-usecs 35

 

The question: Is there a place where those eth0 defaults are saved? If there is a config file somewhere or even in the Kernel (I can re-build it) I could change them to a new default and avoid the rc.local hassle and delay.  I guess I like a leaner approach :-)

 

Thanks!

 

Enzo


 

 

root@nanopineo3:~# ethtool -c eth0
Coalesce parameters for eth0:
Adaptive RX: off  TX: off
stats-block-usecs: 0
sample-interval: 0
pkt-rate-low: 0
pkt-rate-high: 0

rx-usecs: 327
rx-frames: 0
rx-usecs-irq: 0
rx-frames-irq: 0

tx-usecs: 100
tx-frames: 25
tx-usecs-irq: 0
tx-frames-irq: 0

 

Link to comment
Share on other sites

great find....   not sure if that's sysctl setting or a module parameter...  would be interesting to find the origin of the default value.. or whether that's dynamically adjusted otherwise.

if you do figure it out.. we do keep various optimizations here

https://github.com/armbian/build/blob/master/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines