Skip to contentSkip to conversation

udp packet loss even with large socket buffer

DISCUSSION johnny zhao 2 participants 3 messages Feb 28, 2004 – Mar 2, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I have a problem when trying to receive udp packets containing video data sent by Microsoft Windows Messenger. Here is a detailed description:

Linux box:
Linux-2.4.21-0.13mdksmp, P4 2.6G HT
socket mode:
blocked mode
code used:
while ( recvfrom(...) )
socket buffer size:
8388608, set by using sysctl -w net.core.rmem_default and rmem_max

I used ethereal(using libpcap) to monitor the network traffic. All the packets were transferred and captured by libpcap. But my program constantly suffers from packet loss. According to ethereal, the average time interval between 2 packets is 70-80ms, and the minimum interval can go down to ~1ms. Each packet is smaller than 1500 bytes (ethernet MTU).

Can anybody help me? I googled and found a similar case that had been solved by increasing the socket buffer size. But it doesn't work for me. I think 8M is a crazily large size :(

Thank you!

_________________________________________________________________
Get fast, reliable access with MSN 9 Dial-up. Click here for Special Offer! http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/

#1 lore raw
Quoted 20 lines · johnny zhao

Hi,

I have a problem when trying to receive udp packets containing video data sent by Microsoft Windows Messenger. Here is a detailed description:

Linux box:

    Linux-2.4.21-0.13mdksmp, P4 2.6G HT
socket mode:
    blocked mode
code used:
    while ( recvfrom(...) )

socket buffer size:
8388608, set by using sysctl -w net.core.rmem_default and rmem_max

I used ethereal(using libpcap) to monitor the network traffic. All the packets were transferred and captured by libpcap. But my program constantly suffers from packet loss. According to ethereal, the average time interval between 2 packets is 70-80ms, and the minimum interval can go down to ~1ms. Each packet is smaller than 1500 bytes (ethernet MTU).

Quoted 3 lines

Can anybody help me? I googled and found a similar case that had been solved by increasing the socket buffer size. But it doesn't work for me. I think 8M is a crazily large size :(

Post a small program demonstrating your problem.
(I'd test udp receive with netcat too)
--
vda

#2 lore raw

hi,

Thanks for your reply. If you want to exactly reproduce my problem, please use the following
commands to download my codes from cvs:

cvs -d:pserver:[email protected]:/cvsroot/gaim-vv login cvs -z3 -d:pserver:[email protected]:/cvsroot/gaim-vv co linphone

Simply hit enter when prompted for passwd.
(1) Please download and install libosip before compiling.
(2) Before ./configure, please run command 'rm -Rf ffmpeg; ln -s ffmpeg-0.4.8 ffmpeg'.
(3) After 'make' and 'make install', use 'linphonec' to run the program.
(4) Under linphonec, use the following commands to communicate with windows messenger:
r www-db.research.bell-labs.com
c <sip:[email protected]>

www-db.research.bell-labs.com is a public sip server.

Under Windows Messenger (which runs only under WinXP), use SIP login method. Sign-in name should be [email protected]

Please note that Windows Messenger is different from MSN Messenger.

I know it's kind of complicated... :( Thank you in advance!
PS: My Linux box and Windows XP box run in the same LAN.

Johnny

----- Original Message -----
From: "Denis Vlasenko" <[email protected]>
To: "johnny zhao" <[email protected]>; <[email protected]>
Sent: Saturday, February 28, 2004 4:22 PM
Subject: Re: udp packet loss even with large socket buffer

Quoted 4 lines · johnny zhao
Quoted 3 lines

Hi,

I have a problem when trying to receive udp packets containing video

data

Quoted 11 lines
Quoted 11 lines

sent by Microsoft Windows Messenger. Here is a detailed description:

Linux box:

    Linux-2.4.21-0.13mdksmp, P4 2.6G HT
socket mode:
    blocked mode
code used:
    while ( recvfrom(...) )

socket buffer size:
8388608, set by using sysctl -w net.core.rmem_default and rmem_max

Quoted 2 lines
Quoted 2 lines

I used ethereal(using libpcap) to monitor the network traffic. All the packets were transferred and captured by libpcap. But my program

constantly

Quoted 1 line
Quoted 1 line

suffers from packet loss. According to ethereal, the average time

interval

Quoted 5 lines
Quoted 5 lines

between 2 packets is 70-80ms, and the minimum interval can go down to ~1ms. Each packet is smaller than 1500 bytes (ethernet MTU).

Can anybody help me? I googled and found a similar case that had been solved by increasing the socket buffer size. But it doesn't work for me.

I

Quoted 13 lines
Quoted 1 line

think 8M is a crazily large size :(

Post a small program demonstrating your problem.
(I'd test udp receive with netcat too)
--
vda

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/