Pre-warming Processing Engines for Spark SQL Resource Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

As cluster size increases, Yet Another Resource Negotiator (Yarn) spends more time on resource allocation, leading to longer task execution times and decreased efficiency for Spark SQL engines.

Innovation Solution

A task processing method where resources are allocated to processing engines in advance when the server starts, allowing these engines to process tasks immediately upon receiving a request without waiting for resource allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If Yarn is used for resource allocation in Spark SQL engine, then resource management is achieved, but task execution time increases and efficiency decreases as cluster size grows

Engineering Contradiction:
Improvetask execution efficiencyVSAvoidresource allocation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-warming processing engines before actual task execution. When the system starts or receives the first task, it proactively initializes and prepares processing engines with necessary resources and configurations in advance. This preliminary preparation ensures that when tasks arrive, the engines are already ready to execute immediately without waiting for resource allocation, thus resolving the contradiction between resource management capability and execution efficiency.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If cluster size increases to handle more tasks, then processing capacity improves, but resource allocation time increases

Engineering Contradiction:
Improveprocessing capacityVSAvoidallocation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary warming of processing engines at system startup or upon receiving the first task. This advance preparation creates a pool of pre-initialized engines that are ready to handle tasks immediately. By doing the initialization work beforehand, the system can scale to handle more tasks without proportionally increasing allocation time, as the engines are already prepared and waiting for tasks.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The processing engines perform self-warming and self-initialization when the system starts or receives the first task. Rather than requiring external resource allocation for each task, the engines autonomously prepare themselves with necessary resources and configurations. This self-service approach reduces the overhead of resource allocation as cluster size grows, maintaining efficient task handling even with larger clusters.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20250138892A1Task processing method and apparatus, device, and medium
Publication Date: 2025.05.01 BEIJING VOLCANO ENGINE TECH CO LTD
  • US20250138892A1 patent drawing
  • US20250138892A1 patent drawing

AI summary

The present application discloses a task processing method. In the case that a server is started, during the process of starting, the server determines a processing engine which can be warmed up from processing engines included by the server, i.e., a processing engine to be warmed up. After the processing engine to be warmed up is determined, resources are allocated to the processing engine to be warmed up such that the processing engine to be warmed up, when receiving a task processing request, utilizes the allocated resources to process a task indicated by the task processing request. That is, before a processing engine receives a task processing request, desired resources are allocated to the processing engine in advance such that the processing engine, when receiving the task processing request, can execute a task in time without waiting for resource allocation so as to improve the task execution efficiency.