IP Library Granted Patent US 10,198,292
Granted Patent B2
US 10,198,292 · App. 14/463,992 · Granted Feb 5, 2019

Scheduling database queries based on elapsed time of queries

Inventors: Ravindra Prakash (San Jose, CA); David Benedict Galimberti (Ann Arbor, MI); Richard Dennis Glick (Valley Center, CA)
Assignee: Actian Sub III, Inc.
G06F9/5027G06F2209/506
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 10,198,292
App. No.
14/463,992
Granted
Feb 5, 2019
Kind
B2
Abstract

A system, for example, an online system or a database system schedules requests received for execution. The system maintains consumer groups and receives a measure of amount of resources allocated for each consumer group. The system maintains a measure of accumulated elapsed time of execution of requests received from each consumer group. If the system determines that resources are available for executing a request, the system selects a request for execution from a consumer group based on the measure of accumulated elapsed time for processing queries for the consumer group and the measure of amount of resources allocated for the consumer group. The system maintains relative cumulative elapsed times of queries across consumer groups in the same ratio as the allocated share for the consumer groups. Accordingly, the system schedules requests such that each consumer group approaches its allocation of resources compared to other groups smoothly over time.

Claims (64)

1. A computer-implemented method for scheduling queries for execution in a database system, the method comprising:

maintaining a set of consumer groups, each consumer group corresponding to one or more users or applications;

receiving a measure of amount of resources allocated for each consumer group;

maintaining a measure of accumulated elapsed time of execution of database queries for each consumer group, the measure of accumulated elapsed time determined as an aggregate value based on the elapsed time of database queries for a consumer group;

receiving database queries to be processed, each of the database queries to be processed being classified into a corresponding consumer group;

determining a measure of current resource usage for each consumer group based on the measure of amount of resources allocated for the consumer group and the measure of accumulated elapsed time of execution of database queries for the consumer group; and

scheduling the database queries to be processed by the resources, comprising: for each consumer group:

determining a fractional number of database queries to be allocated to the consumer group based on the measure of current resource usage for the consumer group and the measure of amount of resources allocated to the consumer group,

selecting from the database queries a number of database queries corresponding to the consumer group for execution by the resources concurrently with database queries corresponding to other consumer groups based at least on the fractional number of queries determined for the consumer group, and

reserving execution time slots of the resources for processing the database queries classified into the consumer group according to the selected number of database queries corresponding to the consumer group.

2. The computer-implemented method of claim 1 , wherein selecting the number of database queries is based on a comparison of the measure of accumulated elapsed time for processing database queries for the consumer group and the measure of amount of resources allocated for the consumer group.

3. The computer-implemented method of claim 1 , wherein selecting the number of database queries is based on a ratio of the measure of accumulated elapsed time for processing database queries for the consumer group and the measure of amount of resources allocated for the consumer group.

4. The computer-implemented method of claim 1 , wherein selecting a database query for execution comprises:

reducing a rate at which queries from a particular consumer group are processed if the measure of accumulated elapsed time for processing queries exceeds the measure of amount of resources allocated for that particular consumer group.

5. The computer-implemented method of claim 1 , wherein selecting a database query for execution comprises:

increasing a rate at which queries from a particular consumer group are processed if the measure of accumulated elapsed time for processing queries is below the measure of amount of resources allocated for that particular consumer group.

6. The computer-implemented method of claim 1 , wherein selecting a database query for execution comprises:

maintaining a rate at which queries from a particular consumer group are processed if the measure of accumulated elapsed time for processing queries is within a threshold value of the measure of amount of resources allocated for a particular consumer group.

7. The computer-implemented method of claim 1 , further comprising:

determining a measure of difference between accumulated elapsed time for processing queries and the measure of amount of resources allocated for a particular consumer group; and

determining an amount by which a rate at which queries from that particular consumer group are processed is changed.

8. The computer-implemented method of claim 7 , wherein the amount by which the rate at which queries from that particular consumer group are processed is changed further depends on a configurable speedup factor.

9. The computer-implemented method of claim 8 , further comprising:

increasing a value of the speedup factor for achieving faster convergence of an actual amount of resources used by consumer groups towards a ratio of the amount of resources allocated to each consumer group.

10. The computer-implemented method of claim 8 , further comprising:

decreasing a value of the speedup factor for achieving slower convergence of an actual amount of resources used by consumer groups towards a ratio of the amount of resources allocated to each consumer group.

11. The computer-implemented method of claim 1 , further comprising:

classifying the database queries to be processed based on a consumer group classification into the corresponding consumer groups, the consumer group classification specifying a set of classification rules mapping query attributes to consumer groups.

12. The computer-implemented method of claim 11 , wherein the query attributes comprise:

a database user name, a client user name, an application name, a client IP address, an authentication type, or a database query type.

13. The computer-implemented method of claim 1 , further comprising:

classifying the database queries to be processed based on a service class specifying runtime attributes of resources used for executing each database query.

14. The computer-implemented method of claim 1 , wherein a source of database queries is one of a user or an application.

15. The computer-implemented method of claim 1 , further comprising:

maintaining indications of which consumer groups are actively using resources of the database system;

wherein an active consumer group is associated with a measure of share of resources for all active consumer groups; and

wherein selecting the database queries for execution is further based on the share of resources of the consumer group.

16. The computer-implemented method of claim 15 , further comprising:

marking the active consumer group inactive responsive to not receiving database queries from the active consumer group for more than a threshold time.

17. The computer-implemented method of claim 15 , further comprising:

marking an inactive consumer group as active responsive to receiving a database query for processing from the inactive consumer group.

18. The computer-implemented method of claim 1 , wherein the accumulated elapsed time is measured for queries processed within a moving time window.

19. A computer readable non-transitory storage medium storing instructions thereon, the instructions when executed by a processor cause the processor to:

maintain a set of consumer groups, each consumer group corresponding to one or more users or applications;

receive a measure of amount of resource allocated for each consumer group;

maintain a measure of accumulated elapsed time of execution of database queries for each consumer group, the measure of accumulated elapsed time determined as an aggregate value based on the elapsed time of database queries for a consumer group;

receive database queries to be processed, each of the database queries to be processed being classified into a corresponding consumer group;

determining a measure of current resource usage for each consumer group based on the measure of amount of resources allocated for the consumer group and the measure of accumulated elapsed time of execution of database queries for the consumer group; and

schedule the database queries to be processed by the resources, comprising: for each consumer group:

determining a fractional number of queries to be allocated to each consumer group based on the measures of current resource usage for the consumer groups and the measures of amount of resources allocated to the consumer groups,

selecting from the database queries a number of database queries corresponding to the consumer group for execution by the resources concurrently with database queries corresponding to other consumer groups based at least on the fractional number of queries determined for the consumer group, and

reserving execution time slots of the resources for processing the database queries classified into the consumer group according to the selected number of database queries corresponding to the consumer group.

20. A computer-implemented system for scheduling queries for execution in a database system, the computer-implemented system comprising:

a computer processor; and

a computer-readable storage medium storing instructions thereon, the instructions when executed by the computer processor cause the computer processor to:

maintain a set of consumer groups, each consumer group corresponding to one or more users or applications;

receive a measure of amount of resource allocated for each consumer group;

maintain a measure of accumulated elapsed time of execution of database queries for each consumer group, the measure of accumulated elapsed time determined as an aggregate value based on the elapsed time of database queries for a consumer group;

receive database queries to be processed, each of the database queries to be processed being classified into a corresponding consumer group;

determining a measure of current resource usage for each consumer group based on the measure of amount of resources allocated for the consumer group and the measure of accumulated elapsed time of execution of database queries for the consumer group; and

schedule the database queries to be processed by the resources, comprising: for each consumer group:

determining a fractional number of queries to be allocated to each consumer group based on the measures of current resource usage for the consumer groups and the measures of amount of resources allocated to the consumer groups,

selecting from the database queries a number of database queries corresponding to the consumer group for execution by the resources concurrently with database queries corresponding to other consumer groups based at least on the fractional number of queries determined for the consumer group, and

reserving execution time slots of the resources for processing the database queries classified into the consumer group according to the selected number of database queries corresponding to the consumer group.

Assignments (6)
RELEASE OF SECURITY INTEREST Recorded Jul 24, 2018
From: VIRTUS GROUP, LP
To: ACTIAN CORPORATION; PARACCEL LLC; PERVASIVE SOFTWARE INC.; VERSANT SOFTWARE LLC
Reel/Frame 046621/0033 →
MERGER AND CHANGE OF NAME Recorded Jul 20, 2018
From: PARACCEL, INC.; ACTIAN SUB III, INC.
To: ACTIAN SUB III, INC.
Reel/Frame 046418/0620 →
SECURITY INTEREST Recorded Jul 1, 2017
From: ACTIAN CORPORATION; PARACCEL LLC; PERVASIVE SOFTWARE INC.; VERSANT SOFTWARE LLC
To: VIRTUS GROUP, LP
Reel/Frame 042881/0075 →
RELEASE OF SECURITY INTEREST Recorded Jun 30, 2017
From: TC LENDING, LLC
To: ACTIAN CORPORATION; VERSANT CORPORATION (NKA VERSANT SOFTWARE LLC); PERVASIVE SOFTWARE INC.; PARACCEL LLC; ACTIAN INTERNATIONAL, INC.; VERSANT SOFTWARE LLC; POET HOLDINGS, INC.
Reel/Frame 042880/0155 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 29, 2017
From: PRAKASH, RAVINDRA; GALIMBERTI, DAVID BENEDICT; GLICK, RICHARD DENNIS
To: PARACCEL LLC
Reel/Frame 041784/0435 →
PLEDGE SUPPLEMENT Recorded Oct 30, 2014
From: PARACCEL LLC; ACTIAN CORPORATION
To: TC LENDING, LLC
Reel/Frame 034112/0859 →
Continuity (2)
Provisional Application 61909857 · Nov 27, 2013
Related Publication 20150149501A1 · May 28, 2015