A Ceph cache system performance optimization method based on persistent memory
By introducing a persistent memory cache layer in the Ceph storage system and using genetic algorithms to optimize parameters, the performance bottleneck problem of the Ceph storage system during high-speed data reading and writing is solved, achieving higher read and write performance and data reliability.
Patent Information
- Application Number
- CN202411585118.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-07
AI Technical Summary
When the Ceph storage system is built using ordinary HDD hard drives, data storage performance is slow, especially when there is a bottleneck problem during high-speed data reading and writing. Even after using SSD as cache, it still cannot meet the high-speed reading and writing requirements. Reasonable parameter optimization is needed to improve system performance.
By using persistent memory as the cache layer, dynamically adjusting cache size and other parameters through parameter optimization and genetic algorithms, and combining performance monitoring feedback, we can optimize the configuration parameters of the Ceph storage system and ultimately obtain the optimal performance parameter combination.
It significantly improves the read and write performance of the Ceph storage system, provides higher data reliability and resource utilization, and ensures that the system maintains efficient and stable operation under various loads.
Smart Images

Figure CN119473151B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of distributed storage optimization technology, and in particular relates to a distributed storage system optimized by persistent memory devices. Background Art
[0002] Distributed storage systems, as reliable solutions, are widely used in massive data storage. The Ceph distributed storage system is one such system, and performance requirements are increasing. Parameter tuning, as an effective performance optimization method, has also garnered widespread attention.
[0003] Persistent memory is a non-volatile memory technology that retains data even in the event of a power outage. By optimizing data storage, metadata management, and logging, persistent memory can significantly improve storage system performance, particularly in scenarios with frequent writes and high I / O loads, increasing storage system responsiveness and reliability.
[0004] Persistent memory, a non-volatile storage technology, offers similar persistence to traditional disks and access speeds similar to RAM. It can be configured as a block device or a memory-mapped device. In Ceph cache optimization scenarios, persistent memory can be used as an efficient and reliable storage medium.
[0005] Ceph storage systems generally use ordinary HDD mechanical hard disks as data disks. When faced with high-speed data storage, the storage system is inefficient in processing a large number of high-speed read and write requests due to the read and write limitations of HDD mechanical hard disks. Even with SSD acceleration, data read and write bottlenecks still exist under a large number of concurrent read and write requests.
[0006] The Ceph storage system uses SSDs as the storage system cache. When faced with high-speed data read and write processing, it may not be able to meet the high-speed read and write requirements. At the same time, after using the cache settings, reasonable configuration parameter optimization is required to improve the overall system performance. Summary of the Invention
[0007] To solve the above problems, the present invention addresses the slow data storage performance of storage systems built with ordinary HDD hard drives. It utilizes the high bandwidth, high throughput and data persistence characteristics of persistent memory to accelerate data caching, and then comprehensively optimizes the storage system parameters after using persistent memory devices to improve the overall performance of the Ceph storage system.
[0008] The technical solution of the present invention is:
[0009] A method for optimizing the performance of a Ceph cache system based on persistent memory is provided. The Ceph storage system based on persistent memory adjusts cache and persistent memory-related parameter configurations through a parameter optimization system, and uses performance monitoring to feedback performance data to complete the tuning of the configuration parameters and ultimately obtain the optimal performance parameter combination. The method includes the following steps:
[0010] Step S1: Configure a persistent memory device.
[0011] Configure the persistent memory device as a file system. Use the libpmem library to mount the persistent memory device directly as a file system.
[0012] Step S2: Configure Ceph OSD.
[0013] Specify the persistent memory device as the cache device in the Ceph configuration file, enable the relevant cache options in ceph.conf and keep the default values; create the OSD and configure the cache layer using the ceph command;
[0014] Step S3: monitor performance and perform sampling to generate a sample set;
[0015] After deployment, Ceph performance metrics are continuously monitored, recording the initial default values of Ceph storage system cache parameters and the Ceph cluster performance metrics under this configuration. The open-source monitoring and alerting tool Prometheus is used to collect and monitor Ceph cluster metrics. The open-source data visualization tool Grafana is connected to the Prometheus data source to visualize the collected and monitored results. The displayed monitoring metrics include Ceph cluster status, read and write performance metrics, component count, PGs, and OSD information.
[0016] Step S4, dynamic adjustment of parameter optimization system;
[0017] Based on a sample set of parameter configuration values and corresponding monitoring results, a genetic algorithm (GA) model was established, and the GA was used to dynamically adjust cache size and other parameters. The cluster management tool Ansible was used to apply the parameter configuration combinations generated during the GA execution process to obtain system load and IOPs performance indicators, which were then optimized using the GA.
[0018] Step S5: testing and verification;
[0019] Before actual deployment, conduct detailed performance testing and verification; use FIO tools to simulate load, test performance bottlenecks, and verify the effectiveness of parameter tuning;
[0020] Open the fio configuration file, set the read / write mode rw parameter, and run the fio. / write.fio command to run the fio test on the OSD node to obtain the iops performance results of the current Ceph system and verify whether the tuning parameters are effective.
[0021] Furthermore, the specific method for generating the sample set in step S3 is:
[0022] Step S3.1: For the relevant parameters of the Ceph storage system cache based on persistent memory, use the random function to randomly select values within a reasonable and effective range according to their parameter type and value range. The target tuning parameters are: osd_map_cache_size, cache-mode, hit_set_type, hit_set_count, hit_set_period, target_max_bytes, target_max_objects, cache_target_dirty_ratio, cache_target_dirty_high_ratio, cache_target_full_ratio, osd_journal_size, and compression_mode.
[0023] Step S3.2: Apply the default values of the target tuning parameters to the Ceph cluster, test the corresponding system performance, and collect the performance monitoring results (iops) through the monitoring tool. i ;
[0024] Step S3.3: Set the parameter configuration value set {conf1, conf2, ..., conf 12} i and the corresponding performance monitoring results iops i Combination, constitute a sample data item ({conf1, conf2, ..., conf 12} i ,iops i ), through loops S3.1 and S3.2, when the number of collected sample data items reaches a preset value, a sample set for constructing a performance tuning model of the Ceph cache system based on persistent memory is formed.
[0025] Furthermore, the specific method for the monitoring tool to collect performance monitoring results in step S3.2 is:
[0026] Step S3.2.1: Select a node in the Ceph cluster to deploy the Ceph MGR management service. Enable the Ceph Prometheus module built into Ceph MGR on this node. After successful enablement, you can obtain the performance of the Ceph cluster through the default listening port of ceph_exporter.
[0027] Step S3.2.2: Install and configure the Prometheus service in S3 and configure it as a system service for management. The software will then use the ceph_exporter port as a data source to obtain Ceph cluster status and performance monitoring indicators.
[0028] Step S3.2.3: Modify the configuration file prometheus.yml of the Prometheus service in S3 and configure the data source so that the Prometheus service can obtain monitoring data from ceph_exporter;
[0029] Step S3.2.4: Install and configure the Grafana service as a system service for management. After starting it, enter the Prometheus access address in S3 and connect to the Prometheus data source. You can then create a dashboard for visual monitoring using Grafana.
[0030] Step S3.2.5: Run the stress test script using the Rados Bench tool in the Ceph system under the current parameter configuration. Use Prometheus and Grafana to obtain the Ceph cluster load and corresponding iops value under the current parameter configuration combination.
[0031] Furthermore, in step S4, a genetic algorithm GA model is established, and the specific method of using the genetic algorithm to dynamically adjust the cache size and other parameters is as follows:
[0032] GA simulates the natural selection and reproduction process of biological evolution to find the optimal solution to the problem. Assume that the population size is M and the maximum number of iterations is T. In the parameter tuning problem of Ceph cache system based on persistent memory, the number of Ceph system parameter configuration combinations is used as the population size. The parameter configuration combination {conf1, conf2, ..., conf 12} i As an individual in the population, each specific parameter value represents a gene of the individual, P(t) represents the t-generation population; GA will select the fitness f({conf1, conf2, ..., conf 12} i) A larger set of individuals {E}, that is, the parameter configuration combination with the best system performance at the moment, saves its information, obtains new individuals, that is, a new parameter configuration combination after crossover and mutation operations, and uses {E} to replace the last M / 2 individuals with the smallest fitness in the new population, that is, the new parameter configuration combination, so that {E} is retained in the next generation population; until the termination condition is reached, the optimal parameter configuration group is obtained;
[0033] In the above Ceph cache system based on persistent memory, the performance indicator is the number of I / O requests processed per unit time (iops). When the performance indicator is iops, the fitness f is expressed as:
[0034] f({conf1, conf2, ..., conf 12} i )=(iops cur -iops exp ) / iops exp
[0035] Among them, iops cur Indicates the number of I / O requests processed per unit time by the system under the current parameter configuration combination, iops exp Indicates the number of I / O requests processed per unit time by the system under the empirical parameter configuration combination, that is, the parameter values are set to the default values.
[0036] Furthermore, the main steps of the GA algorithm application process for parameter tuning of the Ceph cache system based on persistent memory include:
[0037] Initialize the population: Initialize a set of parameter configurations based on experience and historical data;
[0038] Obtain samples: Obtain samples of performance indicators under each set of parameter configuration combinations;
[0039] Calculate fitness: calculate the fitness value corresponding to each parameter configuration combination;
[0040] Selection operation: retain the parameter configuration combination with high fitness and replace the parameter configuration combination with low fitness;
[0041] Genetic operation: Recombining parameter configuration combinations based on crossover probability and mutation probability to obtain new parameter configuration combinations;
[0042] Determine whether the maximum number of iterations has been reached: if not, return to continue executing the genetic operation; otherwise, output the optimal parameter configuration;
[0043] Through continuous iteration and optimization of the above steps, the optimal parameter configuration is finally obtained.
[0044] Preferably, the read / write mode parameter rw in step S5 can be selected from write sequential write, randwrite random write, read sequential read, and randread random read.
[0045] The beneficial effects of the present invention are:
[0046] By applying persistent memory to the Ceph distributed storage system, real-time optimization of system performance can be achieved, bringing significant benefits in many aspects. Ceph systems based on persistent memory have speeds close to that of DRAM, and can provide lower latency and higher IOPS throughput compared to traditional SSDs. For high-speed data processing scenarios, using persistent memory as a cache layer can greatly improve read and write performance. At the same time, the use of persistent memory can provide higher data reliability. In the event of a power failure, the non-volatility of persistent memory will ensure that data is not lost, greatly improving application reliability and reducing the risk of data loss. In addition, combined with the optimization of storage parameters of persistent memory, the system can maximize resource utilization and ensure that the system maintains efficient and stable operation under various load requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a diagram showing the main principles of the Ceph storage system optimized for persistent memory devices according to the present invention;
[0048] Figure 2 This is a schematic diagram of the overall framework of the performance optimization method based on persistent memory of the present invention;
[0049] Figure 3 This is a flowchart of the GA algorithm of the present invention applied to parameter tuning of the Ceph cache system based on persistent memory. DETAILED DESCRIPTION
[0050] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0051] This invention first uses persistent memory as a cache layer to improve read performance. The core idea is that by caching hot data in persistent memory, the number of accesses to the backend storage device can be reduced, thereby improving overall performance.
[0052] Persistent memory devices can be configured as block devices and used like regular hard drives or solid-state drives (SSDs). In the distributed storage system Ceph, persistent memory can be used as a cache layer to improve performance. In the Ceph storage system, the cache tiering mechanism refers to building a dedicated Ceph pool, the cache pool, on a higher-performance disk. This cache pool is located before the regular pool, so that all I / O operations from the client are initially processed through the cache pool. Subsequently, the data is asynchronously layered and written back to the backend data pool. Clients can enjoy high performance on the cache pool, while the data is eventually written to the regular pool.
[0053] However, Ceph itself has thousands of parameters for configuring cache, memory, CPU, and data write-related properties. Cache configuration includes multiple parameters. Different parameter configurations will lead to different cache performance, thus affecting the overall performance of the Ceph storage system.
[0054] This paper aims to solve the performance optimization problem of persistent memory as a Ceph cache optimization device and proposes a method to tune the main parameters affecting persistent memory cache through genetic algorithm, ultimately improving the overall performance of Ceph storage system. Figure 1 As shown in the figure, the following two aspects are optimized for the Ceph storage system: first, persistent memory devices are introduced for cache optimization; second, algorithms are used to optimize the configuration parameters of the Ceph storage system based on persistent memory devices.
[0055] This invention configures a persistent memory device as a block device and uses it as a Ceph cache. The specific technical approach includes configuring the persistent memory device, configuring Ceph OSD, optimizing cache performance, adjusting Ceph OSD parameters, and continuously monitoring and tuning. Through reasonable parameter adjustment and monitoring, the performance of the Ceph storage system is improved, ensuring that the system's performance reaches the optimal state.
[0056] A method for optimizing Ceph cache system performance based on persistent memory, such as Figure 2 As shown in the figure, the Ceph storage system based on persistent memory uses the parameter optimization system to adjust the cache and persistent memory parameter configurations. It also uses performance monitoring to feedback performance data to complete the tuning of the configuration parameters and ultimately obtain the optimal performance parameter combination. This includes the following steps:
[0057] S1. Configure persistent memory devices.
[0058] Configure the persistent memory device in file system mode. Use the libpmem library to directly mount the persistent memory device as a file system.
[0059] S2. Configure Ceph OSD.
[0060] Specify the persistent memory device as the cache device in the Ceph configuration file, enable the relevant cache options in ceph.conf and keep the default values. Create the OSD and configure the cache layer using the ceph command.
[0061] S3. Performance monitoring and sampling are performed to generate a sample set.
[0062] After deployment, continuously monitor Ceph performance metrics, recording the initial default values of Ceph storage system cache parameters and the Ceph cluster performance metrics under this configuration. Specifically, use the open-source monitoring and alerting tool Prometheus to collect and monitor various Ceph cluster metrics. Use the open-source data visualization tool Grafana to connect to the Prometheus data source and visualize the collected and monitored results. Monitored metrics include Ceph cluster status, read / write performance, component count, PGs, and OSD information. Here, we focus on cluster status and read / write performance.
[0063] The specific method for generating a sample set in S3 is:
[0064] S3.1. For the relevant parameters of the Ceph storage system cache based on persistent memory, use the random function to randomly select values within a reasonable and effective range according to their parameter type and value range. The target tuning parameters of the present invention are shown in the following table.
[0065] Table 1 Tuning parameter list
[0066]
[0067]
[0068] S3.2. Apply the default values of the parameters listed in Table 1 to the Ceph cluster, test the corresponding system performance, and collect performance monitoring results (iops) through monitoring tools. i ;
[0069] S3.3, set the parameter configuration value set {conf1, conf2, ..., conf 12} i and the corresponding performance monitoring results iops i Combination, constitute a sample data item ({conf1, conf2, ..., conf 12} i ,iops i), through loops S3.1 and S3.2, when the number of collected sample data items reaches a preset value, a sample set for constructing a performance tuning model of the Ceph cache system based on persistent memory is formed.
[0070] The specific method for the monitoring tool in S3.2 to collect performance monitoring results is:
[0071] Step S3.2.1: Select a node in the Ceph cluster to deploy the Ceph MGR management service. Enable the Ceph Prometheus module built into Ceph MGR on this node. After successful enablement, you can obtain the performance of the Ceph cluster through the default listening port of ceph_exporter.
[0072] Step S3.2.2: Install and configure the Prometheus service in S3 and configure it as a system service for management. The software will then use the ceph_exporter port as a data source to obtain Ceph cluster status and performance monitoring indicators.
[0073] Step S3.2.3: Modify the configuration file prometheus.yml of the Prometheus service in S3 and configure the data source so that the Prometheus service can obtain monitoring data from ceph_exporter;
[0074] Step S3.2.4: Install and configure the Grafana service as a system service for management. After starting, enter the Prometheus access address in S3 and connect to the Prometheus data source. You can then create a dashboard for visual monitoring using Grafana.
[0075] Step S3.2.5: Run the stress test script using the Rados Bench tool in the Ceph system under the current parameter configuration. Use Prometheus and Grafana to obtain the Ceph cluster load and corresponding iops value under the current parameter configuration combination.
[0076] S4. Dynamic adjustment of parameter optimization system.
[0077] Based on a sample set of parameter configuration values and corresponding monitoring results, a genetic algorithm (GA) model was established, using the GA to dynamically adjust cache size and other parameters. The cluster management tool Ansible was used to apply the parameter configuration combinations generated during the GA execution process to obtain system load and IOPs performance indicators, which were then optimized using the GA.
[0078] In S4, a genetic algorithm GA model is established. The specific method of using the genetic algorithm to dynamically adjust the cache size and other parameters is as follows:
[0079] GA simulates the natural selection and reproduction process of biological evolution to find the optimal solution to the problem. Let the population size be M and the maximum number of iterations be T. In the parameter tuning problem of Ceph cache system based on persistent memory, the number of Ceph system parameter configuration combinations is the population size, and the parameter configuration combination {conf1, conf2, ..., conf 12} i As an individual in the population, each specific parameter value represents a gene of the individual, and P(t) represents the population of generation t. GA will select the fitness f({conf1, conf2, ..., conf 12} i ) is the largest set of individuals {E}, which is the parameter configuration combination with the best system performance. This information is saved and, after crossover and mutation operations, new individuals (i.e., new parameter configuration combinations) are obtained. {E} are used to replace the last M / 2 individuals with the lowest fitness in the new population (i.e., the new parameter configuration combination), thus retaining {E} in the next generation population. This continues until the termination condition is reached, and the optimal parameter configuration group is obtained.
[0080] In the above Ceph cache system based on persistent memory, the performance indicator is the number of I / O requests processed per unit time (iops). When the performance indicator is iops, the fitness f is expressed as:
[0081] f({conf1, conf2, ..., conf 12}i)=(iops cur -iops exp ) / iops exp
[0082] Among them, iops cur Indicates the number of I / O requests processed per unit time by the system under the current parameter configuration combination, iops exp Indicates the number of I / O requests processed per unit time by the system under the empirical parameter configuration combination (that is, the parameter values are the default values).
[0083] The flowchart and pseudo code of GA algorithm applied to parameter tuning of Ceph cache system based on persistent memory are as follows: Figure 3 , as shown in Table 2.
[0084] Figure 3 This is a flowchart of the GA algorithm of the present invention applied to the parameter tuning of the Ceph cache system based on persistent memory. The main steps of this process include:
[0085] Initialize the population: Initialize a set of parameter configurations based on experience and historical data.
[0086] Get samples: Get samples of performance indicators (such as IOPS values) under each parameter configuration combination.
[0087] Calculate fitness: Calculate the fitness value corresponding to each parameter configuration combination.
[0088] Select operation: keep the parameter configuration combination with high fitness and replace the parameter configuration combination with low fitness.
[0089] Genetic operation: Recombining parameter configuration combinations based on crossover probability and mutation probability to obtain new parameter configuration combinations.
[0090] Determine whether the maximum number of iterations has been reached: if not, return to continue executing the genetic operation; otherwise, output the optimal parameter configuration.
[0091] Through continuous iteration and optimization of the above steps, the optimal parameter configuration is finally obtained.
[0092] Table 2 Pseudo-code representation of the GA algorithm in the Ceph cache system parameter tuning scenario based on persistent memory
[0093]
[0094]
[0095] S5. Testing and verification.
[0096] Before actual deployment, conduct detailed performance testing and verification. Use the FIO (Flexible I / O Tester) tool to simulate load, identify performance bottlenecks, and verify the effectiveness of parameter tuning.
[0097] Open the fio configuration file and set the read / write mode rw parameter. You can choose write sequential write, randwrite random write, read sequential read, or randread random read. Run the fio. / write.fio command to run the fio test on the OSD node to obtain the iops performance results of the current Ceph system and verify whether the tuning parameters are effective.
[0098] The above-described embodiment merely represents one embodiment of the present invention. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A method for optimizing Ceph cache system performance based on persistent memory, characterized in that: The Ceph storage system based on persistent memory uses a parameter optimization system to adjust cache and persistent memory parameter configurations. Performance monitoring provides feedback on performance data to complete the tuning of configuration parameters and ultimately obtain the optimal performance parameter combination. This involves the following steps: Step S1: Configure a persistent memory device. Configure the persistent memory device as a file system. Use the libpmem library to mount the persistent memory device directly as a file system. Step S2: Configure Ceph OSD. Specify the persistent memory device as the cache device in the Ceph configuration file, enable the relevant cache options in ceph.conf and keep the default values; create the OSD and configure the cache layer using the ceph command; Step S3: monitor performance and perform sampling to generate a sample set; After deployment, Ceph performance metrics are continuously monitored, recording the initial default values of Ceph storage system cache parameters and the Ceph cluster performance metrics under this configuration. The open-source monitoring and alerting tool Prometheus is used to collect and monitor Ceph cluster metrics. The open-source data visualization tool Grafana is connected to the Prometheus data source to visualize the collected and monitored results. The displayed monitoring metrics include Ceph cluster status, read and write performance metrics, component count, PGs, and OSD information. Step S4, dynamic adjustment of parameter optimization system; Based on a sample set of parameter configuration values and corresponding monitoring results, a genetic algorithm (GA) model was established, and the GA was used to dynamically adjust cache size and other parameters. The cluster management tool Ansible was used to apply the parameter configuration combinations generated during the GA execution process to obtain system load and IOPs performance indicators, which were then optimized using the GA. Step S5: testing and verification; Before actual deployment, conduct detailed performance testing and verification; use FIO tools to simulate load, test performance bottlenecks, and verify the effectiveness of parameter tuning; Open the fio configuration file, set the read / write mode rw parameter, and run the fio. / write.fio command to run the fio test on the OSD node to obtain the iops performance results of the current Ceph system and verify whether the tuning parameters are effective.
2. The method for optimizing Ceph cache system performance based on persistent memory according to claim 1, wherein: The specific method for generating the sample set in step S3 is: Step S3.1: For the relevant parameters of the Ceph storage system cache based on persistent memory, use the random function to randomly select values within a reasonable and effective range according to their parameter type and value range. The target tuning parameters are: osd_map_cache_size, cache-mode, hit_set_type, hit_set_count, hit_set_period, target_max_bytes, target_max_objects, cache_target_dirty_ratio, cache_target_dirty_high_ratio, cache_target_full_ratio, osd_journal_size, and compression_mode. Step S3.2: Apply the default values of the target tuning parameters to the Ceph cluster, test the corresponding system performance, and collect the performance monitoring results (iops) through the monitoring tool. i ; Step S3.3: Set the parameter configuration value set {conf1, conf2, ..., conf 12 } i and the corresponding performance monitoring results iops i Combination, constitute a sample data item ({conf1,conf2,...,conf 12 } i ,iops i ), through loops S3.1 and S3.2, when the number of collected sample data items reaches a preset value, a sample set for building a performance tuning model of the Ceph cache system based on persistent memory is formed.
3. The method for optimizing Ceph cache system performance based on persistent memory according to claim 2, wherein: The specific method for the monitoring tool to collect performance monitoring results in step S3.2 is: Step S3.2.1: Select a node in the Ceph cluster to deploy the Ceph MGR management service. Enable the Ceph Prometheus module built into CephMGR on this node. After successful enablement, you can obtain the performance of the Ceph cluster through the default listening port of ceph_exporter. Step S3.2.2: Install and configure the Prometheus service in S3 and configure it as a system service for management. The software will then use the ceph_exporter port as a data source to obtain Ceph cluster status and performance monitoring indicators. Step S3.2.3: Modify the configuration file prometheus.yml of the Prometheus service in S3 and configure the data source so that the Prometheus service can obtain monitoring data from ceph_exporter; Step S3.2.4: Install and configure the Grafana service as a system service for management. After starting it, enter the Prometheus access address in S3 and connect to the Prometheus data source. You can then create a dashboard for visual monitoring using Grafana. Step S3.2.5: Run the stress test script using the RadosBench tool provided with Ceph in the Ceph system under the current parameter configuration. Use Prometheus and Grafana to obtain the Ceph cluster load and corresponding iops value under the current parameter configuration combination.
4. The method for optimizing Ceph cache system performance based on persistent memory according to claim 1, wherein: In step S4, a genetic algorithm GA model is established. The specific method of using the genetic algorithm to dynamically adjust the cache size and other parameters is as follows: GA simulates the natural selection and reproduction process of biological evolution to find the optimal solution to the problem. Assume that the population size is M and the maximum number of iterations is T. In the parameter tuning problem of Ceph cache system based on persistent memory, the number of Ceph system parameter configuration combinations is used as the population size. The parameter configuration combination {conf1, conf2, ..., conf 12 } i As an individual in the population, each specific parameter value represents a gene of the individual, P(t) represents the t-generation population; GA will select the fitness f({conf1, conf2, ..., conf 12 } i ) A larger set of individuals {E}, that is, the parameter configuration combination with better system performance at the moment, saves its information, obtains new individuals, that is, a new parameter configuration combination, after crossover and mutation operations, and uses {E} to replace the last M / 2 individuals with smaller fitness in the new population, that is, the new parameter configuration combination, so that {E} is retained in the next generation population; Until the termination condition is reached, the optimal parameter configuration group is obtained; In the above Ceph cache system based on persistent memory, the performance indicator is the number of I / O requests processed per unit time (lops). When the performance indicator is iops, the fitness f is expressed as: f({conf1,conf2,......,conf 12 } i )=(iops cur -iops exp ) / iops exp Among them, iops cur Indicates the number of I / O requests processed per unit time by the system under the current parameter configuration combination, iops exp Indicates the number of I / O requests processed per unit time by the system under the empirical parameter configuration combination, that is, the parameter values are set to the default values.
5. The method for optimizing Ceph cache system performance based on persistent memory according to claim 4, wherein: The main steps of the GA algorithm application process for tuning parameters of a persistent memory-based Ceph cache system include: Initialize the population: Initialize a set of parameter configurations based on experience and historical data; Obtain samples: Obtain samples of performance indicators under each set of parameter configuration combinations; Calculate fitness: calculate the fitness value corresponding to each parameter configuration combination; Selection operation: retain the parameter configuration combination with high fitness and replace the parameter configuration combination with low fitness; Genetic operation: Recombining parameter configuration combinations based on crossover probability and mutation probability to obtain new parameter configuration combinations; Determine whether the maximum number of iterations has been reached: if not, return to continue executing the genetic operation; otherwise, output the optimal parameter configuration; Through continuous iteration and optimization of the above steps, the optimal parameter configuration is finally obtained.
6. The method for optimizing Ceph cache system performance based on persistent memory according to claim 1, wherein: The read / write mode parameter rw in step S5 can be selected from write sequential write, randwrite random write, read sequential read, and randread random read.
Citation Information
Patent Citations
Ceph parameter tuning method based on LSTM and genetic algorithm
CN113704220A
Online performance adjusting and optimizing system and method for Kafka communication system and application
CN118626386A