METHOD AND DEVICE FOR ESTIMATING WORKLOAD OF NETWORK FUNCTION
20170250925 · 2017-08-31
Assignee
Inventors
Cpc classification
International classification
Abstract
A workload estimation method estimates a workload of a network function that processes a received flow based on a rule searched for from among a plurality of rules. The method that is executed by a processor includes: obtaining information that indicates maximum throughputs of the network function respectively for the rules; measuring traffic volumes of flows that respectively match the rules; calculating ratios of the measured traffic volumes to the maximum throughputs respectively for the rules; and estimating a workload of the network function based on a sum of the ratios calculated respectively for the rules.
Claims
1. A workload estimation method for estimating a workload of a network function that processes a received flow based on a rule searched for from among a plurality of rules, the method comprising: obtaining, by a processor, information that indicates maximum throughputs of the network function respectively for the rules; measuring, by the processor, traffic volumes of flows that respectively match the rules; calculating, by the processor, ratios of the measured traffic volumes to the maximum throughputs respectively for the rules; and estimating, by the processor, a workload of the network function based on a sum of the ratios calculated respectively for the rules.
2. A workload estimation method for estimating a workload of a network function that sequentially performs a search from a first rule toward an N-th rule until a received flow matches one of N rules so as to processes the received flow in accordance with the rule that matches the received flow, the method comprising: obtaining, by a processor, information that indicate maximum throughputs of the network function respectively for the rules; measuring, by the processor, traffic volumes of flows that respectively match the rules; and estimating, by the processor, a workload of the network function based on a workload calculation formula below:
3. The workload estimation method according to claim 2, further comprising: measuring, by the processor, a maximum throughput of the network function for each of a plurality of extracted rules that are extracted from among the N rules; generating, by the processor, an approximation formula that expresses a maximum throughput of the network function based on the maximum throughput measured for each of the extracted rules; and calculating, by the processor, a maximum throughput of the network function for each of the N rules by using the approximation formula, wherein the workload of the network function is estimated by applying the maximum throughput calculated for each of the N rules to the workload calculation formula.
4. The workload estimation method according to claim 3, wherein the approximation model that represents the approximation formula is expressed by
5. A workload estimation device that estimates a workload of a network function that processes a received flow based on a rule searched for from among a plurality of rules, the device comprising: a memory in which the plurality of rules are registered; and a processor configured to: obtain information that indicates maximum throughputs of the network function respectively for the rules registered in the memory; measure traffic volumes of flows that respectively match the rules registered in the memory; calculate ratios of the measured traffic volumes to the maximum throughputs respectively for the rules registered in the memory; and estimate a workload of the network function based on a sum of the ratios calculated respectively for the rules registered in the memory.
6. A non-transitory computer-readable recording medium having stored therein a program for causing a computer to execute a workload estimation process, the workload estimation process comprising: obtaining information that indicates maximum throughputs of the network function respectively for the rules; measuring traffic volumes of flows that respectively match the rules; calculating ratios of the measured traffic volumes to the maximum throughputs respectively for the rules; and estimating a workload of the network function based on a sum of the ratios calculated respectively for the rules.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
DESCRIPTION OF EMBODIMENTS
[0030]
[0031] A controller 10 controls network functions. In other words, a network function processes a packet flow in the network in accordance with the control by the controller 10. Also, the controller 10 collects, from the network function, information used for controlling the network function. For example, the controller 10 collects information indicating a traffic volume in the network.
[0032]
[0033] The controller 10 provides, to the network devices 20, a program and data for controlling a network function. When for example the network device 20 configures a firewall, the controller 10 provides, to that network device 20, an application program and rule information for implementing a firewall. Then, the network device 20 executes the application program so as to provide a firewall function based on the provided rule information. In other words, the network device 20 can provide a network function in accordance with control by the controller 10.
[0034] The controller 10 collects information used for controlling network functions from the network devices 20. For example, the controller 10 can collect information indicating a traffic volume from the network device 20.
[0035] A workload estimator 30 estimates the workload of a network function. A workload in this example represents the level of a load on a network function. For example, a workload may represent a ratio of a capacity that is actually used to the maximum capacity of a network function. Note that a workload of a network function is not proportional to the CPU usage rate but depends upon the CPU usage rate, the memory usage rate, the usage rate of network resources, etc.
[0036] The workload estimator 30 is connected to the network device 20a in the example of
[0037]
[0038] The buffer memory 22 temporarily stores a received packet. In other words, a received packet that arrives at the input port 21 is stored in the buffer memory 22. The memory 23 stores information for providing a network function. In this example, the memory 23 stores a rule table 24. Note that data set in the rule table 24 is provided from for example the controller 10 illustrated in
[0039]
[0040] The CPU 25 processes a received packet based on a header of that received packet stored in the buffer memory 22. In the process, the CPU 25 searches the rule table 24 based on header information stored in the header of the received packet. Then, the CPU 25 determines a rule that matches the header information so as to determine an operation for that received packet. When for example the source address SA of a received packet is “xxx1”, rule 1 is determined in the rule table 24. In such a case, the CPU 25 discards the received packet stored in the buffer memory 22 in accordance with rule 1. Also, when the source address SA of a received packet is “xxx7”, rule N is determined in the rule table 24. In such a case, in accordance with rule N, CPU 25 forwards the received packet stored in the buffer memory 22, to a destination via the output port 26.
[0041]
[0042] In S1, the CPU 25 obtains header information of a received packet. Header information obtained by the CPU 25 includes for example source address SA, destination address DA, a port number, etc. In S2, the CPU 25 initializes variable n to “1”. Variable n is an integer for identifying N rules that are registered in the rule table 24.
[0043] In S3, the CPU 25 decides whether the header information obtained in S1 matches rule n. Specifically, whether the header information obtained in S1 matches “condition” of rule n is decided. When the header information does not match rule n, the CPU 25 increments variable n by one in S4. In S5, the CPU 25 decides whether variable n is greater than N. N represents the number of rules that are registered in the rule table 24. When variable n is smaller than or equal to N, the process of CPU 25 returns to S3.
[0044] In S3-S5, the CPU 25 searches for a rule that matches the header information of a received packet in N rules registered in the rule table 24. When rule n that matches the received packet is determined, the CPU 25 processes that received packet in accordance with the determined rule n. Further in S7, the CPU 25 increments the counter corresponding to rule n that matches the received packet in the rule table 24. In other words, the counter in rule table 24 illustrated in
[0045] When the received packet does not match any of the rules, the CPU 25 performs a default process in S8. Ina default process, the CPU 25 may discard the received packet.
[0046] As described above, CPU 25 sequentially performs a search from rule 1 toward rule N until a received packet matches one of the N rules that are registered in the rule table 24. Therefore, a period of a searching time for the rule table 24 depends upon the rule number of the rule that matches a received packet. When for example a packet having header information that matches rule 1 arrives at the network device 20, the CPU 25 can determine a rule that matches the received packet by performing the search process in S3 of
[0047] Note that a flow of a packet or a frame may be referred to just as a “flow” in this specification. A flow is identified based on for example the header information of each packet. In other words, a flow is identified by for example an address (MAC address, IP address, etc.) or a port number of TCP/UDP stored in a header, or by a combination thereof.
[0048] In the network device 20, the CPU 25 can identify a flow based on the header information of a received packet. A flow that is identified based on the header information of a received packet may be referred to as a “received flow” hereinafter. The CPU 25 determines a rule that matches a received flow so as to process that received flow in accordance with the determined rule.
[0049]
[0050] Portion of the functions of the maximum throughput processor 31, the traffic measurement unit 33, the estimator 34 and the approximation formula generator 35 may be implemented by a hardware circuit. The maximum throughput information storage 32 is implemented by for example a semiconductor memory.
[0051] The maximum throughput processor 31 obtains maximum throughput information that indicates the maximum throughput of a network function. In this example, the maximum throughput information indicates the maximum throughput of the network function for each of rules 1-N that are registered in the rule table 24. The maximum throughput of the network function for each of rules 1-N is measured by a measurement system illustrated in
[0052] A throughput measurement device 40 includes a traffic generator 41, a packet transmitter (Tx) 42 and a packet receiver (Rx) 43 as illustrated in
[0053] When, for example, the maximum throughput is measured for rule 1 in the above measurement system, the throughput measurement device 40 generates a flow that matches rule 1. Specifically, the throughput measurement device 40 generates a test packet having header information that matches rule 1 and transmits the test packet to the network device 20. Then, the network device 20 processes the received flow in accordance with the rule table 24. It is assumed in this example that when a received test packet matches one of rules 1-N that are registered in the rule table 24, the network device 20 outputs that test packet to the throughput measurement device 40. In this case, because the received flow matches rule 1, the network device 20 outputs the received test packet to the throughput measurement device 40.
[0054] The throughput measurement device 40 outputs the flow that matches rule 1 at a transmission rate exceeding the maximum throughput of the network device 20. In this case, the network device 20 is not capable of processing all the test packets and thus discards some of the test packets. Thus, the throughput measurement device 40 can measure the maximum throughput for rule 1 in the network device 20 by monitoring the traffic volume of test packets received from the network device 20.
[0055] Similarly, the throughput measurement device 40 transmits a flow that matches rule n to the network device 20 so as to monitor the traffic volume of a flow received from the network device 20. By doing this, the throughput measurement device 40 can measure the maximum throughput for rule n (n=1 through N). Then, the measured value of the maximum throughput for each rule is reported to the workload estimator 30 from the throughput measurement device 40. Note that the throughput measurement device 40 may measure the maximum throughput for each of all rules 1-N or may measure the maximum throughputs for some of rules 1-N.
[0056]
[0057] The traffic measurement unit 33 measures a traffic volume of a flow that matches each of rules 1-N registered in the rule table 24. Traffic volume is measured by using for example the counter in the rule table 24. In this example, the counter in the rule table 24 represents the accumulated number of packets that have matched each of rules n (n=1 through N) as described above. Thus, if the traffic measurement unit 33 obtains the counter values at an interval of for example 1 second and calculates the differences between the obtained counter values, the traffic volume can be detected. It is assumed for example that the counter value corresponding to rule n obtained at a certain sampling timing is “200” and the counter value obtained at the next sampling timing is “300”. In such a case, the traffic volume for rule n is 100 frames/second (i.e., 100 fps).
[0058] The estimator 34 calculates workload WL of a network function provided by the network device 20 using the workload calculation formula below.
[0059] T.sub.n represents the maximum throughput of the network function for rule n (n=1 through N) that is registered in the rule table 24. The maximum throughput is measured by using the measurement system illustrated in
[0060]
[0061] In S11, the measurement system illustrated in
[0062] In S12, the traffic measurement unit 33 measures the traffic volumes of the flows that respectively match rules 1-N registered in rule table 24. Thus, traffic volumes t.sub.1-t.sub.n respectively for rules 1-N are obtained.
[0063] Based on the maximum throughputs respectively for the rules obtained in S11 and the traffic volumes respectively for the rules obtained in S12, the estimator 34 calculates the workload of the network function. Specifically, the estimator 34 calculates the ratio of the traffic volume to the maximum throughput for each of the rules. Then, the estimator 34 calculates the sum of the N ratio values obtained for rules 1-N so as to calculate the workload imposed on the network function. That is, the estimator 34 applies maximum throughputs T.sub.1-T.sub.n and traffic volumes t.sub.1-t.sub.n to the workload calculation formula so as to calculate the workload WL.
[0064] Here, the workload calculation formula will be explained. Note in the following descriptions that a throughput represents the number of packets (or frames) that can be processed in 1 second and a traffic volume represents the number of packets (or frames) that are received in 1 second.
[0065] When the maximum throughput for the n-th rule (i.e., rule n) is represented by T.sub.n[fps], period of time P.sub.n[s] used for processing one packet that matches rule n is expressed by the formula below.
[0066] When the traffic volume of a flow that matches rule n is represented by t.sub.n[fps], the period of time used for processing a flow that matches rule n is represented by t.sub.nP.sub.n.
[0067] Then, period of time TPT (Total Processing Time) used for processing all flows received during 1 second (the sum of flows that matches any of rules 1-N) is expressed by the formula below.
[0068] When period of time TPT is shorter than or equal to “1 (second)”, the network function can process all received flows. In other words, when period of time TPT is longer than “1 (second)”, the network function fails to process some of received flows. Thus, a condition under which packet loss occurs is expressed by the formula below.
[0069] Further, the ratio of period of time TPT to “1 (second)” represents the level of a load imposed on a network function. Therefore, workload WL of a network function is derived from the formula below.
EXAMPLE
[0070] In the example below, the workload of a network function provided by the network device 20 is estimated by using the measurement system illustrated in
[0071] Rules 1-1000 are registered in the rule table 24. The throughput measurement device 40 simultaneously generates 10 flows that match rules 100, 200, 300, 400, 500, 600, 700, 800, 900 and 1000. The maximum throughputs that have been measured respectively for rules 100 through 1000 are as illustrated in
[0072] Under the above conditions, the throughput measurement device 40 increases traffic volume t.sub.100 from zero. t.sub.100 represents a traffic volume that matches rule 100. Then, the workload estimator 30 calculates workload WL of the network function by using the workload calculation formula. When for example traffic volume t.sub.100 is zero, the workload WL of a network function is calculated by the formula below. The calculation result indicates that the workload of the network function is about 25 percent.
[0073]
[0074] The graph illustrates that the CPU usage rate remains around 20 percent notwithstanding an increase in traffic volume t.sub.100 (the transmission rate of a flow that matches rule 100 in this example). However, an increase in a traffic volume is supposed to increase the load on the network function. This implies that the CPU usage rate in the graph does not correctly represent the load imposed on the network function.
[0075] By contrast, workload WL is roughly proportional to the traffic volume. When the workload WL has become close to 100 percent, packet loss starts occurring. This implies that workload WL in the graph correctly represents the load on the network function.
[0076]
[0077] As described above, workload value WL obtained by a workload estimation method according to the embodiment correctly represents a load imposed on a network. Accordingly, using this workload value WL makes it possible to appropriately design the performance or capacity of a network function in accordance with the traffic of the network. For example, a network function can be designed in such a manner that higher use efficiency is achieved for network resources while suppressing or avoiding packet loss.
Another Embodiment
[0078] When the workload of a network function is calculated by using the workload calculation formula, it is preferable that the maximum throughputs of the network function for all the rules that are registered in the rule table 24 are known in advance. However, when many rules are registered in the rule table 24, measuring the maximum throughputs for all rules registered in rule table 24 takes long time.
[0079] In view of this, in another embodiment, the throughput measurement device 40 measures maximum throughputs respectively for a specified number of rules that are extracted from among rules 1-N that are registered in rule table 24. The approximation formula generator 35 illustrated in
[0080] In a performance model for generating an approximation formula, a processing time used by a network function to process one received packet is represented by “a+bn” “b” represents a period of time used for searching the rule table 24 once. “n” represents the number of times that the rule table 24 is searched until a rule that matches a received packet is detected. Accordingly, “bn (product of n and b) ” represents a table searching time for one received packet. Note that in this example, a search process is sequentially performed from rule 1 toward the rule N until a rule that matches the received packet is detected. Accordingly, “n” used in the performance model corresponds to a rule number. “a” represents a period of time used for processes other than table searching. For example, “a” includes a period of time used for writing a received packet to the buffer memory 22, a period of time used for reading a packet from the buffer memory 22, etc.
[0081] When the above performance model is used, an approximation model representing maximum throughput T.sub.n for each rule is as below, where K represents a constant.
[0082] In this example, when processing time a and searching time b are expressed in for example “second”, constant K is 1. Also, when processing time a and searching time b are expressed in “μ second”, constant K is 1000000 (1 second=1000000 micro seconds).
[0083] In order to generate the approximation formula, processing time a and searching time b are to be determined. Processing time a and searching time b are determined based on the maximum throughputs for a specified number of rules extracted from among rules 1-N registered in the rule table 24. Specifically, the approximation formula generator 35 applies, to the approximation model, the maximum throughputs for respective extracted rules and the rule numbers so as to generate a plurality of equations. Then, the approximation formula generator 35 obtains real numbers a and b by applying a non-linear least-squares method to the plurality of generated equations.
[0084] Note that the number of rules that are extracted from among rules 1-N registered in rule table 24 is not limited particularly. However, the narrower the interval for extracting rules or the smaller the number of rules to be extracted is, the higher the accuracy of the approximation formula will be. In this example, the maximum throughput greatly changes with respect to a change in a rule number in a region with small rule numbers. Accordingly, in order to achieve high accuracy for the approximation formula while suppressing the number of rules that are to be extracted, it is preferable to narrow the extraction interval in a region with small rule numbers.
[0085] For example, in a region with rule numbers 1-20, rules 1, 10, 15, 16, 17, 18, 19, and 20 are extracted. In a region with rule numbers 20-100, rules are extracted at an interval of 10 rules. In a region with rule numbers 100-2000, rules are extracted at an interval of 100 rules. In a region with rule numbers 2000-5000, rules are extracted at an interval of 500 rules.
[0086] In the measurement system illustrated in
[0089] Maximum throughputs T.sub.1-T.sub.N calculated by using the approximation formula obtained as above are illustrated in
[0090]
[0091]
[0092]
[0093] In S21, the measurement system illustrated in
[0094] Note that the processes in S21-S24 correspond to S11 illustrated in
[0095] As described above, another embodiment eliminates the necessity of measuring maximum throughputs for all rules in advance. This reduces tasks that are to be carried out before estimating a workload of a network function particularly in a case where many rules are registered in the rule table 24.
[0096] All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present inventions have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.