Patent ID: 8418240

Claim:
A computer implemented method of reducing central processing unit (CPU) usage of a firewall by safe reordering a current firewall's rule-base exhibiting N rules, each rule associated with a rule identifier affiliated with the order of applying the rule and a corresponding rule usage frequency, thereby creating an alternative order of the firewall's rules, the method comprising: receiving rule usage statistics exhibiting usage frequency of each rule on the current firewall's rule-base; calculating a rules matched per packet (RMPP) parameter, being a summation of products of each rule identifier and the corresponding usage frequency for all the N rules; and determining an alternative order of the rule base by sorting rules which perform the same action on the firewall based on usage statistics, wherein the sorting results in a reduction of the RMPP of the reordered rule base, thereby reducing the CPU usage of the firewall in implementing the alternative order of rules, wherein receiving rule usage statistics exhibiting usage frequency of each rule on the current firewall's rule-base is preceded by partitioning the current firewall's rule-base into blocks of rules wherein each block exhibits rules that result in an identical action of the firewall, wherein the sorting of the rules is performed within each block of rules independently, and wherein the sorting of the rules is performed utilizing a sorting algorithm that sorts neighboring and non-neighboring rules.