# US 2013/0254350 A1 · Method and apparatus for adaptive in-operator load shedding

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0254350 A1
- Document ID: US20130254350A1
- Status: Published application
- Kind: A1
- Application number: 13/896,709
- Filed: 2013-05-17
- Published: 2013-09-26
- Earliest claimed: 2006-06-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Bugra Gedik; Kun-Lung Wu; Philip S. Yu
- Web page: https://patentgrep.com/patent/US20130254350A1

## CPC

- H04L 47/225: {Determination of shaping rate, e.g. using a moving window}
- H04L 47/41: by acting on aggregated flows or links
- H04L 49/90: Buffering arrangements
- H04L 49/901: using storage descriptor, e.g. read or write pointers
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- Y02B 70/3225: Demand response systems, e.g. load shedding, peak shaving
- Y02D 30/50: in wire-line communication networks, e.g. low power modes or reduced link rate
- Y04S 20/222: Demand response systems, e.g. load shedding, peak shaving
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- Y02B: CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y04S: SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS

## Abstract

One embodiment of the present method and apparatus adaptive in-operator load shedding includes receiving at least two data streams (each comprising a plurality of tuples, or data items) into respective sliding windows of memory. A throttling fraction is then calculated based on input rates associated with the data streams and on currently available processing resources. Tuples are then selected for processing from the data streams in accordance with the throttling fraction, where the selected tuples represent a subset of all tuples contained within the sliding window.

## Claims

### Claim 1

A method for processing data streams, the method comprising:
receiving at least two data streams into respective sliding windows of memory;
calculating a cost of executing processing logic for processing the at least two data streams, wherein the cost indicates an amount of processing resources that is consumed by the executing;
calculating a throttling fraction, wherein the throttling fraction specifies an amount by which to reduce the cost of executing the processing logic; and
selecting tuples from said at least two data streams for processing, where said selected tuples represent a subset of all tuples contained within said sliding windows, and where said selecting applies said throttling fraction to all of said respective sliding windows of memory such that a cost of processing said subset of all tuples is less than or equal to a cost of processing all tuples multiplied by the throttling fraction,
wherein at least one of: the calculating the cost, the calculating the throttling fraction, or the selecting is performed by a processor.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
performing a data stream join operation on said selected tuples.

### Claim 3 (depends on 1)

The method of claim 1, wherein said throttling fraction is re-calculated on a periodic basis.

### Claim 4 (depends on 1)

The method of claim 1, wherein said calculating the throttling fraction comprises:
computing a tuple consumption rate representing a sum of rates at which tuples from said at least two data streams are consumed by said processing;
computing an input rate representing a sum of rates at which said at least two data streams are received for said processing; and
dividing said tuple consumption rate by said input rate to produce a performance metric.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
setting said throttling fraction equal to a product of the performance metric and a currently used throttling fraction, if said performance metric is less than one; and
setting said throttling fraction equal to a smaller value of: one and a product of said currently used throttling fraction and a boost factor, if said performance metric is not less than one.

### Claim 6 (depends on 1)

The method of claim 1, wherein said selecting comprises:
determining a window harvesting fraction for each of said sliding windows, in accordance with said throttling fraction.

### Claim 7 (depends on 6)

The method of claim 6, wherein said determining comprises:
identifying, for each of said sliding windows, a fraction of said tuples that, if processed, will maximize an output of said processing while rendering a cost of said processing less than or equal to said throttling fraction multiplied by a cost of processing all of said tuples.

### Claim 8 (depends on 7)

The method of claim 7, wherein said identifying comprises:
dividing each of said sliding windows into one or more sub-windows; and
ranking said one or more sub-windows according to how useful each of said one or more sub-windows is in producing said output.

### Claim 9 (depends on 8)

The method of claim 8, wherein said ranking comprises:
performing a join operation on a sample of tuples from each of said one or more sub-windows; and
maintaining one or more histograms representative of an output of said join operation.

### Claim 10 (depends on 6)

The method of claim 6, wherein said determining comprises:
setting said window harvesting fraction for each of said sliding windows to zero;
generating one or more candidate sets, each of said one or more candidate sets comprising a potential window harvesting fraction for each of said sliding windows;
selecting from said one or more candidate sets a candidate set having a highest evaluation metric.

### Claim 11 (depends on 10)

The method of claim 10, wherein said selecting comprises:
removing from among said one or more candidate sets any candidate set that fails to satisfy one or more processing constraints.

### Claim 12 (depends on 10)

The method of claim 10, wherein said generating comprises
selecting an existing candidate set, said existing candidate set specifying a number of logical sub-windows to be used for said processing; and
producing a new candidate set in which said number of logical sub-windows to be used for said processing is increased by one.

### Claim 13 (depends on 10)

The method of claim 10, wherein said evaluation metric is a measure of a candidate set from among said one or more candidate sets that will result in a highest join output.

### Claim 14 (depends on 10)

The method of claim 10, wherein said evaluation metric is a measure of a candidate set from among said one or more candidate sets that will result in a highest join output to join cost ratio.

### Claim 15 (depends on 10)

The method of claim 10, wherein said evaluation metric is a measure of a candidate set from among said one or more candidate sets that will result in a highest additional output to additional cost ratio.

### Claim 16 (depends on 10)

The method of claim 10, wherein said selecting further comprises:
learning time correlations among said two or more input data streams.

### Claim 17 (depends on 1)

The method of claim 1, wherein the throttling fraction is based on input rates associated with said at least two data streams.

### Claim 18 (depends on 17)

The method of claim 17, wherein the throttling fraction is further based on currently available processing resources.

### Claim 19

A computer readable storage device containing an executable program for processing data streams, where the program performs the steps of:
receiving at least two data streams into respective sliding windows of memory;
calculating a cost of executing processing logic for processing the at least two data streams, wherein the cost indicates an amount of processing resources that is consumed by the executing;
calculating a throttling fraction based on input rates associated with said at least two data streams and on currently available processing resources, wherein the throttling fraction specifies an amount by which to reduce the cost of executing the processing logic; and
selecting tuples from said at least two data streams for processing, where said selected tuples represent a subset of all tuples contained within said sliding windows, and where said selecting applies said throttling fraction to all of said respective sliding windows of memory such that a cost of processing said subset of all tuples is less than or equal to a cost of processing all tuples multiplied by the throttling fraction.

### Claim 20

A data stream processing unit comprising:
a memory for receiving at least two data streams into respective sliding windows of memory;
a storage device containing program logic for calculating a cost of executing processing logic for processing the at least two data streams, wherein the cost indicates an amount of processing resources that is consumed by the executing and for calculating a throttling fraction based on input rates associated with said at least two data streams and on currently available processing resources, wherein the throttling fraction specifies an amount by which to reduce the cost of executing the processing logic; and
a processor for selecting tuples from said at least two data streams for processing, where said selected tuples represent a subset of all tuples contained within said sliding windows, and where said selecting applies said throttling fraction to all of said respective sliding windows of memory such that a cost of processing said subset of all tuples is less than or equal to a cost of processing all tuples multiplied by the throttling fraction.
