Parallel databases require that all database operations be performed in parallel as much as possible to improve the overall performance of the database system. Based on the relationship between processor, memory, and storage of the computer, parallel databases can be classified into three basic architectures (these are also the three basic architectures of Parallel Computing): shared-memory and shared-disk) and shared-nothing ).
1. shared-memory structure
This structure includes multiple processors, one shared memory (primary memory), and multiple disk storage. Each processor connects to the shared memory through the high-speed communication network (Interconnection Network, you can directly access one or more disks in the system. In the system, all memory and disk storage are shared by multiple processors.
In this structure, (1) the processor that provides multiple database services exchange messages and data through the global shared memory, resulting in high communication efficiency, no additional overhead is required for implementing the parallelism between the query and the query. (2) data in the database is stored on multiple disks and can be accessed by all processors; (3) There is little difference between the preparation of database software and the single processor.
Because shared memory is used in this structure, tasks can be dynamically allocated to each processor in the system based on the actual load of the system, so as to achieve load balancing well.
The interconnection between hardware resources in this structure is complicated and the hardware cost is high. Because multiple processors share the memory, increasing the number of processors in the system will lead to serious memory contention, therefore, the number of processors in the system is limited, and the system has poor scalability. In addition, because of the shared memory mechanism, any errors in the shared memory will affect all the processors in the system, the availability of the system is not very good.
2. Shared-disk structure
This structure consists of multiple processors with independent memory (primary memory) and multiple disk storage. Each processor has no direct information or data exchange between them, multiple Processors and disk storage are connected by high-speed communication networks. Each processor can read and write all disk storage.
This structure is often used to implement database clusters, featuring low hardware costs, good scalability, and high availability, and easy migration from a single processor system, it is also easy to achieve load balancing among multiple processors.
One obvious disadvantage of this structure is that multiple processors use all the disk storage in the system. Therefore, when the number of processors increases, disk contention may result in performance problems.
This structure has another disadvantage: Each processor in the system can access all the disk storage, and the data in the disk storage is copied to each processor's respective High-speed buffer for processing, when multiple processors simultaneously access and modify the storage location of the same disk, Data Consistency cannot be guaranteed, in the structure, you need to add a distributed cache manager to globally control and manage concurrent access of each processor, which brings additional communication overhead.
3. No shared-nothing Structure
This structure consists of multiple completely independent processing nodes. Each processing node has its own processor, independent memory (primary memory), and independent disk storage, multiple processing nodes are connected by high-speed communication networks at the processor level. Each processor in the system processes its data independently using its own memory.
In this structure, each processing node is a small database system. multiple nodes constitute the entire distributed parallel database system. Because each processor uses its own resources to process its own data, there is no contention between memory and disk, improving the overall performance. In addition, this structure has excellent scalability-you only need to add additional processing nodes to increase the processing capability of the system in a linear proportion.
In this structure, because the data is private to each processor, the distribution of data in the system requires special processing to ensure basic load balancing of each node in the system, however, in the current database field, there has been a reasonable solution to this data distribution problem.
Because data is distributed across various processing nodes, this structure is used in parallel database systems, the re-distribution of data throughout the system is inevitable during expansion.
Currently, in the field of parallel databases, the shared-memory structure is rarely used. The shared-disk structure and shared-nothing structure are applied and developed due to their respective advantages. A typical example of the shared-disk structure is an oracle cluster, and a typical example of the shared-nothing structure is teradata, which is also used by clusters of IBM DB2 and MySQL.
Ming Source: http://blog.csdn.net/NevePioneer/archive/2008/11/04/3219590.aspx