Re: Scyld vs kernel drivers
Donald Becker <[email protected]>
| Newsgroups | gmane.linux.drivers.vortex.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 6 Dec 2002, Richard Fuchs wrote: > >>>I was wondering about the differences between Donald Becker's driver and > >>>the driver that comes with the linux kernel, > > ... > >>>especially the differences performance-wise. > > Every modern PCI NIC can get full wire rate performance. > > The difference is how much system load the NIC imposes. > > This is impacted by: ... > > TCP/UDP/IP checksum calculations (the 905B/905C are excellent) ... > Perhaps I should have clarified more, I was actually thinking about cpu > usage and system load and not so much transfer rate. I'm using two > 3c905C cards and I'm looking for ways to cut down the cpu usage. I > looked at the driver sources some and read the docs, but it still isn't > clear to me how the driver handles for example hardware checksumming > (somehow related to zerocopying). The 3c905B and C have full hardware checksumming, as opposed to the more common "partial checksum" support. And the chips do it exactly right. On receive the chip looks at the type of the incoming packet (IPv4, IPv4+UPD, IPv4+TCP) and provides the "checksum passed" bits. The driver merely needs to enable the feature, and looks at the bits. If the checksum doesn't pass, an uncommon error, the driver lets the protocol level code re-checksum and increments whatever error counters it is keeping. Transmit checksumming is much less important. The data is still hot in the cache so the software can copy-align and checksum efficiently. And the NIC must transfer and interpret the whole packet before stuffing the checksum into the header, which adds latency. "Zero-copy" sounds very sexy to work on and has high marking value, but is applicable on in limited circumstances. Locking down a single page on an SMP can be more expensive than just copying in-cache data to where it needs to be. So you must be in a situation where you have 32KB+ to transmit the TCP receiver's window has opened to 32KB+ (!) that data is already in lockable memory pages the data will not be written during the transmit the pages are accessible to the PCI bus Having a NIC that computes the Tx checksums is a requirement for "zero-copy" transmit to make any sense, otherwise the CPU has to touch all of the bytes anyway. Since you must deal with large blocks, you really want full TCP segmentation support in the NIC. > To make a long story short: can I expect a drastic decrease in cpu > usage if I switched from the kernel driver to your driver? No. > Or is there other hardware that does a better job at taking load off > the cpu? It depends on what you are doing. A cluster compute node or application server node is a much different environment than a workstation. -- Donald Becker [email protected] Scyld Computing Corporation http://www.scyld.com 410 Severn Ave. Suite 210 Scyld Beowulf cluster system Annapolis MD 21403 410-990-9993 _______________________________________________ vortex mailing list [email protected] http://www.scyld.com/mailman/listinfo/vortex