| < Day Day Up > |
|
Buffer copies within protocol stacks are commonly one of the largest performance drains. In a typical TCP/IP stack, a packet is copied from the physical device and then again, between the Sockets layer and the Application layer. Those two copies waste the computing capacity of the processor and should, therefore, be avoided (see Figure 7.5). Newer TCP/IP stacks provide a zero-copy option whereby the initial (potential) buffer copy targets a buffer in the application space. The application then simply passes the pointer of the buffer to the Application layer and no copy is performed.
Figure 7.5: Illustrating buffer copies in a traditional TCP/IP stack.
Newer protocols such as RDMA (Remote Direct Memory Access) take this concept to the next level by not only providing buffers to the stack, but also providing a means to reserve them from the peer.
| < Day Day Up > |
|