• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

How faster is UDP compared to TCP?

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.)
0
Perkoff
Asked:
Perkoff
  • 3
  • 2
  • 2
  • +3
2 Solutions
 
geoffrynCommented:
It depends on windowing.  The more frequently the ack is sent, the more overhead TCP has assuming 100% packet delivery.
0
 
dcgamesCommented:
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.

Dave
0
 
scraig84Commented:
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.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
geoffrynCommented:
Scraig84 is correct, that is why I qualified my statement with 100% packet delivery.
0
 
SteveJCommented:
Depends on the application  . . . kind of like asking "which is faster; a car or a truck?"

Steve
0
 
dcgamesCommented:
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.

Dave
0
 
PerkoffAuthor Commented:
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.
0
 
dcgamesCommented:
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 :)

Dave
0
 
scraig84Commented:
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.
0
 
CleanupPingCommented:
Perkoff:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now