# US 10,120,719 B2 · Managing resource consumption in a computing system

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

- Number: US 10,120,719 B2
- Document ID: US10120719B2
- Status: Granted
- Kind: B2
- Application number: 14/660,207
- Filed: 2015-03-17
- Published: 2015-12-17
- Granted: 2018-11-06
- Earliest claimed: 2014-06-11
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: James L. Finnie; Torsten Steinbach; Michael Wurst
- Web page: https://patentgrep.com/patent/US10120719B2

## CPC

- G06F 9/5016: {the resource being the memory}
- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 9/5005: {to service a request}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments relate to managing resource consumption in a computing system. An aspect includes providing a resource policy by defining a plurality of threshold values relating to the resource consumption, wherein the resources are consumed by a plurality of user-defined functions performing tasks for a database management system, wherein the user-defined functions are executed by a plurality of processes external to the database management system. Another aspect includes performing an action, as defined by the resource policy, on at least one of the user-defined functions.

## Claims

### Claim 1

A method for managing resource consumption in a computing system, the method comprising:
predefining a resource policy by predefining a plurality of threshold values relating to the resource consumption, wherein the predefining includes predefining the plurality of threshold values and an action, wherein the resources are consumed by a plurality of user-defined functions performing tasks for a database management system, wherein the user-defined functions are fenced user-defined functions, wherein the user-defined function extends predefined functions of the database management system, wherein the user-defined functions are initiated by the database management system, wherein the resources comprises at least one of a number of database tables, a number of input operations per time unit, and a number of output operations per time unit, wherein the user-defined functions are executed by a plurality of processes external to the database management system; and
performing the action, as defined by the resource policy, on at least one of the user-defined functions, wherein the action is first performed on one of a newest one of the at least one of the user-defined functions and an oldest one of the at least one of the user-defined functions, wherein the action is a queuing of a request for starting of a user-defined function additional to already executing user-defined functions when a first predefined threshold of the resource policy is exceeded, and wherein the action is a rejection of a request for starting of a user-defined function additional to already executing user-defined functions when a second predefined threshold of the resource policy is exceeded, wherein the action is a forced cancellation of a user-defined function when a third threshold of the resource policy is exceeded, wherein the first threshold is less than the second threshold and the second threshold is less than the third threshold, wherein the resource comprises an amount of main memory, wherein a calculation of the amount of main memory is based on an aggregated amount of memory of all executing user-defined functions, wherein the user-defined functions are registered as external processes to core database management system functions in a repository.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the resource comprises at least one of: a cache size of the database management system, a number of processor cycles, and a number of relative processor cycles.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the resource consumption of the user-defined function is determined according to a schedule.

### Claim 4 (depends on 3)

The method according to claim 3, wherein time intervals of the schedule is dynamically adapted according to a change in the resource consumption measured over at least two time intervals of the schedule.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the resource consumption of the user-defined function is determined based on an existing component of an operating system of the computing system.

### Claim 6

A computer program product for managing resource consumption in a computing system, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
predefine a resource policy by predefining a plurality of threshold values relating to the resource consumption, wherein the predefining includes predefining the plurality of threshold values and an action, wherein the resources are consumed by a plurality of user-defined functions performing tasks for a database management system, wherein the user-defined functions are fenced user-defined functions, wherein the user-defined function extends predefined functions of the database management system, wherein the user-defined functions are initiated by the database management system, wherein the resources comprises at least one of a number of database tables, a number of input operations per time unit, and a number of output operations per time unit, wherein the user-defined functions are executed by a plurality of processes external to the database management system; and
perform the action, as defined by the resource policy, on at least one of the user-defined functions, wherein the action is first performed on one of a newest one of the at least one of the user-defined functions and an oldest one of the at least one of the user-defined functions, wherein the action is a queuing of a request for starting of a user-defined function additional to already executing user-defined functions when a first predefined threshold of the resource policy is exceeded, and wherein the action is a rejection of a request for starting of a user-defined function additional to already executing user-defined functions when a predefined second threshold of the resource policy is exceeded, wherein the action is a forced cancellation of a user-defined function when a third threshold of the resource policy is exceeded, wherein the first threshold is less than the second threshold and the second threshold is less than the third threshold, wherein the resource comprises an amount of main memory, wherein a calculation of the amount of main memory is based on an aggregated amount of memory of all executing user-defined functions, wherein the user-defined functions are registered as external processes to core database management system functions in a repository.

### Claim 7 (depends on 6)

The computer program product according to claim 6, wherein the resource comprises at least one of: a cache size of the database management system, a number of database tables, a number of processor cycles, and a number of relative processor cycles.

### Claim 8

A computer system for managing resource consumption in a computing system, the system comprising:
a memory; and
a processor, communicatively coupled to said memory, the computer system configured to perform a method comprising:
predefining a resource policy by predefining a plurality of threshold values relating to the resource consumption, wherein the predefining includes predefining the plurality of threshold values and an action, wherein the resources are consumed by a plurality of user-defined functions performing tasks for a database management system, wherein the user-defined functions are fenced user-defined functions, wherein the user-defined function extends predefined functions of the database management system, wherein the user-defined functions are initiated by the database management system, wherein the resources comprises at least one of a number of database tables, a number of input operations per time unit, and a number of output operations per time unit, wherein the user-defined functions are executed by a plurality of processes external to the database management system; and
performing the action, as defined by the resource policy, on at least one of the user-defined functions, wherein the action is first performed on one of a newest one of the at least one of the user-defined functions and an oldest one of the at least one of the user-defined functions, wherein the action is a queuing of a request for starting of a user-defined function additional to already executing user-defined functions when a first predefined threshold of the resource policy is exceeded, and wherein the action is a rejection of a request for starting of a user-defined function additional to already executing user-defined functions when a second predefined threshold of the resource policy is exceeded, wherein the action is a forced cancellation of a user-defined function when a third threshold of the resource policy is exceeded, wherein the first threshold is less than the second threshold and the second threshold is less than the third threshold, wherein the resource comprises an amount of main memory, wherein a calculation of the amount of main memory is based on an aggregated amount of memory of all executing user-defined functions, wherein the user-defined functions are registered as external processes to core database management system functions in a repository.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the action is based on one out of the group consisting of a start time of the user-defined function, and an assigned workload management priority.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the action is based on a size category a user-defined function is classified into.

### Claim 11 (depends on 6)

The computer program product according to claim 6, wherein the action is based on a size category a user-defined function is classified into.

### Claim 12 (depends on 8)

The system according to claim 8, wherein the action is based on a size category a user-defined function is classified into.
