Abstract:
A method for configuring a link aggregation module, including configuring the link aggregation module to use an initial network interface card (NIC) selection algorithm, servicing a first plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the first plurality of packets, collecting a plurality of first packet distribution statistics for the aggregation group corresponding to the servicing of the first plurality of packets, and selecting a first alternate NIC selection algorithm based on the plurality of first packet distribution statistics.

Description:
BACKGROUND 
     Network traffic is transmitted from a network, such as the Internet, from a sending system (e.g., a computer system) to a receiving system (e.g., a computer system) via a network interface card (NIC). The NIC is a piece of hardware found in a typical computer system that includes functionality to send and receive network traffic. Typically, network traffic is transmitted in the form of packets, where each packet includes a header and a payload. The header contains information regarding the source address, destination address, size, transport protocol used to transmit the packet, and various other identification information associated with the packet of data. The payload contains the actual data to be transmitted from the network to the receiving system. 
     Some sending and receiving systems include a single NIC while other sending and receiving systems include multiple NICs. When multiple NIC are present on the system, one or more NICs may be grouped to form an aggregation group. The sending and receiving systems that include aggregations groups typically have higher packet throughput due to the higher availability of NICs through which packets may be sent and received. More specifically, the aggregation group is utilized by the systems (i.e., sending and receiving systems) via a virtual NIC. 
     Thus, when a client (i.e., a process configured to send and/or receive a packet) attempts to send a packet to a receiving system, the client sends the packet to the virtual NIC (which appears to the client as an actual NIC). A link aggregation module within the system receives the packet and then determines which of the multiple NICs within the aggregation group to use to service the packet (i.e., send the packet to receiving system). The link aggregation module subsequently forwards the request to the appropriate NIC in the aggregation group. The NIC subsequently services the packet. 
     As noted above, the link aggregation module includes functionality to select which NIC within the aggregation group to service the request. More specifically, the link aggregation module includes one or more NIC selection algorithms which may be used to select the NIC within the aggregation group that should service a particular packet. The NIC selection algorithm used by the link aggregation module is typically selected by a system administrator when the link aggregation module is configured. The system administrator typically selects the NIC selection algorithm using knowledge about the network topology and applications executing on the system in which the link aggregation module is deployed. 
     SUMMARY 
     In general, in one aspect, the invention relates to a method for configuring a link aggregation module, comprising configuring the link aggregation module to use an initial network interface card (NIC) selection algorithm, servicing a first plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the first plurality of packets, collecting a plurality of first packet distribution statistics for the aggregation group corresponding to the servicing of the first plurality of packets, and selecting a first alternate NIC selection algorithm based on the plurality of first packet distribution statistics. 
     In general, in one aspect, the invention relates to a system, comprising a client configured to send a plurality of packets, an aggregation group comprising a plurality of network interface cards (NICs), and a link aggregation module initially configured to service a plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the plurality of packets, collect a plurality of packet distribution statistics for the aggregation group corresponding to the servicing of the plurality of packets, and select a first alternate NIC selection algorithm based on the plurality of packet distribution statistics. 
     In general, in one aspect, the invention relates to a computer system for configuring a link aggregation module, comprising a processor, a memory, a storage device, and software instructions stored in the memory for enabling the computer system under control of the processor, to configure the link aggregation module to use an initial network interface card (NIC) selection algorithm, service a plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the plurality of packets, collect a plurality of packet distribution statistics for the aggregation group corresponding to the servicing of the plurality of packets, and select a first alternate NIC selection algorithm based on the plurality of packet distribution statistics. 
     In general, in one aspect, the invention relates to a computer readable medium for configuring a link aggregation module, comprising software instructions to configure the link aggregation module to use an initial network interface card (NIC) selection algorithm, service a plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the plurality of packets, collect a plurality of packet distribution statistics for the aggregation group corresponding to the servicing of the plurality of packets, and select a first alternate NIC selection algorithm based on the plurality of packet distribution statistics. 
     In general, in one aspect, the invention relates to a plurality of nodes, comprising a client configured to send a plurality of packets, a aggregation group comprising a plurality of network interface cards (NICs), and a link aggregation module initially configured to service a first plurality of packets using a plurality of NICs in an aggregation group, wherein the initial NIC selection algorithm is used to select the one of the plurality of NICs to service at least one of the plurality of packets, collect a plurality of packet distribution statistics for the aggregation group corresponding to the servicing of the plurality of packets, and select a first alternate NIC selection algorithm based on the plurality of packet distribution statistics, wherein the client is located on at least one of the plurality of nodes, wherein the aggregation group is located on at least one of the plurality of nodes, wherein the link aggregation module is located on at least one of the plurality of nodes. 
     Other aspects of the invention will be apparent from the following description and the appended claims. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         FIG. 1  shows a system in accordance with one embodiment of the invention. 
         FIG. 2  shows a flow chart in accordance with one embodiment of the invention. 
         FIG. 3  shows a computer system in accordance with one embodiment of the invention. 
     
    
    
     DETAILED DESCRIPTION 
     Specific embodiments of the invention will now be described in detail with reference to the accompanying figures. Like elements in the various figures are denoted by like reference numerals for consistency. 
     In the following detailed description of embodiments of the invention, numerous specific details are set forth in order to provide a more thorough understanding of the invention. In other instances, well-known features have not been described in detail to avoid obscuring the invention. 
     In general, embodiments of the invention provide a method and system for selecting a NIC selection algorithm. Further, embodiments of the invention provide a method and system that includes functionality to change the NIC selection algorithm (i.e., self-tune) used by the link aggregation module to optimally distribute the load across the multiple NIC in the aggregation group. Further, embodiments of the invention provide a method and system using packet distribution statistics to aid in the selection of the optimal NIC selection algorithm for the particular link aggregation module. 
       FIG. 1  shows a system in accordance with one embodiment of the invention. The system includes a client ( 100 ) interfacing with a kernel ( 102 ). The client ( 100 ) corresponds to any process (or any system or device executing the process) that includes functionality to send and/or receive data. In one embodiment of the invention, the data is processed by the kernel ( 102 ) in a format necessary to transmit over a network ( 108 ). After processing, the packet is typically in a protocol compliant format (such as an Internet Protocol (IP) packet, etc.). The client ( 100 ) typically forwards the packet to the kernel ( 102 ). The kernel ( 102 ) includes the necessary functionality to receive the packet and forward the packet (via a link aggregation module ( 104 )) to a corresponding aggregation group ( 106 ). The aggregation group ( 106 ) may include one or more NICs (e.g., NIC  1  ( 106 A), NIC N ( 106 N)). 
     In one embodiment of the invention, the client ( 100 ) and the kernel ( 102 ) are executing on a single server. Further, the server includes the necessary hardware to interface with the aggregation group ( 106 ). Alternatively, the kernel ( 102 ) may be executing on one system that includes the necessary hardware to interface with the aggregation group ( 106 ) and includes functionality to interface with multiple clients ( 100 ). In this scenario, the clients ( 100 ) may correspond to devices having a processor, a memory, and a communications interface (e.g., single NIC, serial cable, a universal serial bus (USB) cable, or any other mechanism for transmitting the packet to the kernel ( 102 )). 
     In one embodiment of the invention, the link aggregation module ( 104 ) includes two or more NIC selection algorithms (i.e., algorithms used to determine which NIC (e.g., NIC  1  ( 106 A), NIC N ( 106 N)) within the aggregation group to use to service the packet. In one embodiment of the invention, the NIC selection algorithm uses the media access control (MAC) address of the destination system to determine the NIC (e.g., NIC  1  ( 106 A), NIC N ( 106 N)) to use to service the packet. The aforementioned NIC selection algorithm is typically used in network topologies where a server hosting the link aggregation group ( 106 ) is operatively connected to a switch (not shown) and is sending the packet to multiple receiving systems. 
     In one embodiment of the invention, the NIC selection algorithm uses protocol information within the packet to determine which NIC in the aggregation group to use for servicing the packet. The protocol information corresponds to information in one or more fields in the packet. The fields are governed by the protocol (i.e., IP, etc.) used to format the packet. If the packet is formatted using IP, the protocol information may correspond to a source port, a destination port, a source IP address, a destination IP address, etc. Further, combinations of protocol information may be used in selecting the NIC algorithm. The aforementioned NIC selection algorithm is typically used in network topologies where a server hosting the link aggregation group ( 106 ) is directly connected to another server (not shown) via the aggregation group. Those skilled in the art will appreciate that the invention is not limited to the two aforementioned NIC selection algorithms described above and that other NIC selection algorithms are possible. 
     In one embodiment of the invention, the link aggregation module ( 104 ) includes functionality to implement a given NIC selection algorithm to select the NIC (e.g., NIC  1  ( 106 A), NIC N ( 106 N)) in the aggregation group ( 106 ) to use for servicing the packet. Further, the link aggregation module ( 104 ) (or another process executing in the kernel ( 102 )) includes functionality to obtain packet distribution statistics corresponding to the aggregation group ( 106 ). In one embodiment of the invention, the packet distribution statistics may include statistics that track utilization of system resources, utilization of network infrastructure resources, the number of packets serviced by each NIC in the aggregation group, the overall rate of servicing the plurality of packets, etc. 
     The link aggregation module ( 104 ) (or another process executing in the kernel ( 102 )) further includes functionality to analyze the packet distribution statistics to determine whether the NIC selection algorithm currently implemented by the link aggregation module ( 104 ) is optimally distributing the load (i.e., the serving of packets) across the NICs in the aggregation group. In one embodiment of the invention, the link aggregation module ( 104 ) (or another process executing in the kernel ( 102 )) compares the results of the analysis of the packet distribution statistics to a minimum threshold level. The minimum threshold level corresponds to minimal amount of load distribution required for load distribution to be considered optimally balanced. The minimum threshold level may be set to a default (or pre-determined) level set by the system administrator, etc. 
       FIG. 2  shows a flow chart for in accordance with one embodiment of the invention. Initially the link aggregation module is configured to implement an initial NIC selection algorithm (ST 100 ). In one embodiment of the invention, the NIC selection algorithm is selected using a selection method, such as default selection, random selection, and/or user selection. Once the link aggregation module is configured to implement the initial NIC selection algorithm, the system upon which the link aggregation module is executing begins to receive packets from one or more clients (ST 102 ). 
     The link aggregation module subsequently receives the packets and determines the NICs within the aggregation group to use for servicing the request using the current NIC selection algorithm implemented by the link aggregation module (ST 104 ). The packets are subsequently serviced and the corresponding packet distribution statistics are recorded (ST 106 ). At certain time intervals, the packet distribution statistics collected in ST 106  are analyzed and a determination is made whether the aggregation group is operating at or above the minimum threshold level (ST 108 ). The time intervals may be selected by the system administrator or may be pre-determined or set as defaults within the link aggregation module. 
     If the aggregation group is operating at or above the minimum threshold level, then the link aggregation module may continue to use the current NIC aggregation module. Alternatively, if the aggregation group is operating below the minimum threshold level, then an alternate NIC aggregation algorithm may be selected and implemented by the link aggregation level (ST 110 ). Step  102 -Step  108  may then repeated until the aggregation group is operating at or above the minimum threshold level. 
     The invention may be implemented on virtually any type of computer regardless of the platform being used. For example, as shown in  FIG. 3 , a computer system ( 200 ) includes a processor ( 202 ), associated memory ( 204 ), a storage device ( 206 ), and numerous other elements and functionalities typical of today&#39;s computers (not shown). The computer ( 200 ) may also include input means, such as a keyboard ( 208 ) and a mouse ( 210 ), and output means, such as a monitor ( 212 ). The computer system ( 200 ) is connected to a local area network (LAN) or a wide area network (e.g., the Internet) (not shown) via a network interface connection (not shown). Those skilled in the art will appreciate that these input and output means may take other forms. 
     Further, those skilled in the art will appreciate that one or more elements of the aforementioned computer system ( 200 ) may be located at a remote location and connected to the other elements over a network. Further, the invention may be implemented on a distributed system having a plurality of nodes, where each portion of the invention (e.g., the client, the link aggregation module, the aggregation group, etc.) may be located on a different node within the distributed system. In one embodiment of the invention, the node corresponds to a computer system. Alternatively, the node may correspond to a processor with associated physical memory. Further, software instructions to perform embodiments of the invention may be stored on a computer readable medium such as a compact disc (CD), a diskette, a tape, or any other computer readable storage device. 
     While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Accordingly, the scope of the invention should be limited only by the attached claims.