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
  • 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.
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VTP servers with 3650 switches 5 43
VPN Server 5 49
Certifications 8 36
find the Exchange server name that Outlook is connected to. 6 17
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

679 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