Patent ID: 8386411

Claim:
A computer implemented method for distributing patterns to scanning engines for scanning packets in a packet stream, the method comprising: providing a plurality of scanning engines; providing a plurality of patterns, each pattern having a respective definite memory consumption when compiled onto a scanning engine; calculating a respective distance metric for every pair of patterns, wherein the respective distance metric represents the difference in memory consumption of the two patterns of the pair when compiled between mutual compilation onto a single scanning engine and separate compilation onto two scanning engines; providing a plurality of distribution functions, the respective distribution function mapping the patterns to the scanning engines; calculating, for each of the distribution functions, a respective sum of the calculated distance metrics for distributing the patterns, the respective sum estimating the memory consumption for compiling the patterns to the scanning engines by accumulating the distance metrics of every pair of patterns being mapped to the same scanning engine for the respective distribution function; utilizing the sums for selecting a distribution function of the distribution functions for distributing the patterns to the scanning engines; extracting the distribution functions of the distribution functions that fulfil the constraints to provide a number of extracted distribution functions; and selecting the distribution function of the extracted distribution functions having the minimal calculated sum for distributing the patterns to the scanning engines; wherein the steps of the method are carried out using a computer device; and wherein a pattern is identified as an incompatible pattern in response to the pattern resulting in a respective memory consumption higher than a defined memory consumption threshold when compiled onto one scanning engine together with others of the patterns.