One of the key components in the TCP/IP protocol stack is the checksum computation, which ensures the integrity of the transferred data. This computation can be greatly accelerated with the use of single instruction, multiple data (SIMD) units prevalent in state-of-the-art processors. This article analyzes a former vectorization effort, shows how it can be improved upon, and then enhances it further.
Checksum calculation is just a marginal part (in cpu usage) of the total tcp/ip protocol stack, and can be easily offloaded by hardware.
Using zero-copy techniques has a much larger effect on the tcp/ip performance.
do instructions like add_vec work on other instruction sets like sse?
…they meant that the *checksum* performance was improved by a factor of four. Which is irrelevant, really.
Why does IP have a checksum field anyway? Isn’t that the job of protocols such as Ethernet and PPP?
Well, it’s not really an article about TCP/IP.
Is IP designed to go over Ethernet only? Can you guarantee that a particular link (proper term?) layer will provide frame integrity checking? The point of the OSI model is to provide some level of interoperability/ignorance of the various layers.
sed ‘s/interoperability/interchangeability/’ $LAST_POST
Is IP designed to go over Ethernet only? Can you guarantee that a particular link (proper term?) layer will provide frame integrity checking?
That’s a fair point. It’s unfortunate that we can’t assume that a checksum has been done for us.
The point of the OSI model is to provide some level of interoperability/ignorance of the various layers.
You just countered your own point, I think. But who uses the OSI model?
Whatever, anyway.
Are there no way they can make a new protocol with less information in the header? Use some smart new technology?
Why does IP have a checksum field anyway? Isn’t that the job of protocols such as Ethernet and PPP?
The checksum field is to make sure the IP header is not corrupted during routing, it doesn’t say anything about the data itself. It is TCP that does flow control and error checking.
The PPP and ethernet layer has no idea what a package is, so it can’t do anything meaningful if it discovers an error. (it can’t discard a package it doesn’t know exists)
A quick googling found the following info about the IP header checksum field:
Header Checksum (A 1’s complement checksum inserted by the sender and updated whenever the packet header is modified by a router – Used to detect processing errors introduced into the packet inside a router or bridge where the packet is not protected by a link layer cyclic redundancy check. Packets with an invalid checksum are discarded by all nodes in an IP network)
But who uses the OSI model?
Um, probably everyone? Although as application developer you only have to deal with the topmost one(s).
Are there no way they can make a new protocol with less information in the header? Use some smart new technology?
They probably could, but good luck getting people to switch
But really, which fields would you remove? The IP header is 20 bytes in size (can be a little longer if it contains extra options), and the TCP header is 20 bytes, plus up to 44 extra bytes for options.
Most of the fields are needed, new protocol or not. A google search found these pages. (first link for IP, second link for TCP)
http://www.freesoft.org/CIE/Course/Section3/7.htm
http://www.freesoft.org/CIE/Course/Section4/8.htm
Are there no way they can make a new protocol with less information in the header? Use some smart new technology?
The Internet is set in stone (OK, IPv6 and new application protocols are the exceptions). It would be a waste of time trying to change it. It would be interesting to experiment with protocols, but unrealistic to expect people to use them.
But who uses the OSI model?
Um, probably everyone? Although as application developer you only have to deal with the topmost one(s).
I think that depends on how you interpret “uses”. I think most of the time it’s: Ok now we have developed this great new way of communication. Let’s make something up to explain how this corresponds to OSI…
Most of the time you’re able to identify layers 1 to 4 (and seven). But converning 5 and 6: I can’t think of an example where these are implemented explicitly. This functionality is merged in the application most of the time…
You can pickup a $60 Gb NIC on CDW with rx tx checksum offloading which sounds like what they attempting to accelerate.
Quite a few server nics have been doing this for years to reduce processor overhead.
Would it make sense to do services like FTP over UDP instead of TCP? (less overhead, bigger Packets — up to 56KB/Packet possible or so)
This Retransmission on Lost and own Sliding-Window for correct Order one could implement by himself or not?
==> more CPU-Usage (we have anyway planty of) but more Bandwidth!
Comments welcome.
Bigger packets ? what do you mean ? you can send big packets with TCP, too. they will be segmented probably into layer 3 and the end-host will reassemble them.
UDP has also a checksum field that will tell you if the datagram is corrupt and act as appropiate in this case (maybe send an icmp to the source). But you also need to implement a sequencing part in order to keep your session safe from hi-jackers. And an algorithm to check if there are congestions on the network. So… you’ll get reinventing TCP
Try looking up tftp, which is ftp using UDP.
There will always be a need for TCP for various appplications, and like stated earlier if you try to add some sort of transmision control with UDP you will just simply re-implement TCP. Maybe one should go over to the ACM (http://www.acm.org) to see all the other proposals that could replace TCP, like VMTP. By the way have tried to do anything useful with tftp, other than use it to download a kernel to do a network boot (i.e What security does it have in place?).
Well at least thats my 0.02 Rands worth.
I fount it interesting, better performance (even if in small cases) are always wellcome, and so altivec use.
So my question is: how can I install/use it on my system (g4 mac os X 10.3.x)?