Database Resource Policy for External UDF Process Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face challenges in monitoring and controlling resource consumption by user-defined functions (UDFs) executed in external processes, as existing methods either impose hard memory limits leading to out-of-memory errors or require cumbersome code instrumentation.

Innovation Solution

A resource policy is defined with threshold values for resource consumption, allowing for actions such as queuing, rejection, or forced cancellation of UDFs to manage resource usage dynamically without altering the UDF code, using operating system functions to monitor and control external processes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If a hard memory limit is imposed on external processes, then memory consumption is controlled, but out-of-memory errors occur and processes terminate

Engineering Contradiction:
Improvememory consumptionVSAvoidprocess continuity
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (resource policy with threshold values) between the database management system and external processes. This intermediary monitors resource consumption and triggers actions (queuing, rejection, cancellation) before hard limits are reached, preventing out-of-memory errors while maintaining process continuity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary actions by defining resource policies with threshold values in advance. When resource consumption approaches these thresholds, the system proactively takes actions (queuing new requests, rejecting them, or canceling running UDFs) to prevent exceeding memory limits, thereby avoiding process termination.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If memory limit is applied to each UDF process individually, then per-process control is achieved, but aggregated memory consumption cannot be controlled

Engineering Contradiction:
Improveper-process controlVSAvoidaggregated memory consumption
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The patent merges individual process control with aggregate control by implementing resource policies at the database management system level. The system monitors and controls the cumulative resource consumption of all external processes while maintaining the ability to apply policies to individual processes, thus achieving both per-process and aggregated memory control.

Inventive Principle:
Principle #5Merging (Combining)

3Measurement precision

If code instrumentation is used to intercept memory allocations, then resource monitoring is achieved, but programming complexity increases

Engineering Contradiction:
Improveresource monitoringVSAvoidprogramming complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

Instead of instrumenting the target program code, the patent introduces an intermediary resource control mechanism at the database management system level. This intermediary monitors resource consumption of external processes through system-level interfaces without requiring any modifications to the user-supplied code, thereby achieving precise resource monitoring while avoiding programming complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Adaptability or versatility

If multiple separate user-defined processes are spawned, then functional versatility is improved, but control over aggregated resource consumption is lost

Engineering Contradiction:
Improvefunctional versatilityVSAvoidaggregated resource consumption
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The resource policy mechanism serves multiple functions simultaneously: it monitors individual processes, controls aggregated resource consumption, and provides hierarchical control (from individual process to system-wide level). This universal mechanism handles both per-process and aggregate resource management without requiring separate control systems.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10120719B2Managing resource consumption in a computing system
Publication Date: 2018.11.06 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10120719B2 patent drawing
  • US10120719B2 patent drawing
  • US10120719B2 patent drawing

AI summary

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.