Analysis of MMDB

Source: Internet
Author: User

What is MMDBMS?

The master database system (MMDB) manages the entire database or a part of the database in the master database, so you can directly access the data without accessing the disk, so that the master database has a high-performance transaction processing capability. In English, the primary database can be called main-memory database, memory residence database, or in-memory database. All the main concepts of these English names are that the primary database is stored in the memory.

On the other hand, in the real-time application field, the system has a high requirement on the corresponding time. Therefore, the primary storage is developed and used to manage data in the real-time system. However, these systems have the following problems:

-Because the development of existing real-time systems is aimed at specific applications and systems are specially designed), the system's versatility is very low, and the concept of database management is also very poor.

-Such database systems cannot provide programming interfaces that meet industrial standards at the same time, real-time transaction processing capabilities and scalable database management structures.

-In such a system, it is difficult to flexibly reflect the customer's requirements or use them in other application fields, that is, due to restrictions of specific applications, the scalability, availability, and system efficiency of the system are very low.

The development of such real-time systems requires a great deal of cost, and such a specific design of real-time system is difficult to meet the requirements of complete database management, for this reason, the development cost is also very high. In addition, the relational database systems before Altibase are designed for disk data. Since there are many applications in these databases, it is difficult to redesign these databases.

Why is MMDB used now?

The theoretical basis of MMDB was formed through active research and development in the late 1980 s. At that time, the 32-bit processor supports a maximum of 4 GB address space, but due to operating system and software operation restrictions, the 32-bit address space is actually only about 2 GB of current database size ). However, the 64-bit primary database is only limited by the number of physical memory configured in the system. The 64-bit system supports a maximum of GB memory. However, due to economic and technical restrictions, there are few primary database system products that are put into practical application, and only some experimental products developed by universities and R & D institutions.

(1) Reduction in storage prices

The rapid development of semiconductor technology has dramatically reduced the cost of DRAM, which has dropped 10 times over the past 20 years. In 1986, the cost of 1 GB memory was $40000, but less than $5000 now, and less than $2500 on some servers. IDC predicts that the storage price will continue to drop. Considering this trend, it is feasible to introduce Primary databases in database solutions, which is accepted by more and more people.

(2) key functions of 64-bit Systems

The 32-bit system can only access about 2 GB of memory, which limits the storage of primary data in the system. On the other hand, 64-bit systems can access a maximum of 16 billion GB of memory. Therefore, the maximum storage capacity of the primary data in 64-bit systems is only the amount of physical memory that can be installed into the system. The primary database is not restricted by the address access space.

(3) Improvement of Database Management Technology

In practical applications, users usually have two considerations: whether the stability of the primary database and the size of the database are limited. Commercial Primary databases have been applied to various high-tech fields and have the same stability as traditional disk-based databases.

Why is MMDB faster?

If the memory buffer of the disk database is large enough to store the entire database in the buffer, can the performance of the disk database be as high as that of MMDBMS? The UPDATE operation of the disk database needs to synchronize data with the disk, but the SELECT operation can achieve almost the same efficiency. However, due to the complexity of the query and processing algorithms of the disk database, the disk system cannot achieve the expected high performance to optimize disk access. The secret to the high performance of the primary database system is its database management technology and database system architecture.

(1) Data Access costs

The disk price is lower than the Memory price, and the memory price is lower than the cpu cache price. In other words, the faster the speed, the higher the price. On the other hand, in terms of processing speed, the disk access time is in milliseconds, while the memory azimuth time is tens of nanoseconds. To achieve high performance, it is not enough to store the database in the primary storage. It also requires efficient memory structure technology, high-speed cache data management technology, and query optimization technology based on the primary storage.

(2) Address ing between primary storage and disk

Assume that all data managed by the disk DBMS is mainly stored in the disk, and the access to the record is implemented through the RID (record identifier. Therefore, to access a record, address ing is required to convert the RID to the physical address of the memory. The address ing time between memory physical addresses and database addresses is very short, but it cannot be ignored in the case of high-speed data processing. The primary DBMS accesses the database directly through the memory pointer, because there is no address ing time, it can improve the database performance. Similarly, the address ing time is also required when you back up the database to the disk and generate the log for recovery. The performance of the primary database varies greatly depending on the difference in the efficiency of the address ing technology and the number of address ing times.

(3) memory-optimized Index Structure

The typical Index Technology of the disk database system is B-tree index. The main purpose of the B-tree structure is to reduce the number of disk I/O required to complete the index search of data files. B-tree controls the internal index value of the node to achieve this goal. The node contains as many index entries as possible to add one index entry that can be accessed by disk I/O ). T-tree is an index technology optimized for primary storage access. T-tree is a balanced binary tree that contains multiple index entries in a node. The index items of T-tree are much simpler than those of B-tree in terms of size and algorithm. The T-tree search algorithm does not distinguish the value of the search from the current node or other places in the memory. Each time a new index node is accessed, the index range is halved.

(4) Query Optimization

The query optimization algorithm of the disk database system is basically used to reduce disk I/O. The DRDBMS system optimization policy assumes that data is mainly stored on disks. The data in the disk database may be stored on the disk or in the memory buffer, but the cost of disk I/O is much higher than that of memory access. Therefore, the disk database has to assume the worst case, all data is stored in the disk. On the other hand, in the primary database, you can determine that all data is stored in the primary database. You can use this simple assumption that all data is stored in the primary database. The query optimization of the primary database does not need to consider the disk issue, so it is simpler and more accurate. The primary database system can implement more optimization algorithms than the disk database.

(5) logs and recovery

Because the primary storage is a volatile storage medium, you need to back up the database. The backup database of the MMDBMS on the disk can make up for the volatility of the primary memory. Therefore, synchronization between the primary database and the backup database is required to ensure data durability. This is the basic standard of the database. In addition, precise logs and recovery capabilities are also the basic requirements of ACID standards in transaction processing. Currently, commercial primary database systems have been applied to various technical fields to ensure data durability. However, the system performance varies greatly depending on how optimized synchronization, logs, recovery capabilities, and data durability are achieved.

(

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.