Database Process Shutdown via Parallel Memory Cleanup

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large scale-up database systems face significant downtime during shutdown due to the slow process of freeing resources, which can take up to several days as existing systems rely on a single thread for cleanup, leading to increased process downtime and resource allocation issues.

Innovation Solution

Implementing a system that utilizes concurrent parallel processing across multiple threads to manage the shutdown process, allowing the database to free physical memory quickly and return control to the operating system, thereby reducing shutdown time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If a single thread is used for memory cleanup during shutdown, then the shutdown process is simple to implement, but the shutdown time becomes extremely long (up to several days)

Engineering Contradiction:
Improveshutdown process complexityVSAvoidshutdown time
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent divides the memory cleanup task into segments distributed across multiple threads. Each thread is assigned a portion of the memory to free, allowing parallel processing of the shutdown operation. This segmentation transforms the single-threaded sequential cleanup into a multi-threaded parallel operation, dramatically reducing shutdown time while maintaining implementation feasibility through systematic thread assignment and memory region division.

Inventive Principle:
Principle #1Segmentation

2Productivity

If multiple threads are used for concurrent memory freeing, then the shutdown speed increases significantly, but the system complexity increases

Engineering Contradiction:
Improveshutdown speedVSAvoidmulti-threaded system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the memory space into distinct regions and assigns each region to a specific thread for exclusive cleanup. This segmentation approach enables parallel processing while managing complexity through clear thread-to-memory-region mapping, preventing thread conflicts and optimizing shutdown speed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by tracking code locations and memory segments during the startup phase, storing this information in advance. During shutdown, this pre-collected data is immediately utilized to efficiently allocate memory regions to threads, eliminating the need for real-time analysis and reducing the overhead of multi-threaded coordination.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If all processing threads are woken up during shutdown, then the resource freeing is maximized and accelerated, but the overhead of thread management increases

Engineering Contradiction:
Improveresource freeing efficiencyVSAvoidthread management overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs preliminary tracking of code locations and memory segments during startup, storing this information in advance. During shutdown, this pre-collected data enables immediate and efficient thread allocation without requiring threads to perform extensive discovery or analysis, reducing management overhead while maximizing resource freeing efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent enables threads to perform self-service by providing each thread with pre-assigned memory regions and code location information. Threads can independently execute their cleanup tasks using the pre-provided data, reducing the need for centralized coordination and minimizing thread management overhead while maintaining high freeing efficiency.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12093732B2Fast shutdown of large scale-up processes
Publication Date: 2024.09.17 SAP SE
  • US12093732B2 patent drawing
  • US12093732B2 patent drawing
  • US12093732B2 patent drawing

AI summary

A system for shutting down a process of a database is provided. In some aspects, the system performs operations including tracking, during startup of a process, code locations of a process in the at least one memory. The operations may further include tracking, during runtime of the process and in response to the tracking the code locations, memory segments of the at least one memory allocated to the process. The operations may further include receiving an indication for a shutdown of a process. The operations may further include waking, in response to the indication, at least one processing thread of a plurality of processing threads allocated to a database system. The operations may further include allocating a list of memory mappings to the plurality of processing threads. The operations may further include freeing, by the first processing thread, the physical memory assigned to the processing thread by the memory mappings.