Distributed database memory analysis method and device, equipment and medium
Patent Information
- Application Number
- CN202511306279.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-12-12
Smart Images

Figure CN121116635A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed database technology, and in particular to a distributed database memory analysis method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of information technology, distributed database systems, with their efficient data storage and processing capabilities, have been widely applied in several key areas such as cloud computing, big data processing, and the Internet of Things. This system consists of multiple computing nodes and data nodes, which interact and collaborate via a network to jointly complete core operations such as data storage, management, and retrieval.
[0003] In distributed database systems, memory, as a critical system resource, plays a decisive role in the system's performance and stability. As the fastest storage medium in the system, memory can significantly improve data access speed and processing efficiency. By caching hot and frequently accessed data in memory, the number of disk accesses can be greatly reduced, thereby effectively reducing the latency of data queries and updates. Therefore, the rational allocation of memory resources is crucial for the efficient operation of the system: compute nodes need sufficient memory to execute complex query and computation tasks, while data nodes need memory to cache data and indexes to improve data read and write performance. Once problems such as insufficient memory or memory leaks occur, it can easily lead to a decline in system performance and response delays, and in severe cases, even cause system crashes. This makes real-time monitoring and diagnosis of memory status essential to ensuring system stability.
[0004] However, current methods for monitoring and diagnosing memory in distributed database systems still have significant shortcomings. Traditional manual inspection methods heavily rely on the experience and manual operation of system administrators, which is not only inefficient but also prone to overlooking problems due to human error. For example, administrators need to log in to each node periodically to manually check memory usage, making it difficult to detect memory problems in real time. Simple monitoring tools typically only provide basic memory usage data and cannot deeply analyze memory allocation, fragmentation levels, and memory interactions between nodes. They cannot accurately identify the root cause of memory problems, nor can they provide effective optimization suggestions.
[0005] Even existing automated diagnostic tools have functional limitations: most tools can only perform memory diagnostics on a single node and cannot comprehensively consider the memory interaction relationships and overall memory status between multiple nodes in a distributed system. For example, a memory problem on one node may have a cascading impact on the performance of other nodes, but single-node diagnostic tools cannot identify such cross-node memory problems. At the same time, existing diagnostic tools mostly adopt static analysis methods, which can only be performed after the system has been running for a period of time. They cannot track the dynamic changes in memory status in real time. In a distributed database system, memory status may fluctuate significantly in a short period of time, and static analysis methods are difficult to meet the needs of timely problem detection. Summary of the Invention
[0006] The main objective of this invention is to provide a distributed database memory analysis method, apparatus, device, and storage medium, aiming to solve the technical problems of low inference efficiency and limited long-distance dependency modeling capability in speech synthesis, which affect the fluency and naturalness of speech.
[0007] To achieve the above objectives, the present invention provides a distributed database memory analysis method, comprising: Pre-configure the status and duration of the memory diagnostic switch on the target compute node; Obtain the target memory statistics task, and configure the collection mode according to the target memory statistics task; According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data. The proxy node transmits the memory statistics data back to the operation and maintenance management platform, which then stores the memory statistics data in the system tenant. Extract memory statistics data for the corresponding time period and node from the system tenant, and generate a memory trend chart based on the extracted memory statistics data.
[0008] Furthermore, to achieve the above objectives, the present invention provides a distributed database memory analysis device, comprising: The parameter configuration module is used to pre-set the status and activation duration of the memory diagnostic switch on the target computing node; The data acquisition task module is used to acquire target memory statistics tasks and configure the acquisition mode according to the target memory statistics tasks. The memory statistics module is used to send memory statistics commands to the agent nodes according to the collection mode. The agent nodes execute the memory statistics commands on the corresponding target computing nodes and / or target data nodes to obtain memory statistics data. The memory statistics storage module is used to send the memory statistics data back to the operation and maintenance management platform through the proxy node, and the operation and maintenance management platform stores the memory statistics data in the system tenant; The memory usage analysis module is used to extract memory statistics data for the corresponding time period and node from system tenants, and generate memory trend charts based on the extracted memory statistics data.
[0009] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a distributed database memory analysis program stored in the memory and executable on the processor, wherein when the distributed database memory analysis program is executed by the processor, it implements the steps of the distributed database memory analysis method as described above.
[0010] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a distributed database memory analysis program, which, when executed by a processor, implements the steps of the distributed database memory analysis method as described above.
[0011] Beneficial Effects: This invention relates to the field of distributed database technology and discloses a distributed database memory analysis method, including: pre-setting the state and activation duration of the memory diagnostic switch of the target computing node; configuring the collection mode according to the acquired target memory statistics task; according to the collection mode, sending the memory statistics command to the proxy node, the proxy node executing the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data; sending the memory statistics data back to the operation and maintenance management platform through the proxy node, and the operation and maintenance management platform storing the memory statistics data in the system tenant; extracting the memory statistics data of the corresponding time period and corresponding node from the system tenant, and generating a memory trend chart based on the extracted memory statistics data. This invention improves the efficiency of memory usage analysis by collecting and statistically analyzing data from the configured target computing node and target statistics node, and generating a memory usage trend chart. Attached Figure Description
[0012] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a distributed database memory analysis method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the distributed database memory analysis method of the present invention; Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the distributed database memory analysis device of the present invention; Figure 4This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0013] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0014] The distributed database memory analysis method provided in this invention can be applied to, for example... Figure 1 In this application environment, the user terminal communicates with the server via a network. The server can pre-configure the status and duration of the memory diagnostic switch for the target computing node through the user terminal; configure the collection mode according to the acquired target memory statistics task; according to the collection mode, send memory statistics commands to proxy nodes, which execute the memory statistics commands on the corresponding target computing node and / or target data node to obtain memory statistics data; the proxy nodes send the memory statistics data back to the operation and maintenance management platform, which stores the memory statistics data in the system tenant; the system tenant extracts the memory statistics data for the corresponding time period and corresponding node, and generates a memory trend chart based on the extracted memory statistics data. This invention improves the efficiency of memory usage analysis by collecting and statistically analyzing data from the configured target computing node and target statistics node, and generating a memory usage trend chart. The user terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The invention will be described in detail below through specific embodiments.
[0015] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the distributed database memory analysis method provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0016] like Figure 2 As shown, the distributed database memory analysis method proposed in this invention includes the following steps: S100, Pre-set the status and activation duration of the memory diagnostic switch for the target computing node; S200: Obtain the target memory statistics task, and configure the collection mode according to the target memory statistics task; S300. According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data. S400: The memory statistics data are sent back to the operation and maintenance management platform through the proxy node, and the operation and maintenance management platform stores the memory statistics data in the system tenant; S500 extracts memory statistics data for the corresponding time period and node from system tenants, and generates a memory trend chart based on the extracted memory statistics data.
[0017] In this embodiment, enabling memory diagnostics on compute nodes incurs some performance overhead. If this is enabled unchecked for an extended period, it may affect normal database operations. Therefore, the start and stop of the statistical function needs to be controlled via a switch, and the statistical period needs to be limited by the duration of activation. Operations personnel need to configure the switch status (on / off) and activation duration (e.g., 1 hour, 4 hours) for the target compute node (CN) requiring diagnostics on the Insight operations management platform. For example, the switch can be enabled during off-peak hours with a 2-hour activation duration to avoid statistics consuming business resources. Data nodes (DNs), however, do not require this setting and are always enabled by default. Since their statistics rely on native PFS (Performance Schema) and tcmalloc functions, the impact on performance is minimal. This differentiated design reflects the refined consideration of the technical solution.
[0018] Obtaining the target memory statistics task and configuring the collection mode accordingly is a crucial step in clarifying diagnostic needs and execution methods. The target memory statistics task here stems from operational needs, such as investigating memory leaks during SQL execution on compute nodes or monitoring cache memory fluctuations on data nodes. After initiating the task on the Insight platform, operations personnel need to configure the collection mode according to the task objectives, defining two modes: scheduled collection, suitable for long-term trend tracking (e.g., collecting data every 30 minutes to monitor memory changes throughout the day); and real-time collection, suitable for locating sudden problems (e.g., immediately collecting current memory data when a node experiences response delays). During configuration, the node range corresponding to the mode must be clearly defined (compute nodes only, data nodes only, or both), ensuring that the collection direction aligns with the task objectives and avoiding aimless data collection that wastes resources.
[0019] Based on the collection mode, memory statistics commands are sent to proxy nodes. The proxy nodes execute these commands on the corresponding target compute nodes and / or target data nodes, obtaining memory statistics data – this is the core execution step in data collection. The Insight platform triggers command issuance based on the collection mode: scheduled collection is automatically issued at a preset frequency, while real-time collection is issued immediately upon manual triggering. The commands are ultimately transmitted to the corresponding proxy nodes (a proxy node is defined as a proxy node for each host within the distributed database, serving as the intermediary hub connecting the platform and the nodes). After receiving the command, the proxy node first parses the collection node (target compute / data node) and the collection scope, then performs differentiated collection: for compute nodes, it accumulates thread memory values and computational usage based on preset two-level statistical items (256 items at the first level covering the data dictionary, SQL execution stages, etc., and 256 items at the second level subdividing the first-level items and including allocation / release statistics); for data nodes, it calls their PFS and tcmalloc-based statistical modules to collect data, ultimately generating statistical data for the two types of nodes respectively.
[0020] The process of transmitting memory statistics back to the operations and maintenance management platform via proxy nodes, and then having the platform store these statistics in the system tenant, constitutes the steps for data flow and persistence. After collecting data, the proxy nodes transmit it back to the Insight platform via the internal communication protocol of the distributed database. Before transmission, integrity checks are performed (e.g., checking data format and whether key indicators are missing) to ensure data validity. Upon receiving the data, the platform structures it (categorizing it by node type, collection time, and statistical items) and stores it in the system tenant of the distributed database. The system tenant serves as dedicated storage space, ensuring data security and traceability, and providing a foundation for subsequent historical data queries and trend analysis.
[0021] Extracting memory statistics for the corresponding time period and node from system tenants, and generating memory trend charts based on these statistics, is the final step in visualizing and analyzing diagnostic results. On the Insight platform, operations personnel select the target time period (e.g., the last 24 hours) and target node (e.g., a compute node in a business cluster) according to their needs. The platform extracts the corresponding data from system tenants and generates memory trend charts (such as memory usage curves for various statistical items and overall node memory utilization trends) through its built-in analysis module. These trend charts visually present memory fluctuation patterns, such as a sudden increase in memory usage on a compute node during the SQL execution phase, or a continuous increase in the tcmalloc fragmentation rate of a data node. This helps operations personnel quickly pinpoint the root cause of problems, providing a basis for database optimization and perfectly aligning with the core objectives of efficiently diagnosing memory status and supporting system optimization.
[0022] In one embodiment, step S100 includes: S101, Pre-configure the on / off instructions and enable duration parameters for the memory diagnostic switch of the target computing node; S102. Send the on / off command and the enable duration parameter command of the memory diagnostic switch to the corresponding agent node; S103. After receiving the on / off instruction of the memory diagnostic switch and the instruction of the enable duration parameter, the proxy node executes the instruction on the target computing node. S104 sets the state and activation duration of the memory diagnostic switch of the target computing node according to the instruction.
[0023] In this embodiment, enabling memory diagnostics on the target computing node will incur some performance overhead. If enabled unchecked for an extended period, it may affect the normal business processing efficiency of the distributed database. Therefore, it is necessary to control the memory statistics cycle through the duration parameter to avoid resource waste. During configuration, operations personnel need to first identify the target computing node (i.e., the specific computing node requiring memory diagnostics) based on actual operational needs, and then set on / off commands for these nodes. If real-time memory status monitoring is required, configure an on command; if the node is in peak business periods and diagnostics is not needed, configure a off command. Simultaneously, considering factors such as off-peak business hours and troubleshooting needs, set the activation duration (e.g., 1 hour, 4 hours, etc.) to ensure that memory diagnostics are only executed when necessary, balancing diagnostic needs with system performance.
[0024] After completing the command configuration, the process proceeds to sending the on / off commands for the memory diagnostic switch and the activation duration parameters to the corresponding agent node. The agent node is a dedicated intermediary on each host within the distributed database, responsible for command transmission and data interaction between the operation and maintenance management platform and the defined compute and data nodes. It is a crucial hub connecting global control with local nodes. The corresponding agent node here specifically refers to an agent node located on the same host as the target compute node or belonging to the same management unit, ensuring accurate command delivery. The command transmission originates from the Insight intelligent operation and maintenance platform. The platform securely and efficiently transmits the commands to the agent node using a dedicated communication protocol within the distributed database (such as an inter-node data interaction protocol), preventing command loss or tampering and laying the foundation for subsequent operations.
[0025] When the agent node receives the on / off command and the duration parameter command for the memory diagnostic switch, it must first verify the validity of the command before executing it on the target compute node. This verifies that the command format conforms to the compute node's execution standards and that the target compute node is currently online and operational (if the node is offline or experiencing communication failure, the agent node will generate an exception log and report it to the Insight platform). After successful verification, the agent node leverages its local connection with the target compute node to directly execute the command. This process eliminates the need for maintenance personnel to remotely log in and manually operate the compute node, completely abandoning the cumbersome traditional memory diagnostic method of logging into servers one by one. This significantly improves operational efficiency and reduces the risk of human error, aligning with the technical goals of high efficiency, convenience, and improved operational efficiency.
[0026] Ultimately, the final result of this step is setting the status and duration of the memory diagnostic switch on the target compute node according to the instructions. After the proxy node executes the instructions, it writes the corresponding parameters into the target compute node's system configuration: if the instruction is to enable, the compute node's memory statistics function is activated, causing it to start collecting memory data according to the subsequent preset two-level statistical items; if the instruction is to disable, the statistics function is disabled and related resources are released. Simultaneously, the duration parameter takes effect. When the compute node's memory diagnostic duration reaches the set value, the system automatically disables the statistics function without manual intervention, further ensuring the stability and autonomy of system operation.
[0027] In one embodiment, step S200 includes: S201, Obtain target memory statistics task; S202. Configure the collection mode according to the target memory statistics task; S203. If the acquisition mode is timed acquisition, configure the timed acquisition parameters and timed acquisition nodes according to the timed acquisition mode. S204. If the acquisition mode is real-time acquisition, configure the real-time acquisition node according to the real-time acquisition mode.
[0028] In this embodiment, obtaining the target memory statistics task is the first step in initiating the memory data collection process. Its core is to clarify the specific diagnostic needs of the operations and maintenance personnel, providing direction for subsequent configurations. The target memory statistics task here is essentially a specific task request initiated by the operations and maintenance personnel on the Insight operations and maintenance management platform based on the operating status of the distributed database (such as whether performance bottlenecks occur, the need to investigate memory leak risks, or routine periodic monitoring of memory usage trends). The task must be associated with a clear diagnostic target, such as investigating memory usage during the SQL execution phase on a subset of compute nodes (CN) within a specific business cluster, or monitoring tcmalloc memory fragmentation on all data nodes (DN), ensuring that subsequent operations revolve around specific needs and avoiding aimless data collection that wastes system resources.
[0029] After acquiring the target task, the next step is to configure the collection mode based on the target memory statistics task. The core of this operation is matching task requirements with collection efficiency. There are two main collection modes: scheduled collection and real-time collection. The choice between the two depends on the actual operational scenario. If the task objective is to track long-term memory change trends (such as monitoring database memory fluctuations during peak and off-peak periods in daily operations), then scheduled collection is suitable. If the task objective is to immediately locate sudden memory problems (such as a node suddenly experiencing response delays, requiring immediate acquisition of current memory usage data to investigate the cause), then real-time collection is suitable. This mode division covers the needs of different operational scenarios and reduces unnecessary performance overhead through differentiated configuration.
[0030] When the data collection mode is scheduled, configure the scheduled collection parameters and nodes according to the scheduled collection mode. This configuration needs to balance data granularity and system load. Scheduled collection parameters include collection frequency and selectable collection periods. The collection frequency needs to be set based on memory sensitivity. For example, if fine-grained tracking of memory fluctuations is required, it can be set to 5 minutes / time; if only macro-level trends are needed, it can be set to 1 hour / time, avoiding excessive frequency that could overload the nodes. The collection period can be limited according to business characteristics, such as collecting only during the off-peak business period from 23:00 to 6:00 the next day, further reducing the impact on normal business operations. The configuration of scheduled collection nodes needs to clearly define the node type and scope. Options include collecting only compute nodes, only data nodes, or both. For example, when troubleshooting SQL execution memory issues, only the target compute node needs to be selected; when monitoring data cache memory, the data node should be selected, ensuring that the collection scope accurately matches the task objective and avoiding invalid data collection.
[0031] If the data collection mode is real-time, the real-time collection nodes should be configured accordingly, prioritizing the immediacy and node targeting of the data collection. Unlike scheduled collection, real-time collection does not require configuring frequency or time periods. Its core function is to accurately identify nodes requiring immediate diagnosis. For example, if a compute node experiences a sudden increase in memory usage, operations personnel can quickly select that node as the real-time collection node on the Insight platform without waiting for a fixed period. If troubleshooting cross-node memory interaction issues is required, multiple related nodes can be selected simultaneously (e.g., compute nodes and corresponding data nodes involved in a specific SQL statement). It is particularly important to emphasize that the configuration of real-time collection nodes relies on the node communication mechanism within the distributed database to ensure that the agent node can quickly establish a connection with the target node, triggering the collection operation immediately. This meets the timeliness requirements for troubleshooting sudden faults and avoids collection delays caused by indiscriminately selecting a large number of nodes, demonstrating the practicality and flexibility of the technical solution.
[0032] In one embodiment, step S300 includes: S301. The memory statistics command is sent to the agent node according to the collection mode; S302. The proxy node analyzes the memory statistics command to obtain the collection node and the collection data range; S303. If the collection node is a target computing node, the proxy node performs a collection operation on the target computing node according to the collection data range to obtain the computing node memory statistics. S304. If the acquisition node is a target data node, the proxy node calls the memory statistics module of the target data node to perform the acquisition operation according to the acquisition data range, and obtains the memory statistics data of the data node. S305. Merge the memory statistics of the computing node and the memory statistics of the data node to obtain the memory statistics.
[0033] In this embodiment, sending memory statistics commands to agent nodes according to the collection mode is a crucial connecting step between the operation and maintenance management platform and the node collection operation. Its core is relying on the Insight operation and maintenance management platform to achieve accurate command transmission. The collection mode here determines the trigger logic for command issuance. If it is timed collection, the platform will automatically trigger command issuance according to a preset collection frequency (e.g., every 5 minutes, every 1 hour); if it is real-time collection, it will be issued immediately after the operation and maintenance personnel click the real-time collection button on the platform. The agent node is a dedicated intermediary carrier for each host within the distributed database. The platform will send memory statistics commands to the corresponding agent node (e.g., the agent node of the host to which the target computing node belongs) based on the affiliation of the target collection node, ensuring that the command can directly reach the execution carrier closest to the target node, reducing cross-host communication latency and laying the foundation for subsequent efficient collection.
[0034] Once the proxy node receives the command, it analyzes the memory statistics command to determine the collection node and the data range. This step is crucial for ensuring accurate execution of the data collection operation. The proxy node parses the structured parameters in the command. The collection node must clearly identify whether it is a target compute node (CN), a target data node (DN), or a combination of both, and it must correspond to a specific node's IP address or name to avoid mistakenly collecting data from irrelevant nodes. The data range includes a time range (such as memory data within the last 10 minutes or current real-time data) and a statistical dimension range (such as memory usage at each stage of SQL execution for compute nodes, and tcmalloc memory fragmentation data for data nodes). These parameters are derived from the task information configured on the Insight platform previously. Simultaneously, the proxy node verifies the online status and collectability of the collection node. If a node is offline or experiences a communication failure, it immediately generates an exception log and sends it back to the Insight platform to prevent invalid data collection operations.
[0035] Based on the parsing results, the proxy node will perform data collection according to different scenarios: if the collection node is the target computing node, the proxy node will perform the collection operation on the target computing node according to the range of collected data. At this time, the proxy node will call the two-level statistical items preset by the computing node, accumulate the memory allocation and release values of all threads of the computing node, calculate the absolute value of the difference to obtain the current memory usage of each statistical item, sort them by memory usage size, display the top few, merge the remaining smaller usage items, and finally generate the computing node memory statistics.
[0036] If the collection node is the target data node, the proxy node calls the target data node's memory statistics module to perform the collection operation based on the data collection range. This process relies on the data node's native statistical capabilities. The data node's memory statistics module contains two core functions: first, a PFS (Performance Schema)-based memory statistics function, which can collect memory allocation and release data for various components of the data node (such as data cache and index management modules); second, a tcmalloc memory statistics function, which can supplement the collection of detailed data such as memory fragmentation rate and large memory block allocation. The proxy node triggers the data node to simultaneously call both of these functions, filtering and integrating data according to the data collection range to generate data node memory statistics.
[0037] Finally, the memory statistics of compute nodes and data nodes are merged to obtain the total memory statistics. This step is crucial for generating globally usable statistics. The proxy node performs structured integration of the two types of data. Data from the same time period is aligned by timestamp, duplicate statistical fields are removed (e.g., some basic memory usage data may be duplicated in both types of node data), and the data source (compute node or data node) is labeled to ensure that the merged data is both complete and free of redundancy. The merged memory statistics are then sent back to the Insight operations management platform by the proxy node, providing a unified data foundation for subsequent storage to system tenants and generation of trend charts. This also achieves the core goal of centralized management and one-stop viewing of memory information.
[0038] In one embodiment, step S303 includes: S3031, The target computing node accumulates the memory allocation and memory release values of the threads according to the preset two-level statistical items; S3032, Calculate the absolute value of the difference between the memory allocation value and the memory deallocation value; S3033. Calculate the current memory usage of each statistical item in the preset two-level statistical items based on the absolute value of the difference; S3034. Sort the current memory usage of each statistical item according to the preset sorting rules; S3035. Filter the sorted memory usage according to the preset filtering rules, and merge the filtered memory usage data to obtain the memory statistics of the computing nodes.
[0039] In this embodiment, the memory statistics of the target computing node are achieved through refined data collection using two levels of pre-defined statistical items. This design is the core solution to the problems of coarse and vague localization in traditional memory diagnostic statistics. Specifically, there are up to 256 first-level statistical items, covering the key memory usage processes of the computing node, including the data dictionary (full metadata stage, incremental metadata push stage), SQL execution plan generation stage, SQL result set processing stage, SQL execution prepare / execute / fetch stage, OS message queue waiting to be sent stage, etc. These statistical items accurately cover the core memory consumption scenarios of the computing node in data processing and SQL execution, avoiding the problem of high time cost and performance overhead caused by comprehensive statistics. There are also up to 256 second-level statistical items, which further subdivide the first-level statistical items. Each item includes two dimensions: memory allocation statistics and memory release statistics. For example, the SQL execution stage in the first-level statistical item can be subdivided into sub-items such as execution stage, SQL parsing, memory allocation, execution stage, data computation, memory allocation, execution stage, temporary cache, and memory release through second-level statistical items, so as to achieve accurate decomposition of memory consumption links. During actual data collection, the target computing node will traverse all threads and accumulate the memory allocation and release values of each thread in the corresponding statistical item according to two levels of statistics. This ensures that the data covers all thread memory operations of the computing node, providing a complete foundation for subsequent analysis.
[0040] After accumulating the values, calculating the absolute value of the difference between memory allocation and memory release is a crucial step in determining the actual memory usage. Since there is a time difference between memory allocation and release, simply calculating a single dimension cannot reflect the node's current true memory consumption. However, by calculating the absolute value of the difference, the actual memory usage of the corresponding statistical item at the current moment can be directly obtained. If the difference is positive, it indicates that the process corresponding to that statistical item still occupies some memory that has not been released; if the difference is zero, it indicates that the memory of that process has been completely reclaimed. This calculation method can accurately isolate the interference of released memory and truly reflect the memory load status of the computing node.
[0041] Based on the absolute value of the difference, the current memory usage of each statistical item in the preset two-level statistical items needs to be calculated according to the statistical item hierarchy to complete data aggregation: first, calculate the absolute value of the difference of each second-level statistical item to obtain the memory usage of the sub-step; then, sum the memory usage of all second-level statistical items under the same first-level statistical item to obtain the overall memory usage of the first-level statistical item, forming a two-level statistical result of second-level detailed data + first-level summary data. This allows operation and maintenance personnel to grasp the key processes of memory consumption from a macro perspective (first-level statistical items) and also to locate specific consumption links from a micro perspective (second-level statistical items). For example, if the memory usage of the SQL execution execute stage is found to be too high through the first-level statistical items, the second-level statistical items can be used to quickly locate whether it is due to excessive memory allocation for data calculation in the execute stage or a delay in the release of temporary cache memory in the execute stage.
[0042] Subsequently, the current memory usage of each statistical item is sorted according to a preset sorting rule. For example, the sorting rule can be sorted from largest to smallest memory usage. The core purpose of this rule is to help operations and maintenance personnel quickly identify statistical items with high memory consumption. After sorting, statistical items with the highest memory usage will be presented first. For example, if the memory usage is too high in the SQL result set processing stage, the data dictionary full metadata stage, etc., they will be placed at the top of the sorting list, avoiding operations and maintenance personnel having to check one by one among a large number of statistical items, and greatly improving the efficiency of problem location.
[0043] Finally, the sorted memory usage is filtered according to preset filtering rules, and the filtered memory usage data is then merged. The filtering rule here is to display the top few statistics in terms of memory usage, while the remaining statistics with lower usage are displayed together. Specifically, the target compute node will select the top-ranking statistics (e.g., the top 20) based on the actual data volume and readability requirements for separate display, while the remaining statistics with lower usage (e.g., a single item with a usage rate less than 0.1% of the total memory) will be merged into other categories, and their total memory usage will be calculated uniformly. This filtering and merging method highlights core memory consumption items, avoids irrelevant data interfering with the analysis, and ensures data integrity (not omitting the total consumption of small-usage statistics). The final result is a clearly structured and focused compute node memory statistics report, providing high-quality data support for subsequent transmission back to the Insight operations management platform and trend chart generation, fully embodying the design philosophy of efficiency, practicality, and ease of operation.
[0044] In one embodiment, step S304 includes: S3041. The proxy node sends a memory statistics trigger instruction to the target data node according to the collected data range; S3042. When the target data node receives a memory statistics trigger instruction, the memory statistics module is invoked; S3043. The memory statistics module responds to the memory statistics trigger command and performs a collection operation according to the data collection range to obtain the memory statistics data of the data node.
[0045] In this embodiment, the key triggering step for initiating memory collection on the data node is for the agent node to send a memory statistics trigger command to the target data node according to the data collection range. Its core is to rely on the agent node (Agent) to accurately transmit the collection requirements. The agent node is a proxy node for each host within the distributed database, serving as an intermediary hub connecting the Insight operations and maintenance management platform and the target data node (DN). Previously, the data collection range was defined by parsing the collection commands issued by the platform. This range includes specific time dimensions (such as current real-time memory data or memory changes within the last 30 minutes) and statistical dimensions (such as the overall memory utilization rate of the data node, cache module memory usage, index management memory consumption, etc.). Before sending the command, the agent node first establishes a temporary connection with the target data node through a dedicated communication protocol within the distributed database to verify the node's online status and collectability, avoiding command failure due to node offlineness or communication failure. After confirming the node is normal, the agent node sends the memory statistics trigger command carrying the data collection range parameters to the target data node, ensuring that the command includes both a trigger signal for whether to collect and a clear execution standard for what to collect and for how long, laying the foundation for subsequent accurate collection.
[0046] When the target data node receives a memory statistics trigger command, it invokes the memory statistics module. The core of this operation is activating the data node's built-in specialized statistical capabilities. This memory statistics module is not a single functional unit, but a composite module composed of PFS (Performance Schema)-based memory statistics and tcmalloc's statistical capabilities. PFS (Performance Schema) is a performance monitoring component natively integrated into the data node, capable of tracking the memory allocation, usage, and release behavior of various business modules within the node (such as the data caching module, SQL processing module, and index maintenance module) in real time, providing basic and comprehensive memory usage data. tcmalloc, on the other hand, is a high-efficiency memory allocator whose statistical capabilities supplement the collection of detailed information on memory allocation, such as memory fragmentation rate, the allocation frequency and occupancy of large memory blocks (memory allocation units exceeding a preset threshold), and the sources of unreleased memory blocks. The combination of these two forms a two-layer statistical system of basic statistics + detailed supplementation, solving the problem of traditional single statistical tools providing incomplete data and failing to delve into the root causes. This is also a key design feature for achieving comprehensive and accurate analysis of the memory status of distributed databases.
[0047] Subsequently, the memory statistics module responds to the memory statistics trigger command and performs collection operations according to the data collection range to obtain data node memory statistics. This is the core execution step in generating data node memory data and must be carried out in strict accordance with the limitations of the data collection range. First, the memory statistics module breaks down the collection tasks: the PFS statistics unit prioritizes filtering memory data within the target time period by time range, focusing on collecting core indicators such as peak memory usage, average usage, and memory allocation / release frequency of each business module. For example, it counts the maximum memory usage of the data caching module and the memory allocation frequency per minute of the SQL processing module in the past 30 minutes. At the same time, the tcmalloc statistics unit starts synchronously, collecting detailed data such as the memory fragmentation rate change curve, the allocation ratio of memory blocks of different sizes, and the modules to which long-term unreleased memory blocks belong for the same time range. For example, it records whether the memory fragmentation rate exceeds the warning threshold of 5% and whether the allocation of large memory blocks of 1GB or more is concentrated in the index maintenance module. After data collection, the memory statistics module integrates two types of data: it aligns PFS and tcmalloc data at the same time using timestamps, removes duplicate basic indicators (such as the total memory usage of some modules which may be recorded by both statistical units), and labels the source of each data point (PFS statistics or tcmalloc statistics). This results in a structured dataset that includes both macro-level memory usage trends and micro-level allocation details—the data node memory statistics. This dataset not only meets the need for detailed data support for memory problem diagnosis but also provides a complete and accurate data foundation for subsequent merging with compute node memory data and transmitting it back to the Insight platform to generate trend charts.
[0048] In one embodiment, the distributed database memory analysis method further includes: Configure the dynamic activation switch for the memory statistics module, where the memory statistics module for the target compute node is off by default, and the memory statistics module for the target data node is on by default; The status of the dynamically active switch can be adjusted in real time through the operation and maintenance management platform. When the dynamic activation switch of the target computing node is turned on, the target computing node starts memory statistics according to the preset two-level statistical items; When the dynamic activation switch of the target compute node is turned off, the target compute node stops memory statistics and releases statistics-related resources; When the memory statistics module of the target computing node is in the enabled state and reaches the preset activation time, the dynamic activation switch automatically switches to the disabled state, causing the target computing node to stop memory statistics.
[0049] In this embodiment, configuring the dynamic activation switch of the memory statistics module is a core design element balancing memory diagnostic needs and system performance. Its configuration logic strictly distinguishes between target compute nodes (CN) and target data nodes (DN) due to the differences in memory statistics characteristics between the two types of nodes. Enabling memory statistics on compute nodes incurs some performance overhead because it requires real-time accumulation of thread memory allocation / release values according to two levels of statistics. Long-term operation may consume business processing resources; therefore, its memory statistics module is disabled by default. Data nodes, on the other hand, rely on their native statistical functions based on PFS (Performance Schema) and tcmalloc statistical capabilities, having minimal impact on system performance. Furthermore, they require continuous monitoring of the memory status of modules such as data caching and index management; therefore, they are enabled by default. During configuration, operations personnel need to preset the initial switch state for each type of node in the node configuration center of the Insight operations management platform: for compute nodes, the default value of the dynamic memory statistics switch is set to disabled; for data nodes, the default value is set to enabled. This initial configuration automatically takes effect during node deployment, requiring no repetitive operation, ensuring that the system has basic memory statistics capabilities upon deployment.
[0050] Adjusting the status of the dynamically active switch in real time via the aforementioned operations and maintenance management platform is a key operation for achieving flexible operations and maintenance. This is accomplished by leveraging the Insight platform's visual interface and real-time command transmission capabilities. Operations and maintenance personnel do not need to log in to the local node; they only need to locate the target node in the platform's memory diagnostic module (supporting single-node or batch node selection). Clicking the on / off button in the corresponding node's switch control bar will immediately generate an encrypted switch adjustment command, which is sent to the corresponding agent node (Agent, defined as the agent node for each host within the distributed database) via a dedicated communication link within the distributed database. After receiving the command, the agent node does not need to restart the node service; it directly modifies the running parameters of the memory statistics module in the target node's system process, achieving real-time switching of the switch status. This process eliminates the cumbersome traditional method of remotely logging in and modifying configuration files, with response latency controlled within seconds, meeting the immediate adjustment needs of sudden operations and maintenance scenarios (such as temporarily needing to investigate memory leaks in compute nodes).
[0051] When the dynamic activation switch of the target compute node is turned on, the target compute node starts memory statistics according to the preset two-level statistical items. The preset two-level statistical items are the core statistical rules: the first-level statistical items have a maximum of 256 items, covering key processes such as data dictionary (full metadata, incremental metadata push), SQL execution plan generation, SQL result set processing, and SQL execution prepare / execute / fetch stages, ensuring coverage of the compute node's main memory consumption scenarios; the second-level statistical items also have a maximum of 256 items, used to subdivide the first-level statistical items, and each item includes memory allocation statistics and memory release statistics dimensions. For example, the SQL execution execute stage is subdivided into execute stage data computation memory allocation, execute stage temporary cache memory release, etc. After the switch is turned on, the compute node will automatically start the statistics thread, which will traverse all business threads in real time, accumulate memory allocation and release values according to the two-level statistical items, and record the statistical timestamps to provide raw data for subsequent computation memory usage. The statistical process is independent of business threads to avoid interfering with normal data processing.
[0052] When the dynamic activation switch of the target compute node is turned off, the target compute node stops memory statistics and releases statistics-related resources. This operation is not a simple termination of statistics, but includes complete resource reclamation logic: the compute node first stops the statistics thread from collecting memory data from the business threads to avoid continuously occupying CPU resources; then it cleans up temporary data generated during the statistics process (such as historical accumulated values of thread memory allocation / release), releasing the occupied memory cache space; finally, it resets the statistics counters of the two-level statistics items to prepare for the next start of statistics. It is particularly important to emphasize that resource release must be completed within milliseconds to ensure that the compute node can immediately restore full performance after the switch is turned off, focusing on business processing and avoiding residual statistics resources from affecting system stability.
[0053] Furthermore, when the memory statistics module of the target computing node is enabled and reaches the preset activation duration, the dynamically activated switch automatically switches to the disabled state, serving as an automatic protection mechanism to ensure system performance. The activation duration is preset by the operations and maintenance personnel when the switch is enabled (e.g., 1 hour, 4 hours). The computing node will start an independent timer to calculate the duration of the switch in real time. When the preset duration is reached, the timer will trigger an automatic shutdown command, forcibly stopping memory statistics and releasing resources without manual intervention. This mechanism effectively avoids the problem of computing nodes remaining in a statistical state for extended periods and suffering performance degradation due to operations and maintenance personnel forgetting to turn off the switch. It is particularly suitable for scheduled troubleshooting scenarios (e.g., only needing to enable statistics for 1 hour during off-peak hours), further demonstrating the practicality and intelligence of the technical solution, and meeting the design goals of efficiency, practicality, and ease of operation.
[0054] In one embodiment, a distributed database memory analysis device is provided, which corresponds one-to-one with the distributed database memory analysis method described in the above embodiments. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the distributed database memory analysis device of the present invention. The modules include a parameter configuration module 10, a data acquisition task module 20, a memory statistics module 30, a memory statistics storage module 40, and a memory usage analysis module 50. Detailed descriptions of each functional module are as follows: The parameter configuration module 10 is used to pre-set the status and activation duration of the memory diagnostic switch of the target computing node; The data acquisition task module 20 is used to acquire a target memory statistics task and configure the acquisition mode according to the target memory statistics task. The memory statistics module 30 is used to send memory statistics commands to the proxy nodes according to the collection mode. The proxy nodes execute the memory statistics commands on the corresponding target computing nodes and / or target data nodes to obtain memory statistics data. The memory statistics storage module 40 is used to send the memory statistics data back to the operation and maintenance management platform through the proxy node, and the operation and maintenance management platform stores the memory statistics data in the system tenant; The memory usage analysis module 50 is used to extract memory statistics data for the corresponding time period and node from system tenants, and generate a memory trend chart based on the extracted memory statistics data.
[0055] In one embodiment, the parameter configuration module 10 includes: The instruction configuration unit is used to pre-configure the on / off instructions and the enable duration parameter instructions for the memory diagnostic switch of the target computing node; The instruction transmission unit is used to send the on / off instruction and the enable duration parameter instruction of the memory diagnostic switch to the corresponding agent node; The instruction execution unit is used to execute instructions on the target computing node after the agent node receives the on / off instruction of the memory diagnostic switch and the enable duration parameter instruction; The parameter configuration unit is used to set the status and activation duration of the memory diagnostic switch of the target computing node according to the instructions.
[0056] In one embodiment, the data acquisition task module 20 includes: The task acquisition unit is used to acquire the target memory statistics task; A data acquisition mode unit is used to configure a data acquisition mode according to the target memory statistics task. A timed acquisition unit is used to configure timed acquisition parameters and timed acquisition nodes according to the timed acquisition mode when the acquisition mode is timed acquisition. A real-time acquisition unit is used to configure real-time acquisition nodes according to the real-time acquisition mode when the acquisition mode is real-time acquisition.
[0057] In one embodiment, the memory statistics module 30 includes: The command issuing unit is used to issue the memory statistics command to the agent node according to the collection mode; The command analysis unit is used to analyze the memory statistics command by the agent node to obtain the collection node and the collection data range; A target computing node unit is configured to, if the acquisition node is a target computing node, have the proxy node perform an acquisition operation on the target computing node according to the acquisition data range to obtain computing node memory statistics. The target data node unit is used to, if the acquisition node is a target data node, call the memory statistics module of the target data node to perform the acquisition operation according to the acquisition data range, and obtain the memory statistics data of the data node. The data merging unit is used to merge the computing node memory statistics and the data node memory statistics to obtain memory statistics.
[0058] In one embodiment, the target computing node unit includes: The target computing node accumulates the memory allocation and deallocation values of the threads based on two preset statistical items; Calculate the absolute value of the difference between the memory allocation value and the memory deallocation value; The current memory usage of each statistical item in the preset two-level statistical items is calculated based on the absolute value of the difference; Sort the current memory usage of each statistical item according to the preset sorting rules; The sorted memory usage is filtered according to preset filtering rules, and the filtered memory usage data is merged to obtain the memory statistics of the computing nodes.
[0059] In one embodiment, the target data node unit includes: The proxy node sends a memory statistics trigger command to the target data node according to the range of collected data; When the target data node receives a memory statistics trigger instruction, the memory statistics module is invoked; The memory statistics module responds to the memory statistics trigger command and performs a collection operation according to the data collection range to obtain the memory statistics data of the data nodes.
[0060] In one embodiment, the dynamic switch setting module further includes: The switch configuration unit is used to configure the dynamic activation switch of the memory statistics module, wherein the memory statistics module of the target compute node is off by default, and the memory statistics module of the target data node is on by default; A switch adjustment unit is used to adjust the state of the dynamically active switch in real time through the operation and maintenance management platform. The switch activation unit is used to enable memory statistics for the target computing node according to preset two-level statistical items when the dynamic activation switch of the target computing node is adjusted to the on state. The switch-off unit is used to stop memory statistics and release statistics-related resources on the target computing node when the dynamic activation switch of the target computing node is adjusted to the off state; The duration setting unit is used to automatically switch the dynamic activation switch to the off state when the memory statistics module of the target computing node is in the on state and the preset activation duration is reached, so that the target computing node stops memory statistics.
[0061] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external user terminals via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a distributed database memory analysis method on the server side.
[0062] In one embodiment, a computer device is provided, which may be a user terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a distributed database memory analysis method on the user side. In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Pre-configure the status and duration of the memory diagnostic switch on the target compute node; Obtain the target memory statistics task, and configure the collection mode according to the target memory statistics task; According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data. The proxy node transmits the memory statistics data back to the operation and maintenance management platform, which then stores the memory statistics data in the system tenant. Extract memory statistics data for the corresponding time period and node from the system tenant, and generate a memory trend chart based on the extracted memory statistics data.
[0063] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Pre-configure the status and duration of the memory diagnostic switch on the target compute node; Obtain the target memory statistics task, and configure the collection mode according to the target memory statistics task; According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data. The proxy node transmits the memory statistics data back to the operation and maintenance management platform, which then stores the memory statistics data in the system tenant. Extract memory statistics data for the corresponding time period and node from the system tenant, and generate a memory trend chart based on the extracted memory statistics data.
[0064] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0065] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0066] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0067] It should be noted that if any software tools or components not belonging to this company appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A distributed database memory analysis method, characterized in that, Includes the following steps: Pre-configure the status and duration of the memory diagnostic switch on the target compute node; Obtain the target memory statistics task, and configure the collection mode according to the target memory statistics task; According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data. The proxy node transmits the memory statistics data back to the operation and maintenance management platform, which then stores the memory statistics data in the system tenant. Extract memory statistics data for the corresponding time period and node from the system tenant, and generate a memory trend chart based on the extracted memory statistics data.
2. The distributed database memory analysis method as described in claim 1, characterized in that, The pre-configured memory diagnostic switch status and activation duration for the target computing node include: Pre-configure the on / off instructions and enable duration parameters for the memory diagnostic switch of the target compute node; Send the on / off command and the enable duration parameter command of the memory diagnostic switch to the corresponding agent node; After receiving the on / off command and the enable duration parameter command for the memory diagnostic switch, the proxy node executes the command on the target computing node. The instructions set the status and duration of the memory diagnostic switch on the target computing node.
3. The distributed database memory analysis method as described in claim 1, characterized in that, The task of acquiring target memory statistics, which configures the collection mode according to the target memory statistics task, includes: Obtain target memory statistics task; Configure the collection mode according to the target memory statistics task; If the acquisition mode is timed acquisition, configure the timed acquisition parameters and timed acquisition nodes according to the timed acquisition mode; If the acquisition mode is real-time acquisition, configure the real-time acquisition node according to the real-time acquisition mode.
4. The distributed database memory analysis method as described in claim 1, characterized in that, According to the acquisition mode, the memory statistics command is sent to the proxy node. The proxy node executes the memory statistics command on the corresponding target computing node and / or target data node to obtain memory statistics data, including: The memory statistics command is sent to the agent node according to the collection mode; The proxy node analyzes the memory statistics command to obtain the collection node and the collection data range; If the collection node is the target computing node, the proxy node performs a collection operation on the target computing node according to the collection data range to obtain the computing node memory statistics. If the acquisition node is the target data node, the proxy node calls the memory statistics module of the target data node to perform the acquisition operation according to the acquisition data range, and obtains the memory statistics data of the data node; The memory statistics of the compute nodes and the memory statistics of the data nodes are combined to obtain the memory statistics.
5. The distributed database memory analysis method as described in claim 4, characterized in that, If the data collection node is the target computing node, then the proxy node performs a data collection operation on the target computing node according to the data collection range to obtain computing node memory statistics, including: The target computing node accumulates the memory allocation and deallocation values of the threads based on two preset statistical items; Calculate the absolute value of the difference between the memory allocation value and the memory deallocation value; The current memory usage of each statistical item in the preset two-level statistical items is calculated based on the absolute value of the difference; Sort the current memory usage of each statistical item according to the preset sorting rules; The sorted memory usage is filtered according to preset filtering rules, and the filtered memory usage data is merged to obtain the memory statistics of the computing nodes.
6. The distributed database memory analysis method as described in claim 4, characterized in that, If the acquisition node is a target data node, the proxy node calls the memory statistics module of the target data node to perform the acquisition operation according to the acquisition data range, and obtains the data node memory statistics data, including: The proxy node sends a memory statistics trigger command to the target data node according to the range of collected data; When the target data node receives a memory statistics trigger instruction, the memory statistics module is invoked; The memory statistics module responds to the memory statistics trigger command and performs a collection operation according to the data collection range to obtain the memory statistics data of the data nodes.
7. The distributed database memory analysis method as described in claim 1, characterized in that, Also includes: Configure the dynamic activation switch for the memory statistics module, where the memory statistics module for the target compute node is off by default, and the memory statistics module for the target data node is on by default; The status of the dynamically active switch can be adjusted in real time through the operation and maintenance management platform. When the dynamic activation switch of the target computing node is turned on, the target computing node starts memory statistics according to the preset two-level statistical items; When the dynamic activation switch of the target compute node is turned off, the target compute node stops memory statistics and releases statistics-related resources; When the memory statistics module of the target computing node is in the enabled state and reaches the preset activation time, the dynamic activation switch automatically switches to the disabled state, causing the target computing node to stop memory statistics.
8. A distributed database memory analysis device, characterized in that, The distributed database memory analysis device includes: The parameter configuration module is used to pre-set the status and activation duration of the memory diagnostic switch on the target computing node; The data acquisition task module is used to acquire target memory statistics tasks and configure the acquisition mode according to the target memory statistics tasks. The memory statistics module is used to send memory statistics commands to the agent nodes according to the collection mode. The agent nodes execute the memory statistics commands on the corresponding target computing nodes and / or target data nodes to obtain memory statistics data. The memory statistics storage module is used to send the memory statistics data back to the operation and maintenance management platform through the proxy node, and the operation and maintenance management platform stores the memory statistics data in the system tenant; The memory usage analysis module is used to extract memory statistics data for the corresponding time period and node from system tenants, and generate memory trend charts based on the extracted memory statistics data.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a distributed database memory analysis program stored in the memory and executable on the processor. When executed by the processor, the distributed database memory analysis program implements the steps of the distributed database memory analysis method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a distributed database memory analysis program, which, when executed by a processor, implements the steps of the distributed database memory analysis method as described in any one of claims 1-7.