voluntary-preempt-2.6.8.1-P1 seems to lose UDP messages.
Hello,
I have a real-time application that transmits 20 MBytes/s over UDP/Gigabit Ethernet between 2 PCs. The NICs are from Intel and use the e1000 driver (MTU=1500). On the receive side, the computer has to process the data (real-time tasks doing signal processing work and using up 50% of the CPU time).
This app works OK with 2.6.7 and 2.6.8.1 : the app does not complain about lost messages.
But when I use the voluntary-preemt-2.6.8.1-P1 patch on the receiving PC, the app starts complaining about lost messages. And also, netstat -s -u shows that lots of UDP packets are lost (on the PC that receives the data). [root@centaurus root]# netstat -u -s
Udp:
8433 packets received
0 packets to unknown port received.
869 packet receive errors
366 packets sent
I have already retried with the e1000 parameters RxIntDelay=0 and RxDescriptors=1024. This did not improve anything.
Note: I don't see any error message with dmesg nor in /var/log/messages.
I find the voluntary-preempt series very important and would really like it to make its way into the stock kernel. I would therefore gladly make additional tests to help you find the problem. Please give me directions.
thanks for your help,
P.O. Gaillard
Quoted 7 lines · P.O. Gaillard
Hello,
I have a real-time application that transmits 20 MBytes/s over UDP/Gigabit Ethernet between 2 PCs.
But when I use the voluntary-preemt-2.6.8.1-P1 patch on the receiving PC, the app starts complaining about lost messages.
It sounds like you need to set the network card irq to be non-threaded. What is the output of:
root@mindpipe:/home/rlrevell/kernel-source/linux-2.6.8.1-P3# find
/proc/irq/ -name threaded -print -a -exec cat {} \;
/proc/irq/15/ide1/threaded
1
/proc/irq/14/ide0/threaded
1
/proc/irq/12/uhci_hcd/threaded
1
/proc/irq/11/eth0/threaded
1
/proc/irq/11/uhci_hcd/threaded
1
/proc/irq/10/EMU10K1/threaded
0
/proc/irq/10/uhci_hcd/threaded
1
/proc/irq/8/rtc/threaded
0
/proc/irq/1/i8042/threaded
1You probably want all of these to be 1 except ethX.
Lee
Quoted 10 lines · P.O. Gaillard
Hello,
I have a real-time application that transmits 20 MBytes/s over UDP/Gigabit Ethernet between 2 PCs. The NICs are from Intel and use the e1000 driver (MTU=1500). On the receive side, the computer has to process the data (real-time tasks doing signal processing work and using up 50% of the CPU time).
This app works OK with 2.6.7 and 2.6.8.1 : the app does not complain about lost messages.
Thanks to the support of Pádraig Brady, I have found out that the voluntary-preempt patch is "innocent".
In fact, it seems that the patch changes the scheduling of the application and reveals that the UDP reception buffer is too small for this application.
So I changed /proc/sys/net/core/rmem_default to 200KBytes as instructed and the problem disappeared.
It seems a bit counter-intuitive since the application has real-time threads that are supposed to receive and timestamp all incoming messages as soon as they arrive. I would therefore have expected the voluntary-preempt patch to improve the reactivity of these tasks.
Anyway, it seems safe to say that the losses of UDP messages were not caused by a bug in the voluntary-preempt patch. This is good news since it means that I can use this patch.
Note: after running the program for the whole night the problem seemed to come back after 2 hours or so. I will try with eth0/threaded=0 as Lee Revell suggested.
thanks a lot for your help,
P.O. Gaillard