Serverless Service Code Shared Memory Cold Start Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current serverless computing development modes face inefficiencies in cold start performance due to significant I/O delays caused by reading and writing service code from and to system disks, which hinder meeting user performance requirements.

Innovation Solution

Storing service code in shared memory and utilizing this memory for executing the service code, thereby reducing I/O delays and improving cold start efficiency, with optional decompression and runtime processes running in parallel to further enhance performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If service code is stored in third-party storage service and loaded from system disk during cold start, then service code can be persisted and managed externally, but I/O delay increases significantly and cold start efficiency decreases

Engineering Contradiction:
Improveservice code persistenceVSAvoidcold start time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent introduces a shared memory as an intermediary between the third-party storage service and the service container. The service code is first downloaded to the shared memory (which resides in the memory of the host node), and then loaded into the service container from the shared memory. This intermediary approach eliminates the need for repeated disk I/O operations while maintaining persistent storage capabilities, thereby significantly reducing cold start time without sacrificing service code persistence.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If service code is written to and read from system disk during cold start, then service code can be stored permanently, but I/O operations increase and start efficiency decreases

Engineering Contradiction:
Improveservice code storageVSAvoidcold start efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-loading the service code into the shared memory before the service container starts execution. The shared memory is prepared in advance on the host node, and the service code is downloaded and staged there during the container initialization phase. This preliminary preparation eliminates the need for time-consuming disk read operations during the actual service start, thereby improving cold start efficiency while maintaining reliable service code storage.

Inventive Principle:
Principle #10Preliminary action

3Speed

If service code is decompressed to system disk during cold start, then service code can be stored in uncompressed format for faster execution, but disk write I/O delay increases and start time extends

Engineering Contradiction:
Improvecode execution speedVSAvoiddecompression time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent uses shared memory as an intermediary storage layer between the compressed service code in third-party storage and the service container. The service code is downloaded and decompressed directly into the shared memory, which resides in the host node's memory space. This approach eliminates the intermediate step of writing to the system disk, thereby reducing I/O delays while still providing uncompressed code for fast execution by the service container.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250021408A1Service Start Method and Related Apparatus
Publication Date: 2025.01.16 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US20250021408A1 patent drawing
  • US20250021408A1 patent drawing
  • US20250021408A1 patent drawing

AI summary

A service start method is used in a serverless service and includes: obtaining service code submitted by a user, storing the service code in a shared memory, and starting a service container, where the service container runs the service code by using the shared memory. In the method, the service container runs the service code by using the shared memory. In addition, in the method, the obtained service code is stored in the shared memory.