ML Microservice Tuning Module for Latency Cost Trade-offs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Machine learning applications in online concierge services face challenges in managing latency while optimizing resource utilization, which affects user experience and costs.

Innovation Solution

A tuning module is introduced to optimize the configuration of machine learning microservices by defining a search space of possible configurations, executing tests under various resource allocations, and selecting configurations that minimize latency and cost through an objective function weighted by historical data and baseline values.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If resource allocation for machine learning microservices is increased to reduce latency, then user experience is improved, but operational costs increase

Engineering Contradiction:
ImprovelatencyVSAvoidoperational cost
Core Design Contradiction:
Loss of timeVSLoss of energy

Solution Approach 1:

The system changes multiple parameters simultaneously including CPU allocation, memory allocation, container count, process count, thread count, and model compression level to find the optimal configuration that balances latency and cost. This multi-parameter optimization allows the system to achieve low latency without linearly increasing costs by finding efficient trade-off points across all resource dimensions.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The configuration tuning system dynamically adjusts resource allocations based on measured performance metrics. By continuously monitoring latency and cost under different configurations and using an objective function to guide adjustments, the system adapts resource allocation in real-time to maintain optimal balance between speed and expense.

Inventive Principle:
Principle #15Dynamics

2Productivity

If multiple configuration parameters are tuned simultaneously to optimize latency, then performance is improved, but system complexity increases

Engineering Contradiction:
ImproveperformanceVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the complex configuration optimization problem into independent tunable parameters (CPU, memory, containers, processes, threads, model compression). Each parameter can be adjusted and evaluated separately through controlled experiments, allowing the complex multi-dimensional optimization to be broken down into manageable components that can be systematically tested and optimized.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system implements feedback loops where configurations are tested, performance metrics are measured, and results are used to guide subsequent configuration adjustments. The objective function provides continuous feedback on how well each configuration meets the latency and cost targets, enabling systematic optimization despite the complexity of multiple interacting parameters.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20240176674A1Hypertuning a machine learning model microservices configuration to optimize latency
Publication Date: 2024.05.30 MAPLEBEAR INC
  • US20240176674A1 patent drawing
  • US20240176674A1 patent drawing
  • US20240176674A1 patent drawing

AI summary

An online system facilitates various functions using machine learning model microservices. A tuning mechanism tunes various configuration parameters for each microservice that control allocation of computing resources and other configurations of physical and/or virtual machines that implement the microservices. Tuning may be performed in part by executing tests under various configurations and evaluating an objective function associated with the different configurations. Furthermore, parameters of the objective function may be set based on a trained learning model that learns baseline parameters and weights of the objective function based on historical data.