Performance monitoring method, system and terminal based on open source gap system and eBPF technology
By using eBPF technology to develop performance monitoring tools in the open source Hongmeng system, the problems of incomplete performance monitoring, insufficient real-time and insufficient analysis depth in the existing technology are solved, and comprehensive, real-time and in-depth performance monitoring and analysis of the open source Hongmeng system are achieved, improving system performance and user experience.
Patent Information
- Application Number
- CN202411798483.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-18
AI Technical Summary
The existing technology cannot achieve comprehensive performance monitoring of open source Hongmeng system kernel and user-mode applications, and there are problems such as incomplete monitoring, insufficient real-timeness, and insufficient analysis depth.
The performance monitoring method based on open source Hongmeng system and eBPF technology is adopted, and performance data is collected by developing eBPF programs, combined with the characteristics of open source Hongmeng system for in-depth analysis, providing real-time display and query functions, and compatibility testing is carried out to ensure the universality of the tool.
It realizes comprehensive, real-time and in-depth performance monitoring and analysis of the open source Hongmeng system, helping developers quickly locate performance bottlenecks and provide optimization suggestions to improve system performance and user experience.
Smart Images

Figure CN119847886A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of operating system performance testing and optimization technology, and in particular to the development of a performance testing tool combining the open source Hongmeng system (OpenHarmony) and the eBPF (extended Berkeley Packet Filter) technology, and more particularly to a performance monitoring method, system, terminal and computer-readable storage medium based on the open source Hongmeng system and the eBPF technology. Background Art
[0002] System indicators include: 1. CPU usage: This is an important indicator to measure the CPU resource usage of the system or application, which is crucial for performance monitoring; 2. Memory usage: It reflects the memory resources occupied by the system or application during operation, which plays an important role in evaluating the system's memory usage efficiency and potential performance bottlenecks; 3. Disk I / O: The performance of disk input and output operations, including read and write speeds and response times, has a direct impact on the overall performance of the system; 4. Network throughput: An indicator to measure the network data transmission capacity, reflecting the system's performance when processing network communications. These system indicators are often monitored by traditional performance testing tools, but traditional performance testing tools can often only monitor limited system indicators, and it is difficult to fully reflect the overall performance status of the open source Hongmeng system. In other words, the existing tools have problems such as incomplete monitoring in these aspects, lack of real-time performance, and insufficient analysis depth.
[0003] Existing performance testing tools have delays in performance data collection and display, and cannot reflect system performance changes in real time. The reasons for the delay may include the following: 1. Data processing mechanism: Traditional performance testing tools may use batch processing to collect and summarize data, which will cause delays between data processing and display; 2. System resource limitations: If the performance testing tool runs in a resource-constrained environment, such as insufficient memory or excessive CPU load, it may cause data collection and processing to slow down; 3. Software architecture issues: Some performance testing tools may use a multi-layer architecture, and data needs to be processed and forwarded at multiple levels, which increases the time it takes for data to reach the user interface; 4. Hardware 1. Hardware limitations: In some cases, limitations of the hardware itself (such as disk I / O speed, network bandwidth) may cause delays in data collection and transmission; 2. Sampling frequency: If the sampling frequency of the performance testing tool is not high enough, it may not be able to capture instantaneous changes in system performance in real time; 3. Synchronization issues: In a multi-threaded or multi-process environment, data synchronization may introduce additional delays; 4. User interface refresh: The refresh rate of the user interface may not keep up with the data collection speed, causing the data seen by the user to always lag behind the actual collected data; 5. Data aggregation and calculation: Before display, the tool may need to aggregate and calculate the raw data. If these operations are not efficient enough, they will also cause delays.
[0004] In addition, there is insufficient analysis depth: there is a lack of in-depth performance analysis methods, making it difficult to locate performance bottlenecks and optimization points; compatibility challenges: different versions of the open source Hongmeng system may differ, and existing tools are difficult to ensure full support for all versions.
[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0006] The main purpose of the present invention is to provide a performance monitoring method, system, terminal and computer-readable storage medium based on the open source Hongmeng system and eBPF technology, aiming to solve the problem that the existing technology cannot achieve comprehensive performance monitoring of the open source Hongmeng system kernel and user-mode applications.
[0007] To achieve the above object, the present invention provides a performance monitoring method based on the open source Hongmeng system and eBPF technology, and the performance monitoring method based on the open source Hongmeng system and eBPF technology comprises the following steps:
[0008] Analyze the performance monitoring requirements of the open source Hongmeng system, and determine the functional objectives and performance indicators of the performance testing tool based on the performance monitoring requirements;
[0009] Develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function;
[0010] In combination with the characteristics of the open source Hongmeng system, the performance data is deeply analyzed to obtain performance data analysis results, and optimization suggestions for resource allocation and scheduling are put forward based on the performance data analysis results;
[0011] Perform compatibility testing on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility testing result, and deploy the final version of the performance testing tool to the target environment.
[0012] Optionally, in the performance monitoring method based on the open source Hongmeng system and eBPF technology, the performance monitoring requirements include: comprehensive requirements, real-time requirements, accuracy requirements, in-depth analysis requirements and user-mode application monitoring requirements;
[0013] The functional objectives include: comprehensive monitoring, real-time monitoring, in-depth analysis and compatibility support;
[0014] The performance indicators include: performance indicators corresponding to comprehensive monitoring, performance indicators corresponding to real-time monitoring, performance indicators corresponding to in-depth analysis, and performance indicators corresponding to compatibility support.
[0015] Optionally, the performance monitoring method based on the open source Hongmeng system and eBPF technology, wherein the performance data includes: CPU usage, memory usage, disk I / O, network throughput, system calls, process and thread information, and kernel events.
[0016] Optionally, the performance monitoring method based on the open source Hongmeng system and eBPF technology, wherein the corresponding eBPF program is developed according to the performance monitoring requirements, and then further includes:
[0017] Testing and verifying the eBPF program;
[0018] The tests include unit testing, integration testing, functional testing, performance testing, stability testing and compatibility testing;
[0019] The unit test is used to perform unit testing on each eBPF program to ensure that each eBPF program correctly collects predetermined performance data;
[0020] The integration test is used to verify the completeness and accuracy of performance data collection;
[0021] The functional test is used to verify whether the user interface can correctly display performance data and support query functions;
[0022] The performance test is used to test the real-time performance of data collection;
[0023] The stability test is used to test the stability of the tool under high load conditions;
[0024] The compatibility test is used to test the compatibility of the tool under different hardware configurations and environments;
[0025] The verification steps include:
[0026] Develop a test plan and clarify test objectives and test cases;
[0027] Execute test cases according to the test plan and record test results;
[0028] Analyze test results to determine if there are any test cases that have failed or do not meet expectations. For failed test cases, diagnose the cause of the problem and fix it. After fixing the problem, re-execute the relevant test cases to ensure that the problem has been resolved and no new problems have been introduced.
[0029] Perform user acceptance testing to verify that the tool meets actual usage requirements.
[0030] Optionally, the performance monitoring method based on the open source Hongmeng system and eBPF technology, wherein the features of the open source Hongmeng system include: microkernel architecture, distributed capabilities, lightweight and scalability, real-time and compatibility;
[0031] The in-depth analysis of the performance data specifically includes:
[0032] Preprocessing the performance data to obtain target performance data, wherein the preprocessing includes data cleaning and normalization processing, wherein the data cleaning is used to remove invalid or erroneous data points, and the normalization processing is used to convert data of different indicators into a unified metric standard;
[0033] Perform performance indicator correlation analysis on the target performance data, analyze the relationship between CPU usage, memory usage, disk I / O and network throughput, identify mutual influences, and use time series analysis to observe the change trend of performance indicators over time;
[0034] The target performance data is bottlenecked, and the key factors affecting the performance are found using statistical analysis methods. In combination with the characteristics of the microkernel architecture, the kernel state and user state performance data are analyzed to locate possible bottlenecks.
[0035] Perform distributed performance analysis on the target performance data, analyze communication delays and data synchronization issues in distributed computing, and evaluate the efficiency and fairness of distributed task scheduling algorithms;
[0036] Perform real-time analysis on the target performance data, monitor and analyze the system's response time and interrupt processing time to ensure that real-time requirements are met, and analyze the system's real-time performance under different loads;
[0037] Provide system resource optimization suggestions for the target performance data, propose optimization suggestions for resource allocation and scheduling based on the performance data analysis results, and provide customized performance optimization strategies for specific hardware platforms;
[0038] Use charts and dashboards to intuitively display performance data and analysis results, and provide interactive query functions for developers to explore performance data in depth.
[0039] Optionally, in the performance monitoring method based on the open source Hongmeng system and eBPF technology, the compatibility test includes: version difference analysis, functional testing in the test environment, performance data consistency testing, boundary condition testing, exception handling testing, and user interface compatibility testing;
[0040] The version difference analysis is used to analyze the differences in APIs, kernel features, and system calls of different versions of the open source Hongmeng system;
[0041] The functional testing is used to run the performance testing tools in each test environment to verify that all functions work as expected;
[0042] The performance data consistency test is used to compare whether the performance data collected on different versions are consistent, to ensure the accuracy and reliability of the data;
[0043] The boundary condition test is used to test the performance of the performance test tool under the boundary conditions of different versions of the system;
[0044] The exception handling test is used to simulate system exceptions and error conditions and test the exception handling and recovery capabilities of the tool;
[0045] The user interface compatibility test is used to verify whether the display and interaction of the user interface on different versions of the system are normal.
[0046] Optionally, the performance monitoring method based on the open source Hongmeng system and eBPF technology, wherein the compatibility test of the performance testing tool is performed, and the performance testing tool is optimized and adjusted according to the compatibility test result, specifically includes:
[0047] Develop detailed test plans based on different versions of the open source Hongmeng system, including test objectives, test cases, and expected results;
[0048] Develop automated test scripts, execute automated test scripts in various test environments, and collect test results;
[0049] Analyze test results, identify incompatibilities and performance differences, fix identified issues, and after fixing the issues, re-execute test cases to ensure that the issues have been resolved and no new issues have been introduced.
[0050] In addition, to achieve the above purpose, the present invention also provides a performance monitoring system based on the open source Hongmeng system and eBPF technology, wherein the performance monitoring system based on the open source Hongmeng system and eBPF technology includes:
[0051] The requirements analysis module is used to analyze the performance monitoring requirements of the open source Hongmeng system and determine the functional objectives and performance indicators of the performance testing tool based on the performance monitoring requirements;
[0052] A data collection module is used to develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function;
[0053] A data analysis module, which is used to perform in-depth analysis on the performance data in combination with the characteristics of the open source Hongmeng system, obtain performance data analysis results, and propose optimization suggestions for resource allocation and scheduling based on the performance data analysis results;
[0054] The testing and optimization module is used to perform compatibility testing on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility testing results, and deploy the final version of the performance testing tool to the target environment.
[0055] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a performance monitoring program based on the open source Hongmeng system and eBPF technology stored in the memory and run on the processor, and when the performance monitoring program based on the open source Hongmeng system and eBPF technology is executed by the processor, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described above are implemented.
[0056] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a performance monitoring program based on the open source Hongmeng system and eBPF technology, and when the performance monitoring program based on the open source Hongmeng system and eBPF technology is executed by the processor, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described above are implemented.
[0057] In the present invention, the performance monitoring requirements of the open source Hongmeng system are analyzed, and the functional objectives and performance indicators of the performance testing tool are determined according to the performance monitoring requirements; the corresponding eBPF program is developed according to the performance monitoring requirements, and the performance data is collected through the eBPF program, and a user interface is developed to display the collected performance data in real time and provide a query function; in combination with the characteristics of the open source Hongmeng system, the performance data is deeply analyzed to obtain the performance data analysis results, and based on the performance data analysis results, optimization suggestions for resource allocation and scheduling are proposed; the performance testing tool is tested for compatibility, and the performance testing tool is optimized and adjusted according to the compatibility test results, and the final version of the performance testing tool is deployed to the target environment. The performance testing tool based on the open source Hongmeng system and eBPF technology of the present invention can realize comprehensive, real-time, and in-depth performance monitoring and analysis of the open source Hongmeng system, provide strong technical support for developers, and help the performance optimization and upgrade of the open source Hongmeng system. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of a preferred embodiment of the performance monitoring method based on the open source Hongmeng system and eBPF technology of the present invention;
[0059] Figure 2 It is a structural diagram of a preferred embodiment of the performance monitoring system based on the open source Hongmeng system and eBPF technology of the present invention;
[0060] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0062] The performance testing tool of the present invention is designed to improve the performance of the open source Hongmeng system in various application scenarios, including Internet of Things (IoT) devices, smart wearables, smart homes, and vehicle systems. Through accurate performance monitoring and analysis, it helps developers optimize system performance and improve user experience, while providing strong technical support for the expansion and upgrade of the Hongmeng system in the future.
[0063] The performance monitoring method based on the open source Hongmeng system and eBPF technology described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the performance monitoring method based on the open source Hongmeng system and eBPF technology includes the following steps:
[0064] Step S10: Analyze the performance monitoring requirements of the open source Hongmeng system, and determine the functional objectives and performance indicators of the performance testing tool based on the performance monitoring requirements.
[0065] Specifically, the performance monitoring requirements include: comprehensive requirements, real-time requirements, accuracy requirements, in-depth analysis requirements and user-mode application monitoring requirements; performance monitoring requirements include the following aspects: Comprehensive requirements: Not only the basic performance indicators of the operating system need to be monitored, but also specific indicators that can reflect the characteristics of the open source Hongmeng system to ensure the comprehensiveness of monitoring. Real-time requirements: Performance monitoring tools need to be able to collect and display performance data in real time to quickly discover and respond to changes in system performance. Accuracy requirements: The collected performance data needs to be as accurate as possible to reduce errors in order to facilitate accurate analysis and optimization. In-depth analysis requirements: Monitoring tools need to have in-depth analysis capabilities and be able to conduct comprehensive analysis of the collected data to help developers locate performance bottlenecks. User-mode application monitoring requirements: In addition to kernel-level monitoring, it is also necessary to be able to monitor the performance of user-mode applications, including resource usage, response time, etc.
[0066] The following are the specific performance monitoring requirements: CPU monitoring: monitor CPU usage, interrupt frequency, context switching times, etc. Memory monitoring: monitor memory usage, memory usage efficiency, memory leaks, etc. Disk I / O monitoring: monitor disk read and write speed, I / O wait time, I / O queue length, etc. Network monitoring: monitor network throughput, network latency, network error rate, etc. Process and thread monitoring: monitor the creation, destruction, running status, resource usage, etc. of processes and threads. System call monitoring: monitor the frequency, success rate and failure rate of system calls. File system monitoring: monitor the usage, access speed, cache hit rate, etc. of file systems. Kernel event monitoring: monitor kernel events, such as soft interrupts, hard interrupts, scheduling delays, etc. User-mode application performance monitoring: monitor application response time, transaction processing speed, error rate, etc. These requirements will guide the design and development of performance testing tools to ensure that the tools can meet the specific needs of open source Hongmeng system performance monitoring.
[0067] In the context of operating systems, "user-space applications" refer to programs that run in the user space of the operating system (not the kernel space). These programs are usually applications that are directly interacted by the end user, or services that run to support other applications in the user space. Here are some characteristics of user-space applications: Execution environment: User-space applications are executed in the user mode of the operating system, and they do not have direct access to hardware or kernel resources. Permission restrictions: Compared with system services running in kernel mode, user-space applications are subject to more permission restrictions to prevent them from undermining the stability and security of the system. Interactivity: User-space applications are usually interactive, such as text editors, web browsers, games, etc., which provide interfaces and functions to users. Dependencies: User-space applications usually rely on kernel services provided by the operating system, such as file system access, network communication, device drivers, etc. Portability: User-space applications are usually easier to port across different hardware and operating systems because they do not interact directly with the hardware.
[0068] The functional objectives include: comprehensive monitoring, real-time monitoring, in-depth analysis and compatibility support; Comprehensive monitoring: ensure that the tool can monitor all key performance indicators of the open source Hongmeng system. Real-time monitoring: achieve instant collection and display of performance data to quickly identify performance problems. In-depth analysis: provide in-depth data analysis capabilities to help developers identify performance bottlenecks. Compatibility support: ensure that the tool can run on different versions of the open source Hongmeng system with no or minimal adjustments.
[0069] The performance indicators include: performance indicators corresponding to comprehensive monitoring, performance indicators corresponding to real-time monitoring, performance indicators corresponding to in-depth analysis, and performance indicators corresponding to compatibility support. The following are the performance indicators corresponding to the above functional objectives:
[0070] Comprehensive monitoring, requirements: monitor comprehensive system indicators. Performance indicators: CPU usage, load, interrupt frequency. Memory usage, memory leaks, cache hit rate. Disk I / O speed, I / O wait time, I / O queue length. Network throughput, network latency, network error rate. Process and thread status, number of context switches. Number of system calls, success rate.
[0071] Real-time monitoring, requirements: real-time collection and display of performance data. Performance indicators: real-time updated CPU, memory, disk I / O and network indicators. Real-time process and thread activity monitoring. Dynamically updated system call statistics.
[0072] In-depth analysis, requirements: In-depth analysis of performance data to locate bottlenecks. Performance indicators: Time series analysis of performance data. System call stack trace analysis. Correlation analysis between resource usage and performance. Hot code path analysis.
[0073] Compatibility support, requirements: support different versions of the open source Hongmeng system. Performance indicators: confirm the consistency of the tool running on different versions of the system. Support for system version-specific performance indicators. Pass rate of compatibility test cases.
[0074] By clarifying these functional goals and performance indicators, the performance testing tool in the present invention can ensure that the specific needs of the open source Hongmeng system performance monitoring are met, thereby helping developers optimize system performance and improve user experience.
[0075] Step S20: Develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function.
[0076] Specifically, the performance data includes: CPU usage, memory usage, disk I / O, network throughput, system calls, process and thread information, and kernel events. The role of eBPF programs: eBPF programs are designed to run in the operating system kernel space. They can perform complex monitoring and data processing tasks efficiently and safely. These programs can directly access the data structure inside the kernel, so that detailed and accurate information about system performance can be collected. Through the developed eBPF program, the following types of performance data can be collected:
[0077] CPU usage: includes the usage of each CPU core, interrupt processing, context switching, etc. Memory usage: includes overall memory usage, memory usage of each process, cache and buffer usage, etc. Disk I / O: involves the number, size, latency of disk read and write operations, and the length of the I / O queue, etc. Network throughput: includes the amount of data sent and received by the network interface, the rate of network packets, the error rate, etc. System calls: monitor the frequency, success rate and failure rate of system calls, as well as the caller's information. Process and thread information: includes the creation, destruction, running status, resource usage, etc. of processes and threads. Kernel events: kernel-level events such as soft interrupts, hard interrupts, scheduling delays, etc.
[0078] Through this data, eBPF programs can provide in-depth insights into the performance of the open source Hongmeng system, helping developers discover and solve performance problems. Therefore, eBPF programs play a vital role in performance monitoring, making the collection of performance data not only efficient, but also highly real-time and accurate.
[0079] In addition, eBPF programs will be rigorously tested and verified to ensure their correctness and stability. The tests include unit testing, integration testing, functional testing, performance testing, stability testing, and compatibility testing. Unit testing: Unit testing each eBPF program to ensure that they can correctly collect the predetermined performance data. Test the behavior of the program under various normal and abnormal conditions, including boundary conditions, error handling, etc. Integration testing: Integrate the eBPF program with the performance monitoring module to test whether the entire module can work together. Verify the integrity and accuracy of performance data collection to ensure that there is no data loss or error. Functional testing: Test whether the functions of the performance monitoring module meet the design requirements, including data collection, storage, and real-time display. Verify whether the user interface can correctly display performance data and support query functions. Performance testing: Evaluate the impact of the performance monitoring module on system performance to ensure that the collection process itself does not introduce too much overhead. Test the real-time nature of data collection to ensure that it can meet the needs of real-time monitoring. Stability testing: Run the performance monitoring module for a long time to observe whether there are memory leaks, crashes, or other stability issues. Test the stability of the tool under high load to ensure that it can still work properly under pressure. Compatibility testing: Run the performance monitoring module on different versions of the open source Hongmeng system to ensure that it can be properly adapted. Test the compatibility of the tool under different hardware configurations and environments.
[0080] The verification steps include:
[0081] (1) Develop a test plan: clarify the test objectives and test cases, including the expected inputs and outputs.
[0082] (2) Execute the test: execute the test cases according to the test plan and record the test results.
[0083] (3) Result analysis: Analyze the test results to determine whether there are any test cases that failed or did not meet expectations. For failed test cases, diagnose the cause of the problem and fix it.
[0084] (4) Regression testing: After fixing the problem, re-execute the relevant test cases to ensure that the problem has been solved and no new problems have been introduced.
[0085] (5) User acceptance testing: Involve end users in testing to verify whether the tool meets actual usage requirements.
[0086] Through these testing and verification steps, we can ensure that the performance monitoring module (the performance monitoring module is responsible for loading and executing eBPF programs) works as expected, providing developers with reliable open source Hongmeng system performance monitoring capabilities.
[0087] At the same time, a user interface is developed to realize real-time display and query functions of performance data.
[0088] Step S30: Based on the characteristics of the open source Hongmeng system, perform an in-depth analysis of the performance data to obtain performance data analysis results, and based on the performance data analysis results, propose optimization suggestions for resource allocation and scheduling.
[0089] Specifically, the features of the open source Hongmeng system include: microkernel architecture, distributed capabilities, lightweight and scalability, real-time and compatibility; Microkernel architecture: The open source Hongmeng system adopts a microkernel design, which provides higher security and lower resource consumption. Distributed capabilities: The system supports distributed computing and can collaborate seamlessly between multiple devices. Lightweight and scalability: Suitable for a variety of hardware platforms from embedded devices to high-end devices. Real-time: The system provides real-time support and is suitable for application scenarios with high real-time requirements. Compatibility: Supports multiple programming languages and frameworks, which is easy for developers to adapt and migrate.
[0090] The in-depth analysis of the performance data specifically includes:
[0091] (1) Preprocessing the performance data to obtain target performance data, wherein the preprocessing includes data cleaning and normalization processing, wherein the data cleaning is used to remove invalid or erroneous data points, and the normalization processing is used to convert data of different indicators into a unified metric standard.
[0092] (2) Perform performance indicator correlation analysis on the target performance data, analyze the relationship between CPU usage, memory usage, disk I / O and network throughput, identify mutual influence, and use time series analysis to observe the change trend of performance indicators over time.
[0093] (3) The bottleneck of the target performance data is located by using statistical analysis methods, such as principal component analysis (PCA), to find out the key factors affecting the performance. In combination with the characteristics of the microkernel architecture, the kernel state and user state performance data are analyzed to locate possible bottlenecks.
[0094] (4) Perform distributed performance analysis on the target performance data, analyze communication delays and data synchronization issues in distributed computing, and evaluate the efficiency and fairness of distributed task scheduling algorithms.
[0095] (5) Perform real-time analysis on the target performance data, monitor and analyze the system's response time and interrupt processing time to ensure that real-time requirements are met, and analyze the system's real-time performance under different loads.
[0096] (6) Make system resource optimization recommendations for the target performance data. Based on the performance data analysis results, make optimization recommendations for resource allocation and scheduling, and provide customized performance optimization strategies for specific hardware platforms.
[0097] (7) Use charts and dashboards to intuitively display performance data and analysis results, and provide interactive query functions for developers to explore performance data in depth.
[0098] Implementing performance bottleneck location and optimization suggestion functions usually involves the following steps:
[0099] Steps to locate performance bottlenecks:
[0100] Data aggregation and correlation: Aggregate the collected performance data in time series and correlate the relationships between different performance indicators. Use data mining techniques, such as cluster analysis, to identify patterns and anomalies in the data.
[0101] Performance baseline establishment: Determine the performance baseline of the system under normal load. By comparing the current performance data with the baseline, identify data points that deviate from the normal range.
[0102] Bottleneck detection algorithms: Implement algorithms to detect critical paths that may cause performance degradation, such as CPU hot spots, memory leaks, I / O waits, etc. Apply machine learning techniques, such as decision trees or neural networks, to predict and identify performance bottlenecks.
[0103] Real-time monitoring and alerts: Monitor key performance indicators in real time and trigger alerts immediately if an indicator exceeds a preset threshold. Use visualization tools such as heat maps or trend charts to intuitively display the location of performance bottlenecks.
[0104] Optimization suggestion function implementation:
[0105] Bottleneck Analysis Report: Automatically generate a performance bottleneck analysis report that details the location, cause, and impact of the bottleneck. Provides a snapshot of the system status when the bottleneck occurs, including logs, configuration, and resource usage.
[0106] Optimization strategy recommendation: Based on the type of bottleneck, specific optimization strategies are recommended, such as code optimization, resource allocation adjustment, system configuration change, etc. For common performance issues, preset optimization solution templates are provided.
[0107] Simulation and prediction: Simulate the effects of optimization measures without actually changing the system configuration. Use prediction models to estimate the performance improvement after optimization to help developers make decisions.
[0108] Implementation Guide: Provides detailed implementation guides to guide developers on how to implement recommended optimization measures. It includes necessary scripts, commands, and configuration files to simplify the implementation process.
[0109] Tracking and feedback: Track the implementation process of optimization measures and collect feedback data to evaluate the optimization effect. Adjust optimization suggestions based on feedback to form a closed-loop continuous optimization process.
[0110] Through these methods, performance testing tools can not only help developers locate performance bottlenecks, but also provide practical optimization suggestions, thereby effectively improving the performance of the open source Hongmeng system.
[0111] Through the above analysis process, combined with the characteristics of the open source Hongmeng system, a performance analysis module is developed to conduct in-depth analysis of the collected performance data, realize the performance bottleneck positioning and optimization suggestion functions, and help developers quickly find performance optimization points. The performance testing tool can help developers deeply understand the performance of the open source Hongmeng system and provide specific optimization suggestions, thereby improving the overall performance of the system.
[0112] Step S40: perform a compatibility test on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility test result, and deploy the final version of the performance testing tool to the target environment.
[0113] Specifically, the compatibility test includes: version difference analysis, functional testing in the test environment, performance data consistency testing, boundary condition testing, exception handling testing, and user interface compatibility testing. The compatibility test is performed to ensure that the performance testing tool can work properly on different versions of the open source Hongmeng system. The following are some specific compatibility testing methods and steps:
[0114] Compatibility testing methods include:
[0115] Version difference analysis: Analyze the differences in APIs, kernel features, system calls, etc. between different versions of the open source Hongmeng system. Determine the performance monitoring requirements and potential incompatibilities unique to each version.
[0116] Environment construction: Build an independent test environment for each version of the open source Hongmeng system to ensure the accuracy of the test. Configure the corresponding hardware and software resources to simulate real usage scenarios.
[0117] Functional testing in test environments: Run performance testing tools in each test environment to verify that all functions work as expected. Check whether the loading, execution, and data collection of eBPF programs on different versions are normal.
[0118] Performance data consistency test: Compare the performance data collected on different versions to ensure the accuracy and reliability of the data. Verify the stability and repeatability of performance monitoring results.
[0119] Boundary condition testing: Testing the tool's performance under boundary conditions of different versions of the system, such as when system resources are extremely low or extremely high. Check whether the tool can correctly report performance data under extreme conditions.
[0120] Exception handling test: simulate system exceptions and error conditions to test the tool's exception handling and recovery capabilities. Ensure that the tool does not crash when encountering system errors and can provide useful error information.
[0121] User interface compatibility testing: Verify whether the user interface displays and interacts normally on different versions of the system. Ensure that the user interface elements can be displayed correctly under different resolutions and screen sizes.
[0122] Compatibility testing steps:
[0123] Develop a test plan: Develop a detailed test plan based on different versions of the open source Hongmeng system, including test objectives, test cases, expected results, etc.
[0124] Automated test scripts: Develop automated test scripts to reduce manual operation errors and improve testing efficiency.
[0125] Execute tests: Execute automated test scripts in various test environments and collect test results.
[0126] Result Analysis: Analyze test results to identify incompatibilities and performance differences.
[0127] Bug fixing: Fix identified issues to ensure tool compatibility.
[0128] Regression testing: After fixing a problem, re-execute the test cases to ensure that the problem has been resolved and no new problems have been introduced.
[0129] Through these compatibility testing methods and steps, it can be ensured that performance testing tools can provide consistent and reliable services on different versions of the open source Hongmeng system.
[0130] Perform compatibility tests on performance testing tools to ensure that they can flexibly adapt to different versions of the open source Hongmeng system. Make necessary optimizations and adjustments based on the test results to improve the versatility and practicality of the tools.
[0131] Making necessary optimizations and adjustments based on the compatibility test results is a key step to ensure that performance testing tools can run effectively on different versions of the open source Hongmeng system. The following are some specific optimization and adjustment examples and instructions:
[0132] Examples of optimization and tuning:
[0133] Code adjustments:
[0134] Problem: During testing, it was found that a certain eBPF program could not be loaded normally on the old version of the open source Hongmeng system.
[0135] Optimization: After analysis, it was found that the old version of the kernel does not support some eBPF functions. To this end, developers can modify the eBPF program, remove incompatible code or provide alternative implementations to ensure that the program can run on all versions of the system.
[0136] Functional modularity:
[0137] Problem: Some features of the performance testing tool run slowly on certain versions of the system.
[0138] Optimization: Modularize these functions and dynamically load or disable certain modules based on the system version to improve the overall performance of the tool.
[0139] Performance data collection optimization:
[0140] Problem: During testing, it was found that performance data collection was lost under high load conditions.
[0141] Optimization: Increase the data buffer size and optimize the data collection algorithm to ensure accurate data collection even under high load conditions.
[0142] User interface adaptation:
[0143] Issue: The user interface does not display properly on some versions of the system.
[0144] Optimization: Adjust the layout and style of the user interface to ensure correct display on different versions of the system.
[0145] Error handling and logging:
[0146] Issue: During compatibility testing, it was found that the tool crashed in some unusual situations without providing sufficient error information.
[0147] Optimization: Enhanced error handling mechanism and added detailed logging to help developers diagnose and fix problems.
[0148] Specific optimization and adjustment steps:
[0149] Analyze test results: Carefully analyze the test report to identify the specific cause of the incompatibility.
[0150] Develop an optimization plan: Based on the analysis results, develop a specific optimization plan, including the code that needs to be modified, the compatibility checks that need to be added, etc.
[0151] Implement code modifications: Modify the code according to the optimization plan and conduct code review to ensure quality.
[0152] Regression testing: After the modification is completed, regression testing is performed to ensure that the optimization measures have not introduced new problems.
[0153] Documentation update: Update the user manual and development documentation to reflect the optimized tool usage and compatibility description.
[0154] User feedback: Release the optimized tools to some users for trial, collect feedback, and further adjust the optimization measures.
[0155] Through these optimization and adjustment examples and steps, the versatility and practicality of performance testing tools will be improved, thereby better serving the performance monitoring and optimization of the open source Hongmeng system.
[0156] Deploy the performance testing tool to the target environment for actual performance testing and verification. The target environment refers to the specific environment where the performance testing tool needs to be deployed and used, including the following:
[0157] Development environment: The developer's local workstation or server is used to perform performance testing and optimization of the open source Hongmeng system during the development process.
[0158] Test environment: A dedicated test lab that may include multiple hardware configurations and operating system versions to simulate different user usage scenarios and load conditions.
[0159] Pre-production environment: An environment similar to the production environment, but used for final testing and validation to ensure that the performance testing tools work as expected before actual deployment.
[0160] Production environment: The environment where the open source Hongmeng system is actually running, including IoT devices, smart wearable devices, smart home systems, in-vehicle systems, etc. In these environments, performance testing tools are used to monitor and optimize the actual user experience.
[0161] Specific target environments may include the following:
[0162] Internet of Things (IoT) devices: including smart sensors, gateways, controllers, etc. These devices are usually resource-constrained and have special requirements for the efficiency and compatibility of performance monitoring tools.
[0163] Smart wearable devices: such as smart watches, health monitoring devices, etc. These devices have high requirements for power consumption and real-time performance monitoring.
[0164] Smart home system: including home automation control center, smart appliances, etc. These systems need to ensure stability and response speed.
[0165] In-vehicle systems: such as car infotainment systems, autonomous driving systems, etc. These systems have extremely high requirements for performance and real-time performance.
[0166] When deploying performance testing tools, you need to consider factors such as the target environment's hardware specifications, operating system version, network configuration, and security requirements to ensure that the tools can be correctly installed, configured, and run effectively.
[0167] Provide detailed user manuals and training materials to help developers quickly get started with performance testing tools.
[0168] The present invention designs and implements corresponding eBPF programs for the key performance indicators of the open source Hongmeng system (such as CPU utilization, memory usage, disk I / O, network throughput, etc.) to achieve accurate performance data collection; utilizes the real-time nature of eBPF to achieve instant collection and display of performance data, helping developers to quickly respond to changes in system performance; combines the characteristics of the open source Hongmeng system to develop a performance analysis module, conducts in-depth analysis of the collected performance data, and locates performance bottlenecks and optimization points; through modular design, ensures that the performance testing tool can flexibly adapt to different versions of the open source Hongmeng system, thereby improving the versatility and practicality of the tool.
[0169] The performance testing tool based on the open source Hongmeng system and eBPF technology proposed in the present invention can realize comprehensive, real-time and in-depth performance monitoring and analysis of the open source Hongmeng system, provide strong technical support for developers, and help optimize and upgrade the performance of the open source Hongmeng system.
[0170] Beneficial effects of the present invention:
[0171] (1) Comprehensive performance monitoring: Comprehensive performance monitoring of the open source Hongmeng system kernel and user-mode applications to improve the accuracy and comprehensiveness of monitoring.
[0172] (2) Real-time performance feedback: Provides real-time performance data display to help developers quickly respond to system performance changes and improve problem handling efficiency.
[0173] (3) Deep performance analysis: Through deep performance analysis, developers can accurately locate performance bottlenecks and optimization points, thereby improving system performance optimization effects.
[0174] (4) Good compatibility: Ensure that the performance testing tools can flexibly adapt to different versions of the open source Hongmeng system to improve the versatility and practicality of the tools.
[0175] Furthermore, if Figure 2 As shown, based on the above-mentioned performance monitoring method based on the open source Hongmeng system and eBPF technology, the present invention also provides a performance monitoring system based on the open source Hongmeng system and eBPF technology, wherein the performance monitoring system based on the open source Hongmeng system and eBPF technology includes:
[0176] The requirements analysis module 51 is used to analyze the performance monitoring requirements of the open source Hongmeng system and determine the functional objectives and performance indicators of the performance testing tool according to the performance monitoring requirements;
[0177] A data collection module 52 is used to develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function;
[0178] The data analysis module 53 is used to perform in-depth analysis on the performance data in combination with the characteristics of the open source Hongmeng system to obtain performance data analysis results, and to propose optimization suggestions for resource allocation and scheduling based on the performance data analysis results;
[0179] The testing and optimization module 54 is used to perform compatibility testing on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility testing result, and deploy the final version of the performance testing tool to the target environment.
[0180] Furthermore, if Figure 3 As shown, based on the above-mentioned performance monitoring method and system based on the open source Hongmeng system and eBPF technology, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0181] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, a performance monitoring program 40 based on an open source Hongmeng system and eBPF technology is stored on the memory 20, and the performance monitoring program 40 based on the open source Hongmeng system and eBPF technology can be executed by the processor 10, thereby realizing the performance monitoring method based on the open source Hongmeng system and eBPF technology in this application.
[0182] In some embodiments, the processor 10 can be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the performance monitoring method based on the open source Hongmeng system and eBPF technology.
[0183] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0184] In one embodiment, when the processor 10 executes the performance monitoring program 40 based on the open source Hongmeng system and eBPF technology in the memory 20, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described above are implemented.
[0185] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a performance monitoring program based on the open source Hongmeng system and eBPF technology, and when the performance monitoring program based on the open source Hongmeng system and eBPF technology is executed by a processor, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described above are implemented.
[0186] In summary, the present invention provides a performance monitoring method, system, terminal and computer-readable storage medium based on an open source Hongmeng system and eBPF technology, the method comprising: analyzing the performance monitoring requirements of the open source Hongmeng system, determining the functional objectives and performance indicators of the performance testing tool according to the performance monitoring requirements; developing a corresponding eBPF program according to the performance monitoring requirements, and collecting performance data through the eBPF program, developing a user interface, and displaying the collected performance data in real time and providing a query function; combining the characteristics of the open source Hongmeng system, deeply analyzing the performance data, obtaining the performance data analysis results, and proposing optimization suggestions for resource allocation and scheduling based on the performance data analysis results; performing compatibility testing on the performance testing tool, optimizing and adjusting the performance testing tool according to the compatibility test results, and deploying the final version of the performance testing tool to the target environment. The performance testing tool based on the open source Hongmeng system and eBPF technology of the present invention can realize comprehensive, real-time and in-depth performance monitoring and analysis of the open source Hongmeng system, provide strong technical support for developers, and help the performance optimization and upgrade of the open source Hongmeng system.
[0187] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or terminal including the element.
[0188] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0189] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A performance monitoring method based on the open source Hongmeng system and eBPF technology, characterized in that: The performance monitoring method based on the open source Hongmeng system and eBPF technology includes: Analyze the performance monitoring requirements of the open source Hongmeng system, and determine the functional objectives and performance indicators of the performance testing tool based on the performance monitoring requirements; Develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function; In combination with the characteristics of the open source Hongmeng system, the performance data is deeply analyzed to obtain performance data analysis results, and optimization suggestions for resource allocation and scheduling are put forward based on the performance data analysis results; Perform compatibility testing on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility testing result, and deploy the final version of the performance testing tool to the target environment.
2. According to claim 1, the performance monitoring method based on the open source Hongmeng system and eBPF technology is characterized in that: The performance monitoring requirements include: comprehensive requirements, real-time requirements, accuracy requirements, in-depth analysis requirements and user-mode application monitoring requirements; The functional objectives include: comprehensive monitoring, real-time monitoring, in-depth analysis and compatibility support; The performance indicators include: performance indicators corresponding to comprehensive monitoring, performance indicators corresponding to real-time monitoring, performance indicators corresponding to in-depth analysis, and performance indicators corresponding to compatibility support.
3. According to claim 1, the performance monitoring method based on the open source Hongmeng system and eBPF technology is characterized in that: The performance data includes: CPU usage, memory usage, disk I / O, network throughput, system calls, process and thread information, and kernel events.
4. The performance monitoring method based on the open source Hongmeng system and eBPF technology according to claim 1 is characterized in that: The developing of the corresponding eBPF program according to the performance monitoring requirements further includes: Testing and verifying the eBPF program; The tests include unit testing, integration testing, functional testing, performance testing, stability testing and compatibility testing; The unit test is used to perform unit testing on each eBPF program to ensure that each eBPF program correctly collects predetermined performance data; The integration test is used to verify the completeness and accuracy of performance data collection; The functional test is used to verify whether the user interface can correctly display performance data and support query functions; The performance test is used to test the real-time performance of data collection; The stability test is used to test the stability of the tool under high load conditions; The compatibility test is used to test the compatibility of the tool under different hardware configurations and environments; The verification steps include: Develop a test plan and clarify test objectives and test cases; Execute test cases according to the test plan and record test results; Analyze test results to determine if there are any test cases that have failed or do not meet expectations. For failed test cases, diagnose the cause of the problem and fix it. After fixing the problem, re-execute the relevant test cases to ensure that the problem has been resolved and no new problems have been introduced. Perform user acceptance testing to verify that the tool meets actual usage requirements.
5. According to claim 1, the performance monitoring method based on the open source Hongmeng system and eBPF technology is characterized in that: The features of the open source Hongmeng system include: microkernel architecture, distributed capabilities, lightweight and scalability, real-time and compatibility; The in-depth analysis of the performance data specifically includes: Preprocessing the performance data to obtain target performance data, wherein the preprocessing includes data cleaning and normalization processing, wherein the data cleaning is used to remove invalid or erroneous data points, and the normalization processing is used to convert data of different indicators into a unified metric standard; Perform performance indicator correlation analysis on the target performance data, analyze the relationship between CPU usage, memory usage, disk I / O and network throughput, identify mutual influences, and use time series analysis to observe the change trend of performance indicators over time; The target performance data is bottlenecked, and the key factors affecting the performance are found using statistical analysis methods. In combination with the characteristics of the microkernel architecture, the kernel state and user state performance data are analyzed to locate possible bottlenecks. Perform distributed performance analysis on the target performance data, analyze communication delays and data synchronization issues in distributed computing, and evaluate the efficiency and fairness of distributed task scheduling algorithms; Perform real-time analysis on the target performance data, monitor and analyze the system's response time and interrupt processing time to ensure that real-time requirements are met, and analyze the system's real-time performance under different loads; Provide system resource optimization suggestions for the target performance data, propose optimization suggestions for resource allocation and scheduling based on the performance data analysis results, and provide customized performance optimization strategies for specific hardware platforms; Use charts and dashboards to intuitively display performance data and analysis results, and provide interactive query functions for developers to explore performance data in depth.
6. The performance monitoring method based on the open source Hongmeng system and eBPF technology according to claim 1 is characterized in that: The compatibility test includes: version difference analysis, functional testing in the test environment, performance data consistency testing, boundary condition testing, exception handling testing, and user interface compatibility testing; The version difference analysis is used to analyze the differences in APIs, kernel features, and system calls of different versions of the open source Hongmeng system; The functional testing is used to run the performance testing tools in each test environment to verify that all functions work as expected; The performance data consistency test is used to compare whether the performance data collected on different versions are consistent, to ensure the accuracy and reliability of the data; The boundary condition test is used to test the performance of the performance test tool under the boundary conditions of different versions of the system; The exception handling test is used to simulate system exceptions and error conditions and test the exception handling and recovery capabilities of the tool; The user interface compatibility test is used to verify whether the display and interaction of the user interface on different versions of the system are normal.
7. The performance monitoring method based on the open source Hongmeng system and eBPF technology according to claim 1 is characterized in that: The performing compatibility test on the performance testing tool and optimizing and adjusting the performance testing tool according to the compatibility test result specifically includes: Develop detailed test plans based on different versions of the open source Hongmeng system, including test objectives, test cases, and expected results; Develop automated test scripts, execute automated test scripts in various test environments, and collect test results; Analyze test results, identify incompatibilities and performance differences, fix identified issues, and after fixing the issues, re-execute test cases to ensure that the issues have been resolved and no new issues have been introduced.
8. A performance monitoring system based on the open source Hongmeng system and eBPF technology, characterized in that: The performance monitoring system based on the open source Hongmeng system and eBPF technology includes: The requirements analysis module is used to analyze the performance monitoring requirements of the open source Hongmeng system and determine the functional objectives and performance indicators of the performance testing tool based on the performance monitoring requirements; A data collection module is used to develop a corresponding eBPF program according to the performance monitoring requirements, collect performance data through the eBPF program, develop a user interface, display the collected performance data in real time and provide a query function; A data analysis module, which is used to perform in-depth analysis on the performance data in combination with the characteristics of the open source Hongmeng system, obtain performance data analysis results, and propose optimization suggestions for resource allocation and scheduling based on the performance data analysis results; The testing and optimization module is used to perform compatibility testing on the performance testing tool, optimize and adjust the performance testing tool according to the compatibility testing results, and deploy the final version of the performance testing tool to the target environment.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a performance monitoring program based on the open source Hongmeng system and eBPF technology stored in the memory and executable on the processor. When the performance monitoring program based on the open source Hongmeng system and eBPF technology is executed by the processor, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a performance monitoring program based on the open source Hongmeng system and eBPF technology. When the performance monitoring program based on the open source Hongmeng system and eBPF technology is executed by the processor, the steps of the performance monitoring method based on the open source Hongmeng system and eBPF technology as described in any one of claims 1-7 are implemented.
Citation Information
Cited By
Compatibility testing method and system based on application program of swan Mongolia
CN121722672A