2006-01-07 07:03:28

by kernel coder

[permalink] [raw]
Subject: Almost 80% of UDP packets dropped

hi,
I was trying to measure the UDP reception speed on my borad which
has MIPS 4kc processor with 133 MHZ speed.I was transfering 10mb file
from intel pentium 4 machine to MIPS board,but the recieved file was
only 900kB.

When i further investigated the problem ,i came to know that the user
application was not getting enough opportunities to get data from
socket queue which caused almost 80% of packets to be dropped as
socket queue had no free space.

When i increased the socket recieve buffer size,it resulted in
increase in no. of packets recieved .When i slow slowed down the
transmitter , it also caused more packets to be recieved.

But the above mentioned mechanism only decreased no. of lost
packets.But there was no way that i could increase UDP reception speed
because the user application was not getting enough opportunities to
read packets in burst of UDP packets.

I noticed that user application started recieveing packets after
Kernel had recieved all the UDP packets.

Please tell me how can i make sure that user application or udp client
running MIPS 4kc processor gets enough opportunities to dequeue
packets from socket buffer so that lost of packets could be reduced to
minimal and also the size of UDP recieved file in a specific interval
of time could be increased.

lhrkernelcoder


2006-01-07 15:05:07

by Denis Vlasenko

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped

On Saturday 07 January 2006 09:03, kernel coder wrote:
> hi,
> I was trying to measure the UDP reception speed on my borad which
> has MIPS 4kc processor with 133 MHZ speed.I was transfering 10mb file
> from intel pentium 4 machine to MIPS board,but the recieved file was
> only 900kB.

UDP is connectionless. There is no way for sender to know that it must
stop sending UDP packets because receiver cannot keep up. If sender
and your network is producing and delivering UDP packets faster
than receiver can consume them, packets will be lost.

Use TCP instead.
--
vda

2006-01-07 15:23:48

by Tomasz Torcz

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped

On Sat, Jan 07, 2006 at 05:04:52PM +0200, Denis Vlasenko wrote:
> On Saturday 07 January 2006 09:03, kernel coder wrote:
> > hi,
> > I was trying to measure the UDP reception speed on my borad which
> > has MIPS 4kc processor with 133 MHZ speed.I was transfering 10mb file
> > from intel pentium 4 machine to MIPS board,but the recieved file was
> > only 900kB.
>
> UDP is connectionless. There is no way for sender to know that it must
> stop sending UDP packets because receiver cannot keep up. If sender
> and your network is producing and delivering UDP packets faster
> than receiver can consume them, packets will be lost.
>
> Use TCP instead.

Or DCCP.

--
Tomasz Torcz "God, root, what's the difference?"
[email protected] "God is more forgiving."


Attachments:
(No filename) (797.00 B)
(No filename) (229.00 B)
Download all attachments

2006-01-07 21:19:58

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped


>> Use TCP instead.
>
> Or DCCP.

Don't you mean SCTP?



Jan Engelhardt
--

2006-01-07 22:35:20

by be-news06

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped

Denis Vlasenko <[email protected]> wrote:
> UDP is connectionless. There is no way for sender to know that it must
> stop sending UDP packets because receiver cannot keep up. If sender
> and your network is producing and delivering UDP packets faster
> than receiver can consume them, packets will be lost.

Yes, but the problem of the OP sounds like the interrupt handling on mips
pretty badly affects the scheduler. I guess softwareinterrupts and network
polling would help here.

Gruss
Bernd

2006-01-07 22:45:04

by Tomasz Torcz

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped

On Sat, Jan 07, 2006 at 10:19:56PM +0100, Jan Engelhardt wrote:
>
> >> Use TCP instead.
> >
> > Or DCCP.
>
> Don't you mean SCTP?

No, DCCP, UDP-like protocol with TCP-like congestion control. In
mainline kernel since 2.6.14. DCCPv6 in the works.
http://www.wlug.org.nz/DCCP http://lwn.net/Articles/149756/

--
Tomasz Torcz "God, root, what's the difference?"
[email protected] "God is more forgiving."


Attachments:
(No filename) (443.00 B)
(No filename) (229.00 B)
Download all attachments

2006-01-09 05:52:16

by kernel coder

[permalink] [raw]
Subject: Re: Almost 80% of UDP packets dropped

Thanks for all your help.Ethernet driver is already using NAPI.

The main problem was that the sender was running on P4 which has 3 gHz
speed and the reciever had speed 133MHz.So the sender was transmitting
packets far quicker than the reciever could handle.

Then i used the sme MIPS board as transmitter and another one as
receiver so now i recieved almost 80% of transmitted file.

shahzad

On 1/7/06, Tomasz Torcz <[email protected]> wrote:
> On Sat, Jan 07, 2006 at 10:19:56PM +0100, Jan Engelhardt wrote:
> >
> > >> Use TCP instead.
> > >
> > > Or DCCP.
> >
> > Don't you mean SCTP?
>
> No, DCCP, UDP-like protocol with TCP-like congestion control. In
> mainline kernel since 2.6.14. DCCPv6 in the works.
> http://www.wlug.org.nz/DCCP http://lwn.net/Articles/149756/
>
> --
> Tomasz Torcz "God, root, what's the difference?"
> [email protected] "God is more forgiving."
>
>
>
>