# US 11,120,026 B1 · System and method for executing queries on multi-graphics processing unit systems

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,120,026 B1
- Document ID: US11120026B1
- Status: Granted
- Kind: B1
- Application number: 16/786,911
- Filed: 2020-02-10
- Granted: 2021-09-14
- Earliest claimed: 2016-01-18
- Assignees: Omnisci, Inc.
- Applicants: OmniSci, Inc.
- Inventors: Todd L. Mostak
- Web page: https://patentgrep.com/patent/US11120026B1

## CPC

- G06F 16/24569: {Query processing with adaptation to specific hardware, e.g. adapted for using GPUs or SSDs}
- G06F 3/14: Digital output to display device {; Cooperation and interconnection of the display device with other functional units}
- G06F 16/248: Presentation of query results
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G09G 5/363: {Graphics controllers}
- G09G 2360/06: Use of more than one graphics processor to process data before displaying to one or more screens
- G09G 2360/08: Power processing, i.e. workload management for processors involved in display operations, such as CPUs or GPUs
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G09G: ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION (arrangements for transferring data between digital computers and displays G06F3/14; static indicating arrangements comprising an association of a number of separate sources or light control cells G09F9/00; static indicating arrangements comprising integral associations of a number of light sources H01J, H01K, H10H, H05B33/12; scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission, details thereof H04N1/00)

## Abstract

A system and method allocates partitions to be used to perform a query to multiple GPUs and each partition is also allocated to a CPU to which the GPU is attached. The GPUs use any assigned data in GPU memory, and otherwise request it from a CPU, which provides it from CPU memory if possible, and otherwise copies it from long term storage, CPU memory and makes it available to GPU memory. The GPUs process the query against the partitions assigned, optionally by performing portions of the query at a time, for example performing an innermost nested query and then performing the next outermost nested query. The results from any given portion of a query may be accumulated across all GPUs and some or all of the results distributed to each of the GPUs. The remaining work may be balanced by redistributing only some of the accumulated results.

## Claims

### Claim 1

A method of performing a database query on a computer system comprising a plurality of graphics processing units, the method comprising:
receiving a request comprising the database query and an express or implied specification of a data source;
parsing the request to identify at least one component of the database query;
computing an allocation of a plurality of portions of the data source across each of the plurality of graphics processing units;
at each of the plurality of graphics processing units, applying each of the at least one component of the database query parsed to the portion of the data source allocated to the respective graphics processing unit to produce at least one set of results;
consolidating at least one of the at least one set of results of each of the plurality of graphics processing units by at least one central processing unit or graphics processing unit of the computer system comprising the plurality of graphics processing units to produce a consolidated set of results; and
outputting the consolidated set of results.

### Claim 2 (depends on 1)

The method of claim 1:
additionally comprising identifying columns of the data source;
and wherein the computing the allocation of the plurality of the portions of the data source is responsive to the columns identified.

### Claim 3 (depends on 1)

The method of claim 1, additionally comprising:
storing the consolidated set of results, and metadata identifying a criteria used to obtain the consolidated set of results;
receiving an additional request comprising an additional query and an additional specification of the data source; and
comparing the additional query and the additional specification of the data source to the metadata to determine whether the consolidated set of results can be reused for the additional request.

### Claim 4 (depends on 3)

The method of claim 3, additionally comprising partitioning the consolidated set of results responsive to the determining.

### Claim 5 (depends on 1)

The method of claim 1, additionally comprising:
identifying a topology of the computer system by identifying a number of one or more central processing units in the computer system and the graphics processing units electrically coupled to each of the one or more central processing units; and
allocating each of the plurality of portions of the data source to a central processing unit electrically coupled to the graphics processing unit in the plurality to which said portion of the data source in the plurality was, or will be, assigned.

### Claim 6 (depends on 1)

The method of claim 1 wherein each of the plurality of portions of the data source comprises a partition of the data source used for long term storage of the data source.

### Claim 7 (depends on 1)

The method of claim 1 wherein each of the plurality of portions of the data source comprises a plurality of rows of the data source that generate a same hash result.

### Claim 8 (depends on 1)

The method of claim 1 wherein each of the plurality of portions of the data source are apportioned from the data source as specified in the request.

### Claim 9

A system for performing a database query on a computer system comprising a plurality of graphics processing units, the system comprising:
a query receiver having an input coupled for receiving a request comprising the database query and an express or implied specification of a data source, the query receiver for parsing the request to identify at least one component of the database query and for providing at an output the specification of the data source and for providing at the query receiver output the at least one component of the database query;
a partition allocation manager having an input coupled to the query receiver output for receiving the specification of the data source, and for receiving a number of the graphics processing units in the plurality, the partition allocation manager for computing an allocation of a plurality of portions of the data source across each of the plurality of graphics processing units, and for providing at an output the allocation;
a query manager at each of the graphics processing units, having an input coupled to the partition allocation manager output for receiving at least a portion of the allocation, to the query receiver output for receiving the at least one component of the database query, and coupled for receiving a subset of the plurality of portions of the data source allocated in the allocation to said graphics processing unit, the query manager for applying each of the at least one component of the database query to the subset of the plurality of portions of the data source to produce and provide at an output at least one set of results;
a join manager having an input coupled to the query receiver output for receiving at least one of the at least one component of the database query and to the query manager output of at least two of the plurality of graphics processing units for receiving the at least one set of results from each such query manager, the join manager for consolidating at least one of the at least one set of results of each of the at least two of the plurality of graphics processing units to produce a consolidated set of results, and for providing at an output the consolidated set of results.

### Claim 10 (depends on 9)

The system of claim 9:
additionally comprising a column identification manager coupled to the query receiver output for receiving the at least one component of the database query, the column identification manager for identifying and providing at an output identifiers of columns of the data source used for filtering, joining or aggregating, responsive to the at least one component of the database query received at the column identification manager input;
and wherein the partition allocation manager input is additionally coupled to the column identification manager output for receiving the identifiers of columns of the data source used for filtering, joining or aggregating, and the partition allocation manager computes the allocation of the plurality of the portions of the data source responsive to the identifiers of the columns of the data source used for filtering, joining or aggregating.

### Claim 11 (depends on 9)

The system of claim 9:
wherein the join manager additionally provides at the join manager output metadata identifying a criteria used to obtain the consolidated set of results; and
additionally comprising a cached result set manager having an input coupled to the join manager output for receiving the consolidated set of results, the metadata identifying the criteria used to obtain the consolidated set of results, and an additional request comprising an additional query and an additional specification of the data source, the cached result set manager for comparing the additional query and the additional specification of the data source to the metadata to determine whether the consolidated set of results can be reused to process the additional request, and for providing at an output an indication of the consolidated set of results, responsive to a determination that the consolidated set of results can be used to process the additional request.

### Claim 12 (depends on 11)

The system of claim 11, additionally comprising a partition identifier having an input coupled to the cached result set manager output for receiving the indication of the consolidated set of results, the partition identifier for partitioning via an input/output the consolidated set of results responsive to the indication received at the partition identifier input.

### Claim 13 (depends on 9)

The system of claim 9: wherein:
additionally comprising a topology identification manager for identifying via an input/output and providing at an output a number of one or more central processing units in the computer system and identifiers of graphics processing units electrically coupled to each of the one or more central processing units; and
wherein the partition allocation manager input is additionally for receiving the number of one or more central processing units in the computer system and identifiers of graphics processing units electrically coupled to each of the one or more central processing units, and the partition allocation manager is additionally for allocating via the partition allocation manager output each of the plurality of portions of the data source to a central processing unit electrically coupled to the one or more graphics processing units in the plurality to which said portion of the data source in the plurality was, or will be, assigned.

### Claim 14 (depends on 9)

The system of claim 9 wherein each of the plurality of portions of the data source comprises a partition of the data source used for long term storage of the data source.

### Claim 15 (depends on 9)

The system of claim 9 wherein each of the plurality of portions of the data source comprises a plurality of rows of the data source that generate a same hash result.

### Claim 16 (depends on 9)

The system of claim 9:
wherein:
the query receiver input is additionally for receiving a partition specification that specifies a manner in which the data source should be partitioned; and
the query receiver is additionally for providing the partition specification at the query receiver output;
additionally comprising a partition manager having an input coupled to the query receiver output for receiving the partition specification and the specification of the data source, the partition manager for apportioning the plurality of portions of the data source responsive to the partition specification via an input/output; and
wherein each query manager input is coupled to the partition manager input/output for receiving the subset of the plurality of the portions of the data source allocated in the allocation.

### Claim 17

A computer program product comprising a non-transitory computer useable medium having computer readable program code embodied therein for performing a database query on a computer system comprising a plurality of graphics processing units, the computer program product comprising computer readable program code devices configured to cause a computer system to:
receive a request comprising the database query and an express or implied specification of a data source;
parse the request to identify at least one component of the database query;
compute an allocation of a plurality of portions of the data source across each of the plurality of graphics processing units;
at each of the plurality of graphics processing units, apply each of the at least one component of the database query parsed to the portion of the data source allocated to the respective graphics processing unit to produce at least one set of results;
consolidate at least one of the at least one set of results of each of the plurality of graphics processing units by at least one central processing unit or graphics processing unit of the computer system comprising the plurality of graphics processing units to produce a consolidated set of results; and
output the consolidated set of results.

### Claim 18 (depends on 17)

The computer program product of claim 17:
additionally comprising computer readable program code devices configured to cause the computer system to identify columns of the data source;
and wherein the allocation of the plurality of the portions of the data source is computed responsive to the columns identified.

### Claim 19 (depends on 17)

The computer program product of claim 17,
additionally comprising computer readable program code devices configured to cause the computer system to:
store the consolidated set of results, and metadata identifying a criteria used to obtain the consolidated set of results;
receive an additional request comprising an additional query and an additional specification of the data source; and
compare the additional query and the additional specification of the data source to the metadata to determine whether the consolidated set of results can be reused for the additional request.

### Claim 20 (depends on 19)

The computer program product of claim 19, additionally comprising computer readable program code devices configured to cause the computer system to partition the consolidated set of results responsive to the determining.

### Claim 21 (depends on 17)

The computer program product of claim 17, additionally comprising:
computer readable program code devices configured to cause the computer system to identify a number of one or more central processing units in the computer system and the graphics processing units electrically coupled to each of the one or more central processing units; and
computer readable program code devices configured to cause the computer system to allocate each of the plurality of portions of the data source to a central processing unit electrically coupled to the graphics processing unit in the plurality to which said portion of the data source in the plurality was, or will be, assigned.

### Claim 22 (depends on 17)

The computer program product of claim 17 wherein each of the plurality of portions of the data source comprises a partition of the data source used for long term storage of the data source.

### Claim 23 (depends on 17)

The computer program product of claim 17 wherein each of the plurality of portions of the data source comprises a plurality of rows of the data source that generate a same hash result.

### Claim 24 (depends on 17)

The computer program product of claim 17 wherein each of the plurality of portions of the data source are apportioned from the data source as specified in the request.
