Memory control method and system under KaiWuDB

By designing a reasonable memory control method in the KaiWudb database, including initialized memory management and management memory application release, the existing technology cannot ensure the stability and performance improvement of the existing technology. Performance improvement.

CN119356846APending Publication Date: 2025-01-24上海沄熹科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411289521.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing memory management methods cannot effectively ensure the stability, scalability and performance improvement of KaiWuDB database in query scenarios, especially in scenarios where multi-mode databases, off-site multi-center distributed deployment and diversified memory usage.

Method used

Provide a memory control method under KaiWudb. By judging the number of Buffer Pool of the startup parameter configuration, initialize memory management, manage memory application and release, and manage the safety and efficiency of memory use based on the first address of memory.

Benefits of technology

The safety, scalability, and stability of the KaiWudb database query scene is realized, which improves the operating performance and meets the needs of memory control function modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356846A_ABST
    Figure CN119356846A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of memory control, and particularly provides a memory control method and system under KaiWuDB. The method comprises the following steps that S1, whether the number of buffer pools is configured for starting parameters or not is judged; s2, initializing memory management; s3, a kaiwudb database execution layer operator initiates a memory application; s4, after the memory is used, initiating a memory release application; and S5, performing a memory management mechanism of the KaiWuDB database. Compared with the prior art, the method has the advantages that the security, expansibility and stability of the query scene of the KaiWuDB database can be guaranteed, and the running performance of the query scene of the KaiWuDB database is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of memory control, and specifically provides a memory control method and system under KaiWuDB. Background Art

[0002] A memory control method technology under KaiWuDB based on memory buffer pool, which combines data collection and batching implemented by buffer pool technology and KaiWuDB database customization, and adds customized memory address exception judgment and exception handling process. Key steps are as follows Figure 1 As shown in the figure: (1) memory request; (2) memory management; (3) memory usage; (4) memory release.

[0003] Due to the special memory customization requirements of KaiWuDB database, the existing traditional memory management methods cannot fully guarantee the stability, scalability, performance improvement and other requirements of KaiWuDB database query scenarios. In addition, the limitations of traditional memory management methods cannot be applied to the customization requirements of KaiWuDB functions. For example, the technical solutions of multi-mode databases, distributed deployment scenarios of multiple centers in different locations, and the diversified memory usage requirements of KaiWuDB database execution operators. Summary of the invention

[0004] The present invention aims at solving the above-mentioned deficiencies of the prior art and provides a memory control method under KaiWuDB with strong practicality.

[0005] A further technical task of the present invention is to provide a memory control system under KaiWuDB that is rationally designed, safe and applicable.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A memory control method under KaiWuDB has the following steps:

[0008] S1. Determine whether the startup parameters configure the number of buffer pools;

[0009] S2, memory management initialization;

[0010] S3 and kaiwudb database execution layer operators initiate memory requests;

[0011] S4. After the memory is used up, a request for memory release is initiated;

[0012] S5. Implement the memory management mechanism of KaiWuDB database.

[0013] Further, in step S1, it is determined whether the startup parameters configure the number of buffer pools. If not, the default parameters are used, which is 10% of the total available memory.

[0014] If it exists, check the validity of the parameter. If it is valid, use the size specified by the startup parameter and record it in the system log file.

[0015] Furthermore, in step S2, memory management is initialized, including application of buffer pool memory blocks, parameter initialization, log output, application data initialization and exception handling.

[0016] Furthermore, in step S3, the kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the size of the memory request is larger than 32K, the operating system's own memory management mechanism is used.

[0017] If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

[0018] Further, in step S4, after the memory usage is completed, a memory release request is initiated;

[0019] First, determine the legality of the released memory address; if it is illegal, return an error;

[0020] If the memory address is legal, determine whether the released memory address is within the address management range of the buffer pool; if it is not within the address management range of the buffer pool, it is a non-standard memory application and is released through the memory management mechanism of the operating system;

[0021] If the memory request is within the buffer pool address management range, the memory block data will be cleared and marked as reusable.

[0022] Furthermore, in step S5, the memory management mechanism of the KaiWuDB database determines the memory size, boundary and special mark for management based on the determination of the memory first address.

[0023] A memory control system under KaiWuDB, first, determine whether the startup parameter configures the number of buffer pools, if not, use the default parameter, generally 10% of the total available memory; if it exists, check the legality of the parameter, if legal, use the size specified by the startup parameter, and record the system log file;

[0024] Then, memory management is initialized, and the kaiwudb database execution layer operator initiates a memory request. After the memory is used up, a memory release request is initiated.

[0025] Finally, the memory management mechanism of KaiWuDB database is based on the judgment of the memory first address, and manages the memory size, boundaries and special marks.

[0026] Furthermore, memory management initialization includes buffer pool memory block application, parameter initialization, log output, application data initialization and exception handling.

[0027] Furthermore, the kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the non-standard memory request is larger than 32K, the operating system's own memory management mechanism is used.

[0028] If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

[0029] Furthermore, after the memory usage is completed, a memory release request is initiated;

[0030] First, determine the legality of the released memory address; if it is illegal, return an error;

[0031] If the memory address is legal, determine whether the released memory address is within the address management range of the buffer pool; if it is not within the address management range of the buffer pool, it is a non-standard memory application and is released through the memory management mechanism of the operating system;

[0032] If the memory request is within the buffer pool address management range, the memory block data will be cleared and marked as reusable.

[0033] Compared with the prior art, the memory control method and system under KaiWuDB of the present invention have the following outstanding beneficial effects:

[0034] In the deployment scenario of KaiWuDB database, the present invention compares data reliability, cluster performance, and disaster recovery. It simulates a real working environment. The results show that a memory control method under KaiWuDB based on memory cache pool meets the functional module requirements of memory control of KaiWuDB database. It ensures the security, scalability, and stability of KaiWuDB database query scenarios. It improves the running performance of KaiWuDB database query scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Attached Figure 1 It is a flowchart of the memory control method under KaiWuDB;

[0037] Attached Figure 2 It is a memory control function structure diagram of KaiwuDB in the memory control method under KaiWuDB;

[0038] Attached Figure 3 It is a memory control release flow chart of KaiwuDB in the memory control method under KaiWuDB. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] A best embodiment is given below:

[0041] like Figure 1-3 As shown, a memory control method under KaiWuDB in this embodiment has the following steps:

[0042] S1. Determine whether the startup parameters configure the number of buffer pools;

[0043] Determine whether the startup parameters configure the number of buffer pools. If not, use the default parameters, which are generally 10% of the total available memory.

[0044] If it exists, verify the validity of the parameter. If it is valid, use the size specified by the startup parameter and record it in the system log file.

[0045] S2, memory management initialization;

[0046] Memory management initialization, including buffer pool memory block application, parameter initialization, log output, application data initialization, and exception handling.

[0047] S3 and kaiwudb database execution layer operators initiate memory requests;

[0048] The kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the size is larger than 32K, the operating system's own memory management mechanism is used.

[0049] If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

[0050] S4. After the memory is used up, a request for memory release is initiated;

[0051] After the memory is used up, a request for memory release is initiated.

[0052] First, determine the legality of the released memory address; if it is illegal, return an error;

[0053] If it is legal, then determine whether the released memory address is within the address range of the buffer pool. If not, it is a non-standard memory application. Check whether it is approved by the operating system memory management mechanism;

[0054] Finally, if it is a memory request for the buffer pool, the data in this memory block is cleared and marked as reusable.

[0055] S5. Perform memory management mechanism of KaiWuDB database;

[0056] The memory management mechanism of KaiWuDB database is based on the judgment of the memory first address, and manages the memory size, boundaries, special marks, etc.

[0057] Based on the above method, a memory control system under KaiWuDB first determines whether the startup parameter configures the number of buffer pools. If not, the default parameter is used, which is generally 10% of the total available memory. If it exists, the legality of the parameter is verified. If it is legal, the size specified by the startup parameter is used and the system log file is recorded.

[0058] Then, memory management is initialized, and the kaiwudb database execution layer operator initiates a memory request. After the memory is used up, a memory release request is initiated.

[0059] Finally, the memory management mechanism of KaiWuDB database is based on the judgment of the memory first address, and manages the memory size, boundaries and special marks.

[0060] Among them, memory management initialization includes buffer pool memory block application, parameter initialization, log output, application data initialization and exception handling.

[0061] The kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the size is larger than 32K, the operating system's own memory management mechanism is used.

[0062] If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

[0063] After the memory is used up, a request for memory release is initiated;

[0064] First, determine the legality of the released memory address; if it is illegal, return an error;

[0065] If the memory address is legal, determine whether the released memory address is within the address management range of the buffer pool; if it is not within the address management range of the buffer pool, it is a non-standard memory application and is released through the memory management mechanism of the operating system;

[0066] If the memory request is within the buffer pool address management range, the memory block data will be cleared and marked as reusable.

[0067] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0068] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A memory control method under KaiWuDB, characterized in that: The steps are as follows: S1. Determine whether the startup parameters configure the number of buffer pools; S2, memory management initialization; S3 and kaiwudb database execution layer operators initiate memory requests; S4. After the memory is used up, a request for memory release is initiated; S5. Implement the memory management mechanism of KaiWuDB database.

2. The memory control method under KaiWuDB according to claim 1, characterized in that: In step S1, it is determined whether the startup parameters configure the number of buffer pools. If not, the default parameters are used, which is 10% of the total available memory. If it exists, check the validity of the parameter. If it is valid, use the size specified by the startup parameter and record it in the system log file.

3. The memory control method under KaiWuDB according to claim 2, characterized in that: In step S2, memory management is initialized, including buffer pool memory block application, parameter initialization, log output, application data initialization and exception handling.

4. The memory control method under KaiWuDB according to claim 3, characterized in that: In step S3, the kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the size is larger than 32K, the operating system's own memory management mechanism is used. If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

5. The memory control method under KaiWuDB according to claim 4, characterized in that: In step S4, after the memory usage is completed, a memory release request is initiated; First, determine the legality of the released memory address; if it is illegal, return an error; If the memory address is legal, determine whether the released memory address is within the address management range of the buffer pool; if it is not within the address management range of the buffer pool, it is a non-standard memory application and is released through the memory management mechanism of the operating system; If the memory request is within the buffer pool address management range, the memory block data will be cleared and marked as reusable.

6. The memory control method under KaiWuDB according to claim 5, characterized in that: In step S5, the memory management mechanism of the KaiWuDB database determines the memory size, boundary and special mark based on the memory first address for management.

7. A memory control system under KaiWuDB, characterized in that: First, determine whether the startup parameters configure the number of buffer pools. If not, use the default parameters, which are generally 10% of the total available memory. If so, verify the validity of the parameters. If valid, use the size specified by the startup parameters and record it in the system log file. Then, memory management is initialized, and the kaiwudb database execution layer operator initiates a memory request. After the memory is used up, a memory release request is initiated. Finally, the memory management mechanism of KaiWuDB database is based on the judgment of the memory first address, and manages the memory size, boundaries and special marks.

8. The memory control system under KaiWuDB according to claim 7, characterized in that: Memory management initialization, including buffer pool memory block application, parameter initialization, log output, application data initialization and exception handling.

9. The memory control system under KaiWuDB according to claim 8, characterized in that: The kaiwudb database execution layer operator initiates a memory request and determines the size of the memory request. If the size is larger than 32K, the operating system's own memory management mechanism is used. If it is less than 32K, an available memory block is returned by reserving the available memory block number data. If there is no available memory block, an error is reported and recorded in the system log file.

10. The memory control system under KaiWuDB according to claim 9, characterized in that: After the memory is used up, a request for memory release is initiated; First, determine the legality of the released memory address; if it is illegal, return an error; If the memory address is legal, determine whether the released memory address is within the address management range of the buffer pool; if it is not within the address management range of the buffer pool, it is a non-standard memory application and is released through the memory management mechanism of the operating system; If the memory request is within the buffer pool address management range, the memory block data will be cleared and marked as reusable.