Link to home
Start Free TrialLog in
Avatar of Perkoff
Perkoff

asked on

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.)
SOLUTION
Avatar of geoffryn
geoffryn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dcgames
dcgames

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
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Scraig84 is correct, that is why I qualified my statement with 100% packet delivery.
Avatar of Steve Jennings
Depends on the application  . . . kind of like asking "which is faster; a car or a truck?"

Steve
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
Avatar of Perkoff

ASKER

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.
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
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.
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.