- 6.1 About Ethernet
- 6.2 About Hubs, Switches, and Routers
- 6.3 About TCP/IP
- 6.4 About Packets
- 6.5 About Remote Procedure Calls (RPCs)
- 6.6 Slop
- 6.7 Observing Network Traffic
- 6.8 Sample RPC Message Definition
- 6.9 Sample Logging Design
- 6.10 Sample Client-Server System Using RPCs
- 6.11 Sample Server Program
- 6.12 Spinlocks
- 6.13 Sample Client Program
- 6.14 Measuring One Sample Client-Server RPC
- 6.15 Postprocessing RPC Logs
- 6.16 Observations
- 6.17 Summary
- Exercises
6.6 Slop
The slop, or unidentified communication time, is (T4-T1) - (T3-T2) = (T2-T1) + (T4-T3). When the client RPC latency and the server time are nearly equal, the slop is small. When there are communication delays (usually in the kernel code on one machine or the other, not in the network hardware), the slop can be large. Figure 6.6 shows a large slop, with the overall RPC latency about 1.5x the server time. In Chapter 7, we will also subtract the estimated transmission time for request and response messages:
slop = (T4 - T1) - (T3 - T2) - requestTx - responseTx
When the slop is large, that means that there is significant delay somewhere between the two communicating user-mode programs. In Chapter 15 we will introduce recording the w1 and w3 times of RPC headers on the wire, shown in gray in Figure 6.6. They indicate here that request and response messages hit the wire almost immediately when sent, so the long delays are in kernel code on the receiving end.
To complete the RPC picture, Figure 6.7 shows a two-level call tree of RPCs doing a single web search. The top-level ~100 light green RPC arcs coming from the top of the rack labeled “hsdr” are all done in parallel, and all the groups of second-level ~20 dark blue RPC arcs are also done in parallel, quickly spreading the work across about 2,000 servers. Each leaf in the call tree does a portion of the search, and those partial results are combined when all parallel RPCs in a group have returned.
Figure 6.7 Two-level RPC call tree for a single web search, farming out one search to about 2,000 partial searches of different parts of a web index. Each rectangle represents a rack of ~50 server machines. The light green arcs show about 100 top-level RPCs from one machine in rack “hsdr” to 100 others. The dark blue arcs show about 20 second-level RPCs from each of those 100 to a total of about 2000 servers.