Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

How to explain this UDP packet lost symptom?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2008, 09:04 PM
Default How to explain this UDP packet lost symptom?



Hi all,

I am trying to stream live video over the Internet by using UDP since
theoretically UDP fits my purpose better.

I tested it by sending video stream from china to my friends in
several countries and got different result (RAW-UDP).
1. From China to US, stream can go up to 1000kbps and nearly no packet
lost.
2. From China to Japan, stream always get corrupted and nearly half
packets are lost even I lower down the bitrate to 200kbps.
3. From China to Taiwan, same as China to Japan.

visualroute's report shows all three paths are pretty good in terms of
latency and reachability.
I also tried to use iperf to test China to Japan path by sending a
constant 1Mbps stream. in first few seconds it was 1Mbps then later it
up and down between 200kbps to 1Mbps, also a lot of packets are
dropped.

I understand UDP packet may lost when transmit on Internet. But why
some path is good but some path lost almost 50% data. What I can do
about it? is there any reference I can take a look.

Thank you guys in advance.


elton2net@gmail.com
Reply With Quote
  #2  
Old 02-07-2008, 10:54 PM
Alex Buell
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

On Thu, 7 Feb 2008 13:04:58 -0800 (PST), I waved a wand and this
message magically appears in front of (E-Mail Removed):

> 1. From China to US, stream can go up to 1000kbps and nearly no packet
> lost.
> 2. From China to Japan, stream always get corrupted and nearly half
> packets are lost even I lower down the bitrate to 200kbps.
> 3. From China to Taiwan, same as China to Japan.


Oh dear, haven't you kept up with the news lately? Internet service to
the far east will be very bad for the next few weeks whilst they repair
three broken undersea cables off the coast of Eygpt.
--
http://www.munted.org.uk

Fearsome grindings.
Reply With Quote
  #3  
Old 02-08-2008, 02:59 AM
Elton
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

On Feb 7, 2:54 pm, Alex Buell <alex.bu...@munted.org.uk> wrote:
> On Thu, 7 Feb 2008 13:04:58 -0800 (PST), I waved a wand and this
> message magically appears in front of elton2...@gmail.com:
>
> > 1. From China to US, stream can go up to 1000kbps and nearly no packet
> > lost.
> > 2. From China to Japan, stream always get corrupted and nearly half
> > packets are lost even I lower down the bitrate to 200kbps.
> > 3. From China to Taiwan, same as China to Japan.

>
> Oh dear, haven't you kept up with the news lately? Internet service to
> the far east will be very bad for the next few weeks whilst they repair
> three broken undersea cables off the coast of Eygpt.
> --http://www.munted.org.uk


Thanks for your reply and I really appreciate that.

Yeah, I heard about that. Just thought Egypt is too far away from
there so just couldn't link them together I checked wikipedia
http://en.wikipedia.org/wiki/2008_su...ble_disruption , but it
looks most happen on mideast and India but not that relate to far-
east. do I miss anything?

-- E.L.
Reply With Quote
  #4  
Old 02-08-2008, 05:45 PM
Rick Jones
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

Elton <(E-Mail Removed)> wrote:
> Yeah, I heard about that. Just thought Egypt is too far away from
> there so just couldn't link them together I checked wikipedia
> http://en.wikipedia.org/wiki/2008_su...ble_disruption , but
> it looks most happen on mideast and India but not that relate to
> far- east. do I miss anything?


One of the whole points behind IP and routing is the ability to route
around failures. That means, depending on the peering agreements
between different ISPs, IP traffic could go just about anywhere on the
globe. So, an outtage thousands of miles away from you could cause
traffic to be sent along, and so saturate, links you normally use.

rick jones
--
No need to believe in either side, or any side. There is no cause.
There's only yourself. The belief is in your own precision. - Jobert
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Reply With Quote
  #5  
Old 02-08-2008, 08:44 PM
Elton
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

Yes, this does make a lot of sense. Then anything I can do about it?
will wrap stream into RTP or set traffic priority help? or TCP is a
better choice since submarine cable may broken frequently and the link
becomes unreliable often.
Reply With Quote
  #6  
Old 02-08-2008, 11:40 PM
David Schwartz
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

On Feb 8, 12:44 pm, Elton <elton2...@gmail.com> wrote:

> Yes, this does make a lot of sense. Then anything I can do about it?
> will wrap stream into RTP or set traffic priority help? or TCP is a
> better choice since submarine cable may broken frequently and the link
> becomes unreliable often.


Whether TCP is a better choice is a very complex question that depends
upon your precise requirements. TCP should have been the default
choice, and UDP should only have been chosen if there was a very good
reason.

TCP provides a lot of things for you that UDP makes you do by
yourself. You are very unlikely to be able to do those things better
than TCP does. The most common reason UDP is chosen over TCP is that
at least one of these things is not needed, and the cost of supporting
it (even well) is unacceptable. Most commonly, this is retransmission
of lost segments.

However, if you do chose UDP, *you* must implement all the features
TCP normally provides that you *do* need. These include slow start,
segmentation, re-ordering, duplicate packet detection, and (most
importantly) transmit pacing and exponential backoff.

If you fail to implement capabilities you need, things will get ugly
fast.

DS
Reply With Quote
  #7  
Old 02-09-2008, 10:46 AM
Elton
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

Just a few minutes ago tried stream video over TCP from China to
Taiwan, which can stable at 1Mbps while my old UDP always lost packet,
25 percent or even higher even though the bitrate is much lower than
TCP at 200kbps. So does routine matters?

I am not familiar with this part, is there anything to do with
router's QOS setting? because UDP is best effort while TCP is
promising. Or ISP is doing IP filtering? really beyond my knowledge.

Best,
-- E.L.
Reply With Quote
  #8  
Old 02-10-2008, 09:19 PM
David Schwartz
Guest
 
Posts: n/a
Default Re: How to explain this UDP packet lost symptom?

On Feb 9, 2:46 am, Elton <elton2...@gmail.com> wrote:

> Just a few minutes ago tried stream video over TCP from China to
> Taiwan, which can stable at 1Mbps while my old UDP always lost packet,
> 25 percent or even higher even though the bitrate is much lower than
> TCP at 200kbps. So does routine matters?
>
> I am not familiar with this part, is there anything to do with
> router's QOS setting? because UDP is best effort while TCP is
> promising. Or ISP is doing IP filtering? really beyond my knowledge.


Most likely, your transmit pacing and backoff just wasn't as good as
TCP's. It's also possible the one or more ISPs give preference to TCP
packets over UDP packets, but not all that terribly likely. Another
possibility is that your packets are too big or too small.

DS
Reply With Quote
Reply

Tags
explain, lost, packet, symptom, udp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:34 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.