Networks enable computers and other devices to communicate. For example, networks can carry data representing video, audio, e-mail, and so forth. Typically, data sent across a network is divided into smaller messages known as packets. By analogy, a packet is much like an envelope you drop in a mailbox. A packet typically includes “payload” and a “header”. The packet's “payload” is analogous to the letter inside the envelope. The packet's “header” is much like the information written on the envelope itself. The header can include information to help network devices handle the packet appropriately. For example, the header can include an address that identifies the packet's destination.
A series of related packets can form a connection. A connection is often identified by a combination of different portions of a packet known as a tuple. For example, a tuple is commonly formed by a combination of source and destination information of a packet header.
A variety of networking protocols maintain state information for a connection. For example, the Transmission Control Protocol (TCP) stores state data for a connection in a Transmission Control Block (TCB). A TCB includes state data such as the last received byte, the last successfully transmitted byte, and so forth. Typically, connection state data is accessed and, potentially, updated for each packet in a connection. In a multi-processor system, this can create contention issues between processors handling packets for the same connection. That is, for example, different processors handling data for the same connection may each attempt to access a connection's state data at the same time, creating requirements for data locking and introducing delay as the processors wait for access to the connection state data.
Contention between the processors, however, can be reduced by mapping respective connections to the respective processors. For example, a network interface controller (NIC) may perform a hash on a tuple of a received packet and use the hash to determine a processor to handle a given packet. Directing packets in a flow to the same processor can help pin down state information. This can enable the processor to retain the state data for a connection in local processor memory (e.g., cache memory) and reduce contention between processors trying to access the same connection state data.
Network traffic handled by a host 100 may rise and fall at different times. For example, as shown in
In response to increasing network traffic, operation of the NIC 104 may be similarly altered to distribute packets to a larger set of processors 102a-102n. For example, in response to increasing network traffic, NIC 104 may again map packets 110a-110c to an increased number of processors 102a-102n, e.g., as shown in
As shown in
As also shown in
As also shown, the base number may also be altered. For example, increasing the base number will result in flows being mapped to fewer processors while decreasing the base number will result in flows being mapped to a greater number of processors.
While
In some implementations, the NIC may monitor network traffic to determine an increase or decrease in network traffic meriting an increase or decrease in the number of processors. For example, the NIC may maintain a count of packets received, or some other RMON (Remote Monitoring) statistic, to determine a change in network traffic. A NIC may also maintain a count of the number of on-going TCP/IP connections and initiate a change in processor mapping in response to a rise or fall in the connection count To avoid processor wake/sleep thrash, the NIC may compare changes in network traffic measurements against thresholds. For example, the NIC may implement a table associating network traffic levels with numbers of processors. Alternately, the NIC may simply increase or decrease the number based on the amount of change of a measure of network traffic exceeding (or equaling) some threshold. As an example, the NIC may adjust to bursts, for example, when a measurement of network traffic increases by 10% of peak in 1-second, the NIC may increase the number of processors mapped to flows.
A NIC may use other metrics to determine when to initiate a change in the number of processors mapped to flows. For example, a NIC may monitor the queue counts of receive queues, and if a queue count drops to some level (e.g., 10% of available) the NIC may reduce the number of processors mapped to flows. In this particular instance, to minimize re-mapping of on-going connections, the processor associated with the comparatively inactive receive queue may be removed from the set of processors, for example, by replacing integer values associated with the processor in the indirection table 206 to other processor values.
The particular metrics and/or change triggering events (e.g., thresholds exceeded) may be configurable. For example, configuration may be performed via a network driver executed by a processor. For example, the network driver may specify values of one or more object identifiers configuring operation of the NIC. For example, such configuration data may control whether or not the number of processors mapped is altered based on network traffic, which metric(s) are used, what triggers an increase or reduction, thresholds or other rules applied, and so forth. The configuration data may select an operation mode of the network interface controller from multiple modes of operation that includes a mode that, in response to a change in network traffic, alters operation of the network interface controller to change processor distribution of received packets from a first set of multiple processors to a second set of multiple processors coupled to the network interface controller and at least one mode that does not.
A potential downside of the techniques described above is that when traffic ramps up, the processors need to be woken up, requiring a few microseconds of added latency. To avoid this problem, a NIC may predictively ping a processor, causing a processor to wake (enter a comparatively higher power consumption mode) and hide wakeup latency as the NIC determines increasing traffic patterns. As an example, an increase of total throughput by 5% may cause the NIC to initiate a wakeup of a processor while a 10% increase will trigger a remapping of flows to processors to include the “woken” processor.
In an alternate implementation, the NIC does not initiate a change in the set of processors mapped to flows but is instead controlled by host 100 processors 102a-102n. For example, an operating system may monitor system load and/or network traffic handled and issue reconfiguration commands to the NIC instructing the NIC to increase or decrease the number of processors mapped to flows.
While
The term packet as used herein encompasses protocol data units (PDUs) for a wide variety of network protocols featuring a header and payload. A packet may be an encapsulated or encapsulating packet. Further, a given tuple may feature data from zero or more encapsulated packet headers and may or may not feature data from an encapsulating packet header.
The techniques described above may be implemented in a variety of software and/or hardware architectures. The term circuitry as used herein includes hardwired circuitry, digital circuitry, analog circuitry, programmable circuitry, and so forth. The programmable circuitry may operate on instructions stored on a computer readable storage medium.
Other embodiments are within the scope of the following claims.
Number | Name | Date | Kind |
---|---|---|---|
6546496 | Wang et al. | Apr 2003 | B1 |
6904040 | Salapura et al. | Jun 2005 | B2 |
6920110 | Roberts et al. | Jul 2005 | B2 |
7324540 | Vangal et al. | Jan 2008 | B2 |
20030023885 | Potter et al. | Jan 2003 | A1 |
20030074388 | Pham et al. | Apr 2003 | A1 |
20030188208 | Fung | Oct 2003 | A1 |
20040095934 | Cheng et al. | May 2004 | A1 |
20050086393 | Meng et al. | Apr 2005 | A1 |
20060153215 | Cornett et al. | Jul 2006 | A1 |
20060195698 | Pinkerton et al. | Aug 2006 | A1 |
20070121662 | Leech | May 2007 | A1 |
20080114781 | Yin et al. | May 2008 | A1 |
20090028045 | Stellenberg et al. | Jan 2009 | A1 |
20090161548 | Zhu et al. | Jun 2009 | A1 |
20090288088 | Orii | Nov 2009 | A1 |
20100037038 | Bieswanger et al. | Feb 2010 | A1 |
Number | Date | Country |
---|---|---|
0150247 | Jul 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20100061245 A1 | Mar 2010 | US |