* Almost 80% of UDP packets dropped
@ 2006-01-07 7:02 kernel coder
2006-01-07 7:38 ` Brett Foster
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: kernel coder @ 2006-01-07 7:02 UTC (permalink / raw)
To: linux-mips
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Almost 80% of UDP packets dropped
@ 2006-01-07 7:03 kernel coder
2006-01-07 15:04 ` Denis Vlasenko
0 siblings, 1 reply; 12+ messages in thread
From: kernel coder @ 2006-01-07 7:03 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 7:02 kernel coder
@ 2006-01-07 7:38 ` Brett Foster
2006-01-07 9:24 ` Kevin D. Kissell
2006-01-07 9:48 ` Alan Cox
2 siblings, 0 replies; 12+ messages in thread
From: Brett Foster @ 2006-01-07 7:38 UTC (permalink / raw)
To: kernel coder; +Cc: linux-mips
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 was not designed with reliability in mind -- it really isn't meant
for sending a 10 meg file without a packet loss.
>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.
>
>
(Among other sources) I'm pretty sure this behaviour was discussed in:
Unix Network Programming, Vol. 1: The Sockets Networking API, Third Edition
(Something like page 257.)
I don't know if there is anything else going on with the kernel but...
Brett
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
@ 2006-01-07 9:24 ` Kevin D. Kissell
0 siblings, 0 replies; 12+ messages in thread
From: Kevin D. Kissell @ 2006-01-07 9:24 UTC (permalink / raw)
To: kernel coder, linux-mips
What value of HZ are you using? If you're still at the 2.6 default of 1000,
try reducing it to 100 and see if things improve...
----- Original Message -----
From: "kernel coder" <lhrkernelcoder@gmail.com>
To: <linux-mips@linux-mips.org>
Sent: Saturday, January 07, 2006 8:02 AM
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
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
@ 2006-01-07 9:24 ` Kevin D. Kissell
0 siblings, 0 replies; 12+ messages in thread
From: Kevin D. Kissell @ 2006-01-07 9:24 UTC (permalink / raw)
To: kernel coder, linux-mips
What value of HZ are you using? If you're still at the 2.6 default of 1000,
try reducing it to 100 and see if things improve...
----- Original Message -----
From: "kernel coder" <lhrkernelcoder@gmail.com>
To: <linux-mips@linux-mips.org>
Sent: Saturday, January 07, 2006 8:02 AM
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
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 7:02 kernel coder
2006-01-07 7:38 ` Brett Foster
2006-01-07 9:24 ` Kevin D. Kissell
@ 2006-01-07 9:48 ` Alan Cox
2 siblings, 0 replies; 12+ messages in thread
From: Alan Cox @ 2006-01-07 9:48 UTC (permalink / raw)
To: kernel coder; +Cc: linux-mips
On Gwe, 2006-01-06 at 23:02 -0800, kernel coder wrote:
> I noticed that user application started recieveing packets after
> Kernel had recieved all the UDP packets.
If your network chip/ram/processor combination is not fast enough to run
user space applications and handle a full speed network packet stream
then you either need to send more slowly, make the kernel network driver
more efficient or add some kind of interrupt/polling code to reduce
system load to avoid this. The NAPI layer in the networking code is
designed to make this possible.
Probably worth discussing further on netdev@oss.sgi.com
Alan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 7:03 Almost 80% of UDP packets dropped kernel coder
@ 2006-01-07 15:04 ` Denis Vlasenko
2006-01-07 15:23 ` Tomasz Torcz
2006-01-07 22:35 ` Bernd Eckenfels
0 siblings, 2 replies; 12+ messages in thread
From: Denis Vlasenko @ 2006-01-07 15:04 UTC (permalink / raw)
To: kernel coder; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 15:04 ` Denis Vlasenko
@ 2006-01-07 15:23 ` Tomasz Torcz
2006-01-07 21:19 ` Jan Engelhardt
2006-01-07 22:35 ` Bernd Eckenfels
1 sibling, 1 reply; 12+ messages in thread
From: Tomasz Torcz @ 2006-01-07 15:23 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
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?"
zdzichu@irc.-nie.spam-.pl "God is more forgiving."
[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 15:23 ` Tomasz Torcz
@ 2006-01-07 21:19 ` Jan Engelhardt
2006-01-07 22:44 ` Tomasz Torcz
0 siblings, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2006-01-07 21:19 UTC (permalink / raw)
To: Tomasz Torcz; +Cc: linux-kernel
>> Use TCP instead.
>
> Or DCCP.
Don't you mean SCTP?
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 15:04 ` Denis Vlasenko
2006-01-07 15:23 ` Tomasz Torcz
@ 2006-01-07 22:35 ` Bernd Eckenfels
1 sibling, 0 replies; 12+ messages in thread
From: Bernd Eckenfels @ 2006-01-07 22:35 UTC (permalink / raw)
To: linux-kernel
Denis Vlasenko <vda@ilport.com.ua> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 21:19 ` Jan Engelhardt
@ 2006-01-07 22:44 ` Tomasz Torcz
2006-01-09 5:52 ` kernel coder
0 siblings, 1 reply; 12+ messages in thread
From: Tomasz Torcz @ 2006-01-07 22:44 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
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?"
zdzichu@irc.-nie.spam-.pl "God is more forgiving."
[-- Attachment #2: Type: application/pgp-signature, Size: 229 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Almost 80% of UDP packets dropped
2006-01-07 22:44 ` Tomasz Torcz
@ 2006-01-09 5:52 ` kernel coder
0 siblings, 0 replies; 12+ messages in thread
From: kernel coder @ 2006-01-09 5:52 UTC (permalink / raw)
To: Jan Engelhardt, linux-kernel
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 <zdzichu@irc.pl> 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?"
> zdzichu@irc.-nie.spam-.pl "God is more forgiving."
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-01-09 5:52 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-07 7:03 Almost 80% of UDP packets dropped kernel coder
2006-01-07 15:04 ` Denis Vlasenko
2006-01-07 15:23 ` Tomasz Torcz
2006-01-07 21:19 ` Jan Engelhardt
2006-01-07 22:44 ` Tomasz Torcz
2006-01-09 5:52 ` kernel coder
2006-01-07 22:35 ` Bernd Eckenfels
-- strict thread matches above, loose matches on Subject: below --
2006-01-07 7:02 kernel coder
2006-01-07 7:38 ` Brett Foster
2006-01-07 9:24 ` Kevin D. Kissell
2006-01-07 9:24 ` Kevin D. Kissell
2006-01-07 9:48 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.