• Aucun résultat trouvé

Factors Affecting Router Performance

Router Delay

2.2 Factors Affecting Router Performance

There are three classes of influences on router performance: characteristics of the router, characteristics of the routed traffic, and external events (besides routed traffic) that demand the attention of the router. The two routers that I studied are quite different in terms of these characterizations.

The baseline speed of a router (given the most favorable environment) is determined by the intrinsic characteristics of the router itself. A router is a complex hardware/software system. One straightforward characteristic that can be measured is the speed of the hardware — CPU, backplane or bus, and communication interfaces. The software code to be executed for each packet is determined by the quality of the implementation and the complexity of the protocol and routing architecture. The code may also be more or less constant. If it is constant and small enough to fit into cache memory (if present), execution speed will be dramatically enhanced. Finally, most routers are complex enough to require a multi-tasking operating system to handle the variety of tasks the router is called upon to perform. The selection of the scheduling algorithm, and minimization of blocking due to critical sections can have a dramatic impact on routing delay. For example, if a packet to be routed has to wait for an in-process routing-table update to finish, that packet will likely experience a much longer delay than the average case.

The characteristics of the traffic to be routed also contribute to the delay experienced by individual packets. Average packet rate and size are important and easy-to-measure characteristics, but don’t nearly tell the whole story. If packets arrive in bursts, they will be delayed more than evenly-spaced packets. Burstiness is, unfortunately, hard to quantify. A useful reference is the Poisson density function, which results in a exponential distribution of interarrival times. Analytical models often assume Poisson distributions, providing a baseline for comparison of other results. Unfortunately, real networks do not exhibit Poisson characteristics [SH80, Llo86, PDA86]. [Llo86] and others have proposed ways to measure burstiness which, unfortunately, require somewhat subjective parameters to define what looks “bursty”. In section 2.5.4, I propose a simple technique that allows direct comparison to Poisson results.

2.2.1 Environmental Factors

The environment around a router can also affect the routing delay. Routers are an integral part of a larger system, and therefore must interact with the rest of the world, besides doing the primary work of routing packets. Two typical tasks are routing table maintenance and address resolution. Routing tables are updated by routing update packets, which are (usually) exchanged between routers. A single router must receive updates and use them to modify its routing table, as well as send out updates when something significant changes. A router that communicates directly with many others will spend a lot more time processing routing updates than a relatively isolated router.

Address resolution is one example of broadcast traffic that routers must handle. In the Internet, the Address Resolution Protocol (ARP) is used to find Ethernet addresses, given an IP address on the same network. (ARP is a specific case of address resolution; almost all internet architectures have some protocol to fill this niche.) A host broadcasts an ARP request and the host with that IP address responds. The requesting host caches the response. Some hosts, that aren’t clever enough to do “real” routing, rely on a technique known as Proxy ARP, where a host blindly sends an ARP request, even if the target host isn’t on the same network. If a router supports Proxy ARP (most do), then it responds to the ARP request as if it was the target host (with certain restrictions, mostly that the router is on a direct path between the two hosts). The originating host then sends packets destined for the target host to the router, which dutifully forwards the packets. The result, once the ARP process is done, is exactly the same as if the originating host knew how to find the appropriate router in the first place.

Proxy ARP works well, except for one thing: participating routers must listen to all ARP packets on the network and look up each IP address in their routing tables to determine whether and how to respond. This burden is normally small, unless there are protocol implementation errors that result in large numbers of ARP requests. Unfortunately, there are many subtle bugs, in many protocol implementations, that have persisted for years that produce “storms” of ARP requests[BH88]. Routers are especially vulnerable to such misbehavior.

Finally, other traffic on the networks to which a router connects will interfere with and delay the transmission of packets. Delay due to contention for the network has been investigated thoroughly for Ethernets [MB76, AL79, TH80, SH80, Gon85, BMK88].

For situations not involving overloads, this contribution to the total delay is quite small (typically less than 1 mSec).

2.2.2 Case Studies

Measurements were made on two different routers, with significantly different character-istics.

“Slow” Router “Fast” Router Processor 10 MHz 68000 24 MHz 68020 Routing Scheduling via process at interrupt time

Routing Table table lookup routing cache

Packet Copying? Yes No

Typical Delay 2 mSec 100 uSec

Table 2.3: Router Characteristics

Both of these routers use a non-preemptive, priority-based process scheduler. In the slow router packets are forwarded by a scheduled process (highest priority) which looks up the destination address in the main routing table. In the fast router, packets are forwarded by the interrupt handler which looks up addresses in a routing cache. Only cache misses have to wait for the scheduled process to do a full routing-table lookup. The other major difference is that packets are copied across the system bus in the slow router, while the fast router’s two Ethernet interfaces share common packet buffer memory. It is clear from the delay figures that these techniques pay off well — even discounting the increased processor speed, the fast router is an order of magnitude faster than the slow one.