IP Library Granted Patent US 11,341,164
Granted Patent B2
US 11,341,164 · App. 16/205,397 · Granted May 24, 2022

Adaptive resource allocation method and apparatus

Inventors: Zhiyong Jiang (Hangzhou, CN); Zhenkun Yang (Hangzhou, CN)
Assignee: Beijing OceanBase Technology Co., Ltd.
G06F16/283H04L67/32
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,341,164
App. No.
16/205,397
Granted
May 24, 2022
Kind
B2
Abstract

The present specification describes an adaptive resource allocation method and apparatus. One example method includes determining a request time, an execution time, and a response time corresponding to a service statement executed by the database system during a time period, wherein the request time is a time at which the service statement was executed by the database system, the execution time is an amount of time allocated for execution of the service statement by the database system, and the response time is an amount of time that elapsed between the request time and a time at which execution of the service statement ended; identifying a time segment of the time period based on the request time; determining a service type associated with the service statement; and updating a resource quota for the time segment based on the service type, the execution time, and the response time for the service statement.

Claims (40)

1. A computer-implemented method for managing a resource quota in a database system, comprising:

determining a request time, an execution time, and a response time corresponding to a service statement executed by the database system during a first time period, wherein the request time is a time at which the service statement is received, the execution time is an amount of time allocated for execution of the service statement by the database system, and the response time is an amount of time that elapsed between the request time and a time at which execution of the service statement ended;

identifying, based on the request time, a first time segment of a plurality of time segments within the first time period, wherein the service statement belongs to the first time segment;

determining that the service statement is associated with a first service type based on the execution time corresponding to the service statement in the first time segment;

adjusting a resource quota for the first service type based on a load status of the first service type, wherein adjusting the resource quota for the first service type comprises

determining a sum of execution times for one or more service statements of the first service type that were executed in the first time segment,

determining a sum of response times for the one or more service statements of the first service type that were executed in the first time segment, and

adjusting the resource quote for the first service type in a second time segment within a second time period based on the sum of execution times and the sum of response times; and

in response to determining that the sum of the response times is greater than the sum of the execution times, decreasing a resource quota associated with a second service type by a predetermined value for the second time segment within the second time period.

2. The computer-implemented method of claim 1 , wherein the first service type is a transaction service or an analytical service.

3. The computer-implemented method of claim 1 , wherein adjusting the resource quota for the first service type based on the sum of the execution times and on the sum of the response times comprises:

determining that the sum of the response times is greater than the sum of the execution times, wherein the first service type is one of a transactional service or an analytical service, and wherein the second service type is the other of the transactional service or the analytical service.

4. The computer-implemented method of claim 1 , wherein the first time period is one week and the first time segment is a particular day during the first time period.

5. A non-transitory computer-readable storage device coupled to one or more computers and configured with instructions that, when executed by the one or more computers, cause the one or more computers to perform operations that comprise:

determining a request time, an execution time, and a response time corresponding to a service statement executed by a database system during a first time period, wherein the request time is a time at which the service statement is received, the execution time is an amount of time allocated for execution of the service statement by the database system, and the response time is an amount of time that elapsed between the request time and a time at which execution of the service statement ended;

identifying, based on the request time, a first time segment of a plurality of time segments within the first time period, wherein the service statement belongs to the first time segment;

determining that the service statement is associated with a first service type based on the execution time corresponding to the service statement in the first time segment;

adjusting a resource quota for the first service type based on a load status of the first service type, wherein adjusting the resource quota for the first service type comprises

determining a sum of execution times for service statements of the service type that were executed in the first time segment,

determining a sum of response times for the service statements of the service type that were executed in the first time segment, and

adjusting the resource quota for the first service type in a second time segment within a second time period based on the sum of execution times and the sum of response times; and

in response to determining that the sum of the response times is greater than the sum of the execution times, decreasing a resource quota associated with a second service type by a predetermined value for the second time segment within the second time period.

6. The non-transitory computer-readable storage device of claim 5 , wherein the first service type is a transaction service or an analytical service.

7. The non-transitory computer-readable storage device of claim 5 , wherein adjusting the resource quota for the first service type based on the sum of the execution times and on the sum of the response times comprises:

determining that the sum of the response times is greater than the sum of the execution times, wherein the first service type is one of a transactional service or an analytical service, and wherein the second service type is the other of the transactional service or the analytical service.

8. The non-transitory computer-readable storage device of claim 5 , wherein the first time period is one week and the first time segment is a particular day during the first time period.

9. A system, comprising:

one or more computers; and

one or more computer-readable memory devices coupled to the one or more computers and configured with instructions that, when executed by the one or more computers, cause the one or more computers to perform operations that comprise:

determining a request time, an execution time, and a response time corresponding to a service statement executed by a database system during a first time period, wherein the request time is a time at which the service statement is received, the execution time is an amount of time allocated for execution of the service statement by the database system, and the response time is an amount of time that elapsed between the request time and a time at which execution of the service statement ended;

identifying, based on the request time, a first time segment of a plurality of time segments within the first time period, wherein the service statement belongs to the first time segment;

determining that the service statement is associated with a first service type based on the execution time corresponding to the service statement in the first time segment;

adjusting a resource quota for the first service type based on a load status of the first service type, wherein adjusting the resource quota for the first service type comprises

determining a sum of execution times for service statements of the service type that were executed in the first time segment,

determining a sum of response times for the service statements of the service type that were executed in the first time segment, and

adjusting the resource quota for the first service type in a second time segment of a second time period based on the sum of execution times and the sum of response times; and

in response to determining that the sum of the response times is greater than the sum of the execution times, decreasing a resource quota associated with a second service type by a predetermined value for the second time segment within the second time period.

10. The system of claim 9 , wherein the first service type is a transaction service or an analytical service.

11. The system of claim 9 , wherein calculating adjusting the resource quota for the first service type based on the sum of the execution times and on the sum of the response times comprises:

determining that the sum of the response times is greater than the sum of the execution times, wherein the first service type is one of a transactional service or an analytical service, and wherein the second service type is the other of the transactional service or the analytical service.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 27, 2021
From: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
To: BEIJING OCEANBASE TECHNOLOGY CO., LTD.
Reel/Frame 057349/0070 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 11, 2021
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 055237/0137 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053754/0625 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053743/0464 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 10, 2019
From: JIANG, ZHIYONG; YANG, ZHENKUN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 049141/0586 →