How faster is UDP compared to TCP?

Posted on 2002-04-19
Last Modified: 2013-11-29
How faster can UDP be, compared to TCP on the same line, in case of stable work of UDP?
I mean, how many unused information i get by using TCP here instead of UDP.
Actually, I'm a lamer in networking. I just have heard that UDP is more faster, so is it really definitely faster, or I can just tune TCP to have same speed und don't bother with UDP?
(We're assuming here that UDP will work reliable on my network.)
Question by:Perkoff
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
LVL 11

Assisted Solution

geoffryn earned 20 total points
ID: 6954133
It depends on windowing.  The more frequently the ack is sent, the more overhead TCP has assuming 100% packet delivery.

Expert Comment

ID: 6954168
Lots. You can fine tune TCP to make it as fast as possible, changing packet size (large vs. small, depends on average message size, etc.), changing window size (how many packets can be sent before you have to wait for an ACK, etc.

However, UDP is a lot simpler because there is no window. You just send the message and get no confirmation about it having gotten there, so the only thing to worry about is throughput.


Accepted Solution

scraig84 earned 30 total points
ID: 6954528
There are other factors as well (other than windowing), such as the stability of the line.  Since UDP has no error control, if there are frequent errors UDP can be dreadfully slow.  Eventually the requestor will determine that a response has not been sent and have to resubmit a request.  However, the decision to go with TCP or UDP has more to do with the fact that error control has to come from someplace.  If the application has no means of checking for errors and resubmitting requests (as I mentioned above), then really your only choice is to go with TCP.  However, if the app does have this ability, and occasionally larger delay is acceptable, then UDP might be the choice.  

Otherwise, like said above, windowing is pretty much everything assuming all other factors are equal such as packet size.  There is a bit of efficiency lost with TCP as well due to a larger header in the packet.
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

LVL 11

Expert Comment

ID: 6954550
Scraig84 is correct, that is why I qualified my statement with 100% packet delivery.
LVL 16

Expert Comment

ID: 6960158
Depends on the application  . . . kind of like asking "which is faster; a car or a truck?"


Expert Comment

ID: 6960421
So... Do you have more info for us about the TYPE of application?

All things being equal UDP is faster than TCP/IP because it has less overhead.

UDP is appropriate for applications where a missing packet every now and then does not cause a problem. If you do detect missing packets and request a re-transmission, you have to add the "re-transmission" cost into the picture.

With TCP, the application gets the packets in order and there are no missing packets. But the overhead is greater to guarantee this. If you have a very clean connection, the overhead is wasted because packets rarely get lost.

If the connection is very dirty, TCP may be bettern than UDP because you detect missing packets right away and they are re-transmitted within a small transmission window.


Author Comment

ID: 6960462
Ok, I'm interrested in this because I have contact to a group of programmers. They're developing a protocol, an alternative to TCP & UDP. They want it to be almost so fast as UDP and pretty stable as TCP. So i want to know real facts / statistics about the difference in speeds of these 2 protocols, assuming that the line quality is so good, that _there will be no packet loss or other errors when using UDP_. So I want to know, do these programmers really need to bother developing such an alternative?
Now i think everything is clear. Sorry for being so unprecise. My English is not perfect too.

Expert Comment

ID: 6960522
UDP and TCP serve different purposes. TCP does have a lot of overhead because it seeks to work even in bad link conditions.

If you were to assume a good quality of line, you could create a protocol that is something like a scaled-down TCP that is closer in performance to UDP in terms of overhead.

Whether or not you need something like this, is up to you :)


Expert Comment

ID: 6960574
My question would be - why???

If you are in need of stability that UDP doesn't provide, why wouldn't you just use TCP?  The hassle of creating something new at this level of the IP stack would be pretty large.  This wouldn't just "hook in" with existing IP stacks - meaning users would need to load specialized IP stacks to work with this.  I have never heard of anyone going to this level of pain just because of the negligible speed differences of UDP and TCP.  Its not like TCP is such a pig that nobody wants to use it.  Is there a difference between TCP and UDP in identical situations? - yes.  Is the difference big enough to reinvent the wheel? - not unless you're certifiably insane - in which case I would suggest that you get help.

Expert Comment

ID: 9155711
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question