UDP packet drops by linux kernel -
i have server sends udp packets via multicast , number of clients listing multicast packets. each packet has fixed size of 1040 bytes, whole data size sent server 3gbyte.
my environment follows:
1 gbit ethernet network
40 nodes, 1 sender node , 39 receiver nodes. nodes have same hardware configuration: 2 amd cpus, each cpu has 2 cores @2,6ghz
on client side, 1 thread reads socket , put data queue. 1 additional thread pops data queue , light weight processing.
during multicast transmission recognize packet drop rate of 30% on node side. observing netstat –su statistics can say, missing packets client application equal rcvbuferrors value netstat output.
that means missing packets dropped os because socket buffer full, not understand why capturing thread not able read buffer in time. during transmission, 2 of 4 cores utilized 75%, rest sleeping. i’m 1 using these nodes, , assume kind of machines have no problem handle 1gbit bandwidth. have done optimization, adding g++ compiler flags amd cpus, decrease packet drop rate 10%, still high in opinion.
of course know udp not reliable, have own correction protocol.
i not have administration permissions, it’s not possible me change system parameters.
any hints how can increase performance?
edit: solved issue using 2 threads reading socket. recv socket buffer still becomes full sometimes. average drop under 1%, isn't problem handle it.
tracking down network drops on linux can bit difficult there many components packet drops can happen. can occur @ hardware level, in network device subsystem, or in protocol layers.
i wrote detailed blog post explaining how monitor , tune each component. it's bit hard summarize succinct answer here since there many different components need monitored , tuned.
Comments
Post a Comment