The present disclosure relates to a massively parallel processing (MPP) database management system and, in particular embodiments, to a management system able to detach the number of database partitions from the number of fixed processors.
The concept of massively parallel processing (MPP) is the coordinated processing of a program by multiple processors, with each processor working on different parts of the program. The processors communicate with one another to complete a task with each of them using its own operating system and memory resources.
An MPP database system is based on shared-nothing architecture, with the tables of its databases partitioned into segments and distributed to different processing nodes. There is no data sharing among the processing nodes. When database queries arrive, the work of each query is divided and assigned to one of the processing nodes according to a data distribution plan and an optimized execution plan. The processing entities in each processing node manage only their portion of the data. However, these processing entities may communicate with one another to exchange necessary information during their work execution. A query may be divided into multiple sub-queries, and the sub-queries may be executed in parallel or in some optimal order in some or all the processing nodes. The results of the sub-queries may be aggregated and further processed, and subsequently more sub-queries may the executed according to the results.
One of the challenges in an MPP database system has always been in setting up the distributed system, which includes configuring the machines, creating the database, partitioning the tables, and distributing the segments. How data is distributed and how much the distribution is aligned with the business logic greatly determines the overall performance of the system.
A traditional MPP database system allows a database administrator to create a database and distribute its data (i.e., create database partitions) to a fixed number of processors that are setup ahead of time. Unfortunately, the number of partitions a database administrator can create is fixed and directly corresponds to the number of processors available in the traditional MPP database system. In other words, the number of partitions and the number of processors is always the same. If additional partitions are desired, the entire process of setting up instances and partitions must be repeated.
An embodiment method for massively parallel processing includes initiating a management instance on an initial machine, the management instance generating an initial partition corresponding to the initial machine, determining a total number of partitions desired for processing a database, the total number of partitions including the initial partition, determining a number of additional machines available to process the database, grouping the initial machine and the additional machines together in a pod, and launching the management instance on the additional machines in the pod to generate the total number of partitions desired for the database.
An embodiment method for massively parallel processing including initiating a management instance on an initial machine, the management instance generating an initial partition corresponding to the initial machine, determining a total number of partitions desired for processing a database, the total number of partitions including the initial partition, determining a number of additional machines available to process the database, a sum total of the additional machines and the initial machine less than the total number of partitions desired, grouping the initial machine and the additional machines together in a pod, and launching the management instance on the additional machines in the pod to generate the total number of partitions desired for the database.
An embodiment massively parallel processing system including an initial machine in a pod, the initial machine running a management instance corresponding to an initial partition for processing a database, and an additional machine in the pod, the additional machine running two of the management instances for processing the database, each of the management instances corresponding to an additional partition.
For a more complete understanding of the present disclosure, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawing, in which:
a illustrates an embodiment MPP database system during an initial setup and formation of a pod;
b shows the embodiment MPP database system of
a illustrates an embodiment MPP database system when a number of database partitions is greater than the a number of available machines in the pod;
b illustrates the embodiment MPP database system of
Corresponding numerals and symbols in the different figures generally refer to corresponding parts unless otherwise indicated. The figures are drawn to clearly illustrate the relevant aspects of the embodiments and are not necessarily drawn to scale.
The making and using of the presently preferred embodiments are discussed in detail below. It should be appreciated, however, that the present disclosure provides many applicable inventive concepts that can be embodied in a wide variety of specific contexts. The specific embodiments discussed are merely illustrative and do not limit the scope of the disclosure.
The present disclosure will be described with respect to preferred embodiments in a specific context, namely a massively parallel processing (MPP) database and management thereof. The concepts in the disclosure may also apply, however, to other types of databases and data management systems.
Referring now to
Still referring to
Referring now to
Still referring to
Referring now to
Each of the database management instances 330, 332, 334 and the empty partitions 340, 342, 344 in
Referring now to
In an embodiment, the database management instances disclosed herein are running or executing on a processor associated the machine. As shown, the database management instance 430a generates an initial partition 450 corresponding to the initial machine 410a. Notably, the initial partition 450 is empty of any data or information.
After the database management instance 430a and the initial partition 450 have been created, a total number of partitions desired for processing a database is determined. The total number of partitions includes the initial partition 450. Such determination may be based, at least in part, upon the query or instructions received from the client 400.
Once the total number of partitions has been determined, a number of additional machines 410b, 410c available to process the database is determined. As used herein, the term machine may refer to and/or incorporate a variety of resources including, for example, a processor, memory, storage node, or other infrastructure. Indeed, the term machine is not meant to be limiting. Also, while two of the additional machines 410b, 410c are illustrated in
After the number of additional machines (i.e., resources) has been determined, the initial machine 410a and the additional machines 410b, 410c are grouped together in the pod 401. Notably, the machine 410d associated with the pod administrator 400 is not considered to be an available resource for processing the database and, as such, not included within the pod 401.
Referring collectively to
Referring now to
To handle the request from the client for more or fewer partitions than available resources, the management instance 530a is initiated on the initial machine 510a as shown in
Next, a number of additional machines 510b, 510c available to process the database is determined. As shown in
Referring collectively to
Referring now to
Referring now to
Next, in block 740, the pod manager allocates a storage volume or space. The pod manager also creates and starts one database management instance on one of the nodes (i.e., machines) in the pod. The pod manager further attaches the storage volume to the instance. In block 750, the database management instance (e.g., the database management instance 430 in
Referring now to
In block 830, the database management instance receives commands such as create schema, create table, or create database partition commands. In block 840, a determination of which command is received is made by the database management instance. If the create schema command 842 was received, then in block 850 the database management instance creates schema management information under the associated database structure and saves the schema metadata into a catalog in the storage (e.g., the partition 450). If the create table command 844 was received, then in block 860 the database management instance creates a table structure under the associated database and schema and saves the table metadata into a catalog in the storage (e.g., the partition 450).
If the create database (DB) partition command 846 was received in block 840, then in block 870 the database management instance notes the number of partitions (N) that the user decided upon, selects a data distribution algorithm, creates a database partition structure and metadata, partitions tables accordingly to fit into the database partitions, and saves the database partitioning metadata into a catalog in the storage. In block 870, the database management instance also calls the pod manager (e.g., pod manager 440a in
Referring now to
In block 920, the pod manager creates the database management instances. In doing so, the pod manager keeps the original database management instance (e.g., management instance 430a in
In block 930, the pod manager saves the mapping information. In doing so, the pod manager saves the partition-to-processing-node map in the catalog of each storage volume/space. The pod manager also saves the active-to-passive-processing-node map into the catalog. In an embodiment, the information is entered into the catalog through one of the database management instances and the instances synchronize all the catalogs. Thereafter, in block 940, the process ends.
Referring now to
In block 1030, the pod manager relocates database partitions among processing nodes. If adding nodes, then for each node, the pod manager creates, configures, and launches an active database management instance. The pod manager also moves identified database partitions to their newly designated node by un-mounting a storage space from its current processing node to the new processing node (e.g., 556 from 510c to 510e in
In block 1040, the pod manager saves the mapping information. In doing so, the pod manager saves the updated partition-to-processing-node map on each of the database management instance catalogs. The database manager also saves the active-to-passive-processing-node map into the catalog. In an embodiment, the information is entered into a catalog of one of the database management instances and the instances synchronize their catalog. Thereafter, in block 1050, the process ends.
Referring now to
Referring now to
The current disclosure changes the emphasis of an MPP database to the data itself rather than focusing on the database management instances. In the current disclosure, an MPP database system is first assigned a pool of resources—machines/processors, storage, and possibly also memory that the MPP database system is allowed to access/use. These resources, the processors, storage, and their communication channels do not have to form a pod/cluster (collaborative group) initially. As a database is created and its partitioning policy is defined, the required computing resources are then grabbed from the allocated pool on-demand and managed as a cluster, the necessary number of database management instances is then launched, and the database partitions (each of the data store) are then physically created on the instances. In the present disclosure, the number of database partitions created does not have to directly correspond to or match the actual number of machines (processors). For example, if there are only 5 machines (processors) available, a database administrator can still create 10 database partitions by permitting two partitions to be served by one machine (one processor). When more machines become available, the partitions can be relocated to the available processor at a later time.
While the disclosure provides illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications and combinations of the illustrative embodiments, as well as other embodiments, will be apparent to persons skilled in the art upon reference to the description. It is therefore intended that the appended claims encompass any such modifications or embodiments.
Number | Name | Date | Kind |
---|---|---|---|
5675791 | Bhide et al. | Oct 1997 | A |
6421665 | Brye et al. | Jul 2002 | B1 |
7149736 | Chkodrov et al. | Dec 2006 | B2 |
7941424 | Xu et al. | May 2011 | B2 |
8799284 | Jagtiani et al. | Aug 2014 | B2 |
20060101224 | Shah et al. | May 2006 | A1 |
20060218123 | Chowdhuri et al. | Sep 2006 | A1 |
20070255835 | Coppinger et al. | Nov 2007 | A1 |
20070271211 | Butcher et al. | Nov 2007 | A1 |
20110041006 | Fowler | Feb 2011 | A1 |
20120109888 | Zhang et al. | May 2012 | A1 |
20120117065 | Nehme et al. | May 2012 | A1 |
20120191699 | George et al. | Jul 2012 | A1 |
20130166606 | Fricke et al. | Jun 2013 | A1 |
20140101129 | Branish et al. | Apr 2014 | A1 |
20140108459 | Gaza et al. | Apr 2014 | A1 |
20140188841 | Sun et al. | Jul 2014 | A1 |
Number | Date | Country |
---|---|---|
1399209 | Feb 2003 | CN |
101916261 | Dec 2010 | CN |
Entry |
---|
International Search Report received in PCT/CN2013/085297, mailed Jan. 23, 2014, 11 pages. |
Supplementary European Search Report, EP Application No. 13847772.4, Applicant: Huawei Technologies Co., Ltd., dated Nov. 4, 2015, 9 pgs. |
Number | Date | Country | |
---|---|---|---|
20140108633 A1 | Apr 2014 | US |