I am using udp as communication protocol. I know that udp is connection less and may lose datagrams, but i expected this only on real networks or buffer overflows, not when using the loopback interface. My application performs an handshaking over udp, the client sends an request and the server ansers with an ack. Fairly simple, but when running on max speed with no wait states, some datagrams are lost. But why? Sending request-response is a form of flow-control, so the network buffers for udp should not overflow. Is thery any way to reduce the discardment of datagrams, possibly a socket option or solaris kernel parameters? The problem occurs on real network connections (not loopback), too. I used the option SO_DEBUG with my socket, but it seems there's no debug-log written to the syslog. Are there any other tuning parameters!? regards, markus
![]() |
0 |
![]() |
Markus Breuer <markus.breuer@gmx.de> writes: >My application performs an handshaking over udp, the client sends an >request and the server ansers with an ack. Fairly simple, but when >running on max speed with no wait states, some datagrams are lost. >But why? Sending request-response is a form of flow-control, so the >network buffers for udp should not overflow. If you do request response I would not expecting packetloss; if you are sending as fast as you can and you're not waiting for responses then the kernel will not flow control UDP buffers will overflow and packets will be dropped. >Is thery any way to reduce the discardment of datagrams, possibly a >socket option or solaris kernel parameters? The problem occurs on real >network connections (not loopback), too. >I used the option SO_DEBUG with my socket, but it seems there's no >debug-log written to the syslog. You can increase the udp buffer size using setsockopt() and the max buffer size using ndd -set /dev/udp. For loopback, you can use AF_UNIX, SOCK_SEQPACKET Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.
![]() |
0 |
![]() |