Cache deployment method and apparatus, device, storage medium, and program product

CN118567572BActive Publication Date: 2026-10-20CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410939421.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2026-10-20
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种存储集群的缓存部署方法、装置、设备、存储介质及程序产品,用以解决现有的缓存部署效率和稳定性较低的问题

Benefits of technology

[0055]本申请实施例提供的缓存部署方法、装置、设备、存储介质及程序产品,通过获取目标混闪存储服务器的硬件拓扑信息,所述硬件拓扑信息用于指示所述服务器的多个CPU、缓存盘以及数据盘之间的物理拓扑关系,对所述硬件拓扑信息进行解析处理,得到每个CPU的CPU总线连接的缓存盘和数据盘,将所述缓存盘和数据盘按照对应的CPU总线进行分组处理,得到多个磁盘组,针对每个磁盘组,依次将所述磁盘组内的多个子缓存区域配置为所述数据盘的缓存;该方法提高了缓存部署的效率和稳定性,从而降低了硬件配置对混闪存储服务器的存储性能的影响。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567572B_ABST
    Figure CN118567572B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a cache deployment method and device, equipment, storage medium and program product. The method comprises: obtaining hardware topology information of a target hybrid flash storage server, the hardware topology information being used to indicate a physical topology relationship between a plurality of CPUs, cache disks and data disks of the server, performing analysis processing on the hardware topology information to obtain cache disks and data disks connected by a CPU bus of each CPU, grouping the cache disks and data disks according to the corresponding CPU bus to obtain a plurality of disk groups, and for each disk group, sequentially configuring a plurality of sub-cache areas in the disk group as cache of the data disk; the method improves the efficiency and stability of cache deployment, thereby reducing the influence of hardware configuration on the storage performance of the hybrid flash storage server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a cache deployment method, apparatus, device, storage medium, and program product. Background Technology

[0002] Currently, in some application scenarios that require both high-performance data access and large storage capacity, hybrid flash storage servers are often used. These servers use a storage architecture that combines solid-state drives (SSDs) and hard disk drives (HDDs) to combine the advantages of both and improve the overall performance and cost-effectiveness of the storage system. SSDs are often used as caching for HDDs.

[0003] To deploy the accelerated cache of the hybrid flash storage service server, each SSD partition is typically configured as a cache for the HDD, based on the drive letter number reported by the SSD and the partition number corresponding to each drive letter, as well as the drive letter number reported by the HDD.

[0004] However, existing caching deployment methods suffer from low deployment efficiency and stability in complex deployment environments with diverse types of flash storage servers, thereby reducing the storage performance of storage servers. Summary of the Invention

[0005] This application provides a method, apparatus, device, storage medium, and program product for deploying cache in a storage cluster, in order to solve the problems of low efficiency and stability in existing cache deployments.

[0006] In a first aspect, this application provides a cache deployment method applied to a hybrid flash storage server, the method comprising:

[0007] Obtain the hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between the server's multiple CPUs, cache disks, and data disks;

[0008] The hardware topology information is parsed to obtain the cache disk and data disk connected to the CPU bus of each CPU;

[0009] The cache disk and data disk are grouped according to their corresponding CPU buses to obtain multiple disk groups, and there is a corresponding relationship between the disk groups and the CPUs;

[0010] For each disk group, multiple sub-cache areas within the disk group are configured as caches for the data disk. The sub-cache areas are obtained by partitioning the cache disk based on the number of cache disks and data disks.

[0011] In one possible implementation, before acquiring the hardware topology information of the target flash storage server, the method further includes:

[0012] Obtain the configuration information of the target mixed flash storage service server, including: the number and capacity of cache disks, and the number of data disks;

[0013] The target number of cache disks is obtained based on the number of cache disks and the number of data disks;

[0014] According to the target number of partitions, the capacity of each cache disk is partitioned sequentially to obtain multiple sub-cache areas corresponding to each cache disk, wherein the capacity of each sub-cache area of ​​the same cache disk is equal.

[0015] In one possible implementation, obtaining the target number of cache disk partitions based on the number of cache disks and the number of data disks includes:

[0016] If the number of cache disks is M, and the number of data disks is N;

[0017] If M is divisible by N, then the target number of partitions for the cache disk is determined to be N / M;

[0018] If M is not divisible by N, then the target number of partitions for the cache disk is determined to be N / M+1.

[0019] In one possible implementation, the step of grouping the cache disk and data disk according to their corresponding CPU buses to obtain multiple disk groups includes:

[0020] Obtain the drive letters of the multiple data disks, the drive letters of the multiple cache disks, and the partition number of the sub-cache area corresponding to each cache disk;

[0021] Based on the position of the multiple cache disks on the CPU bus, the disk letters of the multiple cache disks and the partition numbers of the sub-cache areas corresponding to each cache disk are sorted to obtain a cache disk list corresponding to each CPU.

[0022] Based on the position of the multiple data disks on the CPU bus, the disk letters of the multiple data disks are sorted to obtain a list of data disks corresponding to each CPU;

[0023] Based on the cache disk list and data disk list corresponding to each CPU, multiple disk groups are determined.

[0024] In one possible implementation, configuring multiple sub-cache regions within each disk group as caches for the data disk, in sequence, includes:

[0025] Iterate through the data disk list corresponding to each disk group, and sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group. The target sub-cache area selected each time is a sub-cache area in a different cache disk.

[0026] In one possible implementation, the step of sequentially establishing the association between the drive letter of each data disk and the partition number of the target sub-cache region in the cache disk list corresponding to the disk group includes:

[0027] Traverse the list of cache disks corresponding to the disk group, and determine the target cache disk and the target sub-cache area corresponding to the target cache disk in turn;

[0028] Establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in sequence.

[0029] In one possible implementation, the method further includes:

[0030] If M does not satisfy the condition that it is divisible by N and the remainder of N / M is L, after deploying the caches of N / M data disks in sequence, the sub-cache areas corresponding to different cache disks within the disk group are used as the caches of L data disks in sequence.

[0031] Secondly, this application provides a cache deployment apparatus, comprising:

[0032] The acquisition module is used to acquire the hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between the multiple CPUs, cache disks and data disks of the server;

[0033] The processing module is used to parse and process the hardware topology information to obtain the cache disk and data disk connected to the CPU bus of each CPU.

[0034] The processing module is further configured to group the cache disk and data disk according to the corresponding CPU bus to obtain multiple disk groups, wherein there is a corresponding relationship between the disk groups and the CPU;

[0035] The processing module is further configured to configure multiple sub-cache areas within each disk group as caches for the data disk for each disk group. The sub-cache areas are obtained by partitioning the cache disk based on the number of cache disks and data disks.

[0036] Optionally, the acquisition module is further configured to acquire configuration information of the target mixed flash storage server, the configuration information including: the number and capacity of cache disks, and the number of data disks;

[0037] The processing module is further configured to obtain the target number of cache disks based on the number of cache disks and the number of data disks;

[0038] The processing module is further configured to partition the capacity of each cache disk sequentially according to the target number of partitions, thereby obtaining multiple sub-cache regions corresponding to each cache disk, wherein the capacity of each sub-cache region of the same cache disk is equal.

[0039] Optionally, the processing module is specifically used when the number of cache disks is M and the number of data disks is N;

[0040] If M is divisible by N, the target number of partitions for the cache disk is determined to be N / M;

[0041] If M is not divisible by N, the target number of partitions for the cache disk is determined to be N / M+1.

[0042] Optionally, the acquisition module is further configured to acquire the drive letters of the plurality of data disks, the drive letters of the plurality of cache disks, and the partition number of the sub-cache area corresponding to each cache disk;

[0043] The processing module is further configured to sort the drive letters of the multiple cache disks and the partition numbers of the sub-cache areas corresponding to each cache disk according to the positions of the multiple cache disks on the CPU bus, so as to obtain a cache disk list corresponding to each CPU.

[0044] The processing module is further configured to sort the disk letters of the multiple data disks according to their positions on the CPU bus, and obtain a list of data disks corresponding to each CPU.

[0045] The processing module is also used to determine multiple disk groups based on the cache disk list and data disk list corresponding to each CPU.

[0046] Optionally, the processing module is further configured to traverse the data disk list corresponding to each disk group, and sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group, wherein the target sub-cache area selected each time is a sub-cache area in a different cache disk.

[0047] Optionally, the processing module is further configured to traverse the list of cache disks corresponding to the disk group, and sequentially determine the target cache disk and the target sub-cache area corresponding to the target cache disk;

[0048] The processing module is also used to sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area.

[0049] Optionally, the processing module is further configured to, after sequentially deploying the caches of N / M data disks when M does not satisfy the condition that N is divisible by N and the remainder of N / M is L, sequentially use the sub-cache areas corresponding to different cache disks within the disk group as caches for L data disks.

[0050] Thirdly, embodiments of this application provide a cache deployment device, including: a memory and a processor;

[0051] The memory stores computer-executed instructions;

[0052] The processor executes computer execution instructions stored in the memory, causing the processor to perform the cache deployment method as described in the first aspect and / or various possible embodiments of the first aspect.

[0053] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the cache deployment method described in the first aspect and / or various possible implementations of the first aspect.

[0054] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the cache deployment method as described in the first aspect and / or various possible implementations of the first aspect.

[0055] The cache deployment method, apparatus, device, storage medium, and program product provided in this application embodiment obtains the hardware topology information of the target flash storage service server. This hardware topology information indicates the physical topology relationships between multiple CPUs, cache disks, and data disks of the server. The hardware topology information is parsed to obtain the cache disks and data disks connected to the CPU bus of each CPU. The cache disks and data disks are then grouped according to their corresponding CPU buses to obtain multiple disk groups. For each disk group, multiple sub-cache areas within the disk group are sequentially configured as caches for the data disks. This method improves the efficiency and stability of cache deployment, thereby reducing the impact of hardware configuration on the storage performance of the flash storage service server. Attached Figure Description

[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0057] Figure 1 A flowchart illustrating the cache deployment method provided in this application. Figure 1 ;

[0058] Figure 2A flowchart illustrating the cache deployment method provided in this application. Figure 2 ;

[0059] Figure 3 A schematic diagram of the hardware topology of the mixed flash storage service provided in this application;

[0060] Figure 4 A schematic diagram of the cache disk partitioning provided in this application embodiment;

[0061] Figure 5 A schematic diagram of the cache deployment device provided in this application;

[0062] Figure 6 A schematic diagram of the cache deployment device provided in this application.

[0063] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0065] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein.

[0066] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0067] First, the terms used in this application will be explained.

[0068] NVMe SSD (Non-Volatile Memory Express Solid State Drive): This is a high-performance solid-state drive that uses the NVMe protocol and communicates with the computer system through the PCI-E (Peripheral Component Interconnect Express) interface, achieving extremely high data transfer rates and lower access latency. Its characteristics include good read and write performance, but small storage capacity.

[0069] HDD (Hard Disk Drive): A traditional data storage device that uses magnetic storage technology. It is characterized by poor read and write performance but large storage capacity.

[0070] Hybrid flash storage server: This is a storage system that combines NVMe SSDs and HDDs. In such a system, NVMe SSDs are used to accelerate the caching of HDDs because NVMe SSDs can provide fast data access speeds and are usually used as the front-end disk of the caching layer; while HDDs are the place where data is persistently stored, that is, the back-end disk where the data is ultimately stored.

[0071] Accelerated caching refers to configuring one block device as a cache for another block device to improve the read and write performance of storage devices. For example, a hybrid flash storage server has 2 NVMe disks and 12 HDD disks. Each NVMe disk is partitioned into 6 partitions, for a total of 12 partitions. Accelerated caching can then be applied to each of the 12 HDD disks.

[0072] Storage cluster: refers to a distributed storage system deployed on multiple storage servers of the same type to form a storage cluster and provide storage services to the outside world.

[0073] Hybrid flash storage cluster: A storage cluster consisting of multiple hybrid flash storage servers.

[0074] To deploy a hybrid flash storage cluster, for each storage node in the cluster, each solid-state drive partition is typically configured as an accelerated cache for the mechanical hard drive, according to the sequence number of the drive letter reported by the NVMe drive, the partition number corresponding to each drive letter, and the sequence number of the drive letter reported by the HDD drive.

[0075] For example, a hybrid flash storage server has 2 NVMe SSDs and 6 HDDs. The drive letters of the NVMe SSDs and the partitions of each NVMe drive are as follows:

[0076] The drive letter for the first NVMe SSD is: nvme0n1;

[0077] The three partitions of nvme0n1 are: nvme0n1p1, nvme0n1p2, and nvme0n1p3;

[0078] The drive letter for the second NVMe SSD is: nvme1n1;

[0079] The three partitions of nvme1n1 are: nvme1n1p1, nvme1n1p2, and nvme1n1p3;

[0080] The drive letters for each HDD are as follows: sdb, sdc, sdd, sde, sdf, sdg.

[0081] The existing deployment method involves configuring an NVMe partition for each HDD disk based on its drive letter, using it as an acceleration cache for the HDD disk. For example:

[0082] nvme0n1p1-sdb (nvme0n1p1 serves as an accelerated cache for sdb).

[0083] nvme0n1p2-sdc (nvme0n1p2 serves as an accelerated cache for sdc).

[0084] nvme0n1p3-sdd (nvme0n1p3 serves as an accelerated cache for sdd).

[0085] nvme1n1p1-sde (nvme1n1p1 serves as an accelerated cache for sde).

[0086] nvme1n1p2-sdf (nvme1n1p2 serves as an accelerated cache for SDF).

[0087] nvme1n1p3-sdg (nvme1n1p3 as an accelerated cache for sdg).

[0088] However, in complex deployment environments with diverse types of hybrid flash storage servers, such as situations where the ratio of NVMe disks to HDD disks in hybrid flash storage servers is not fixed and the hardware configuration is complex, the above deployment methods have low deployment efficiency and stability, resulting in reduced storage performance of the storage cluster.

[0089] To address the aforementioned issues, this application provides a cache deployment method. Based on the number of data disks and cache disks of the hybrid flash storage server, the number of partitions for the cache disks is determined. Then, based on the number of partitions, each cache disk is divided into multiple partitions of the same number to evenly distribute the cache disk capacity. Next, the hardware topology information of the hybrid flash storage server is obtained to identify the data disks and cache disks on each CPU bus of the server. These cache disks and data disks are grouped according to their respective CPUs to obtain multiple disk groups. For each disk group, the partitions corresponding to each cache disk in the same group are sequentially selected for accelerated caching of the data disks within the same group. This method improves the stability and efficiency of cache deployment for hybrid flash storage servers in complex deployment environments, thereby reducing the impact of hardware configuration on the storage performance of hybrid flash storage servers.

[0090] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0091] Figure 1 A flowchart illustrating the cache deployment method provided in this application embodiment. Figure 1 In this embodiment, the execution entity is, for example, a cache deployment device. Figure 1 As shown, the cache deployment method provided in this embodiment includes:

[0092] S101. Obtain the hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between the multiple CPUs, cache disks and data disks of the server.

[0093] Among them, cache disks refer to storage media that can respond to external data requests and provide high-speed read and write services, while data disks refer to storage media inside the target hybrid flash storage server that can store data for a long time. Data disks have a large capacity, but their read and write speeds are lower than those of cache disks. Cache disks and data disks can be, for example, NVMe SSDs and HDDs, NVMe SSDs and SATA SSDs, SATA SSDs and HDDs, etc.

[0094] Understandably, target flash storage servers are typically configured with multiple CPUs to handle a large number of concurrent read and write requests, enabling multiple CPUs to execute multiple threads simultaneously, reducing latency and improving data processing capabilities. Physical topology information describes the physical connection methods and storage architecture between the server's multiple CPUs, cache disks, and data disks. This information reveals how cache disks and data disks are interconnected through corresponding CPU buses, interfaces, etc.

[0095] S102. The hardware topology information is parsed and processed to obtain the cache disk and data disk connected to the CPU bus of each CPU.

[0096] By analyzing and processing the hardware topology information of multiple CPUs, cache disks, and data disks, the CPU bus where each cache disk and each data disk is located, as well as their specific positions on the CPU bus, can be obtained.

[0097] Understandably, different cache disks and data disks are connected to the corresponding CPU bus through different interfaces, thereby communicating with the corresponding CPU through the CPU bus to form the data transmission system within the target hybrid flash storage server.

[0098] The purpose of this step is to identify which cache disks and data disks are located on each CPU bus by analyzing the hardware topology information.

[0099] S103. The cache disk and data disk are grouped according to the corresponding CPU bus to obtain multiple disk groups.

[0100] Each cache disk and each data disk can be grouped according to the CPU bus on which they reside, resulting in multiple disk groups. Therefore, there is a correspondence between the disk groups and the CPUs.

[0101] This is done to select the optimal cache deployment method corresponding to the hardware configuration based on the hardware topology of the target flash storage server. This is applicable not only to various types of flash storage servers, but also to reducing the negative impact of communication between different CPU cores and memory consistency on storage performance such as read and write speeds when the flash storage server is a multi-core CPU type.

[0102] S104. For each disk group, configure multiple sub-cache areas within the disk group as caches for the data disk in sequence.

[0103] The sub-cache area is obtained by partitioning the cache disk based on the number of cache disks and data disks. For example, in order to save cache deployment time, multiple partitions can be created on each cache disk before obtaining the hardware topology information of the target flash storage service server. Furthermore, the sum of the number of sub-cache areas of all cache disks must be greater than or equal to the total number of data disks to ensure that each data disk can be configured with a sub-cache area.

[0104] Understandably, after obtaining multiple disk groups, cache configuration is performed sequentially for each disk group. During configuration, the sub-cache areas of the cache disks within the same group are allocated one by one to a data disk within the same group for accelerated caching, until each data disk in the disk group is configured with a sub-cache area. That is, each sub-cache area serves as an accelerated cache for a data disk on the same CPU bus.

[0105] In this step, by deploying cache within multiple disk groups based on the CPU, deployment efficiency and stability can be effectively improved, thereby enhancing the read and write performance of the entire storage system.

[0106] The cache deployment method provided in this application embodiment obtains the hardware topology information of the target flash storage service server. The hardware topology information indicates the physical topology relationship between multiple CPUs, cache disks, and data disks of the server. The hardware topology information is parsed to obtain the cache disks and data disks connected to the CPU bus of each CPU. The cache disks and data disks are grouped according to their corresponding CPU buses to obtain multiple disk groups. For each disk group, multiple sub-cache areas within the disk group are configured as caches for the data disks. This method improves the efficiency and stability of cache deployment, thereby reducing the impact of hardware configuration on the storage performance of the flash storage service server.

[0107] Figure 2 A flowchart illustrating the cache deployment method provided in this application. Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, the cache deployment method is described in detail. The cache deployment method provided in this embodiment includes:

[0108] S201. Obtain the configuration information of the target mixed flash storage service server, the configuration information including: the number and capacity of cache disks, and the number of data disks.

[0109] The configuration of a hybrid flash storage server can include several to a dozen cache disks as front-end caches, while the number of data disks may reach tens or even hundreds to ensure sufficient storage capacity. This design balances cost and performance, ensuring that the system can quickly respond to access to hot data while cost-effectively storing large amounts of data. Cache disk capacities can be, for example, 128GB, 256GB, 512GB, or 1TB. The specific ratio of cache disks to data disks is determined based on actual storage needs, and this application does not impose any special restrictions.

[0110] S202. Based on the number of cache disks and the number of data disks, obtain the target number of cache disk partitions.

[0111] The target number of partitions refers to the number of partitions per cache disk.

[0112] For example, if the number of cache disks is M, the number of data disks is N;

[0113] If M is divisible by N, then the target number of partitions for the cache disk is determined to be N / M;

[0114] If M is not divisible by N, then the target number of partitions for the cache disk is determined to be N / M+1.

[0115] For example, if the target flash storage server has 2 cache disks and 8 data disks, then 2 is divisible by 8, so the target number of cache disk partitions is 4. If the target flash storage server has 8 cache disks and 60 data disks, then 8 is not divisible by 60, and the quotient of 60 divided by 8 is 7 with a remainder of 4. Therefore, the target number of cache disk partitions is 8.

[0116] S203. According to the target number of partitions, the capacity of each cache disk is partitioned sequentially to obtain multiple sub-cache areas corresponding to each cache disk.

[0117] Within the same cache disk, all sub-cache regions have the same capacity.

[0118] For example, when the target flash storage server has 2 cache disks with a capacity of 128GB, 8 data disks, and 4 target partitions, each of the 2 cache disks is divided into 4 sub-cache regions, resulting in a total of 8 sub-cache regions, each with a size of 32GB. When the target flash storage server has 8 cache disks with a capacity of 128GB, 60 data disks, and 8 target partitions, each of the 8 cache disks is divided into 8 sub-cache regions, sharing the 512GB capacity of the cache disk, resulting in a total of 64 sub-cache regions, each with a size of 64GB.

[0119] The purpose of this step is to partition all cache disks of the target hybrid flash storage server before deploying the cache, and to ensure that the total number of all sub-cache areas of the cache disk is greater than or equal to the total number of data disks. This avoids cache deployment interruptions due to partitioning calculation errors, and can effectively improve deployment efficiency and stability, especially in complex implementation scenarios such as hybrid flash storage cluster deployment and heterogeneous server deployment.

[0120] S204. Obtain the hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between the multiple CPUs, cache disks and data disks of the server.

[0121] Step S204 is similar to step S101 above, and will not be repeated here.

[0122] S205. The hardware topology information is parsed and processed to obtain the cache disk and data disk connected to the CPU bus of each CPU.

[0123] Step S205 is similar to step S102 above, and will not be described again here.

[0124] S206. Obtain the drive letters of the multiple data disks, the drive letters of the multiple cache disks, and the partition number of the sub-cache area corresponding to each cache disk.

[0125] The drive letter of the data disk and the drive letter of the cache disk refer to the identification information corresponding to the disk. Both the drive letter and the partition number are unique. The drive letters of the cache disk and the data disk obtained in this step are unordered.

[0126] Figure 3 This is a schematic diagram of the hardware topology of the mixed flash storage service provided in the embodiments of this application. Figure 4 This is a schematic diagram of the cache disk partition provided in the embodiments of this application, such as... Figure 3 As shown in the figure, there is a hardware topology diagram corresponding to two CPUs, with 8 cache disks and 60 data disks. The cache disks and data disks are connected to different CPU buses through their respective interfaces. The drive letters of the multiple data disks are: sdk, sde, sdad, sdh, sdbj, sdaw, etc., and the drive letters of the multiple cache disks are: nvme0n1, nvme1n1, nvme2n1, nvme3n1, etc.

[0127] Please continue reading. Figure 4 ,like Figure 4 As shown, the nvme0n1, nvme1n1, nvme2n1, and nvme3n1 disks are all divided into 8 sub-cache regions. The partition numbers of the nvme0n1 disk are nvme1n1p1, nvme1n1p2, nvme1n1p3, nvme1n1p4, nvme1n1p5, nvme1n1p6, nvme1n1p7, and nvme1n1p8, respectively.

[0128] S207. Based on the position of the plurality of cache disks on the CPU bus, sort the disk letters of the plurality of cache disks and the partition number of the sub-cache area corresponding to each cache disk to obtain a cache disk list corresponding to each CPU.

[0129] For example, such as Figure 3 and Figure 4As shown, based on the CPU bus to which each cache disk is connected and its position on the CPU bus, all cache disks and their corresponding partition numbers are sorted to obtain the cache disk lists for CPU0 and CPU1, as shown below:

[0130] CPU0: nvme0n1, nvme1n1, nvme2n1, nvme3n1.

[0131] The partition numbers for nvme0n1 are (nvme0n1p1, nvme0n1p2, nvme0n1p3, nvme0n1p4, nvme0n1p5, nvme0n1p6, nvme0n1p7, nvme0n1p8). The other cache disks are similar and will not be described in detail here.

[0132] CPU1: nvme4n1, nvme5n1, nvme6n1, nvme7n1.

[0133] S208. Based on the position of the multiple data disks on the CPU bus, sort the disk letters of the multiple data disks to obtain a list of data disks corresponding to each CPU.

[0134] For example, such as Figure 3 As shown, when the target flash storage server has 2 CPUs, the data disk list corresponding to each CPU is as follows:

[0135] CPU0: sdk, sde, sdad, sdaz, sdt, sdar, sdn, sdg, sdc, sdag, sdbb, sdw, sdav, sdp, sdak, sdz, sdaq, sdo, sdj, sdd, sdal, sdbg, sdac, sdau, sdr, sdan, sdm, sdf, sdah, sdax

[0136] CPU1: sdh, sdbj, sdaw, sdbf, sdaj, sdba, sdab, sdv, sdl, sdbi, sdas, sdbd, sdaf, sdy, sd s, sdx, sdq, sdbe, sdao, sday, sdai, sdaa, sdu, sdi, sdbh, sdap, sdbc, sdam, sdat, sdae.

[0137] S209. Based on the cache disk list and data disk list corresponding to each CPU, determine multiple disk groups.

[0138] For example, the data disk list and cache disk list of CPU0 can form the Cpu0-disk group, and the data disk list and cache disk list of CPU1 can form the Cpu1-disk group.

[0139] The purpose of this step is to ensure that the cache for each data disk is created sequentially during subsequent cache deployment, thereby improving the efficiency and stability of cache deployment.

[0140] S210. Traverse the data disk list corresponding to each disk group, and sequentially establish the association between the disk letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group.

[0141] Each time, the target sub-cache region selected is a sub-cache region in a different cache disk.

[0142] For example, the list of cache disks corresponding to the disk group can be traversed to determine the target cache disk and the target sub-cache area corresponding to the target cache disk in turn, and the association between the drive letter of each data disk and the partition number of the target sub-cache area can be established in turn.

[0143] like Figure 3 As shown, the steps for cache deployment for CPU0 disk group are as follows: each time, select one of the four cache disks nvme0n1, nvme1n1, nvme2n1, and nvme3n1 in sequence as the target sub-cache area, and establish the association between the sub-cache area and one of the data disks in the data disk list.

[0144] Based on the data disk list of CPU0 disk group, establish the association relationships sequentially between data disk sdk and the first sub-cache area nvme0n1p1 in cache disk nvme0n1, data disk sde and the first sub-cache area nvme1n1p1 in cache disk nvme1n1, data disk sdad and the first sub-cache area nvme2n1p1 in cache disk nvme2n1, and data disk sdaz and the first sub-cache area nvme3n1p1 in cache disk nvme3n1. After the first sub-cache areas of these four cache disks are allocated, the second sub-cache area nvme0n1p2 of cache disk nvme0n1 is configured as the cache area of ​​data disk sdt, and so on.

[0145] Optionally, if the number of cache disks is M and the number of data disks is N, and M does not satisfy the condition that it is divisible by N, and the remainder of N / M is L, after deploying the caches of N / M data disks in sequence, the sub-cache areas corresponding to different cache disks within the disk group are used in sequence as the caches of L data disks.

[0146] This is because the ratio of cache disks to data disks may or may not be an integer multiple. If the number of cache disks is exactly divisible by the number of data disks (e.g., 2 cache disks and 8 data disks), then each cache disk is partitioned into 4 sub-cache regions, for a total of 8 sub-cache regions. The association between the 8 data disks and the 8 sub-cache regions is then established accordingly. However, if the number of cache disks is not divisible by the number of data disks and there is a remainder, after deploying the fully aligned acceleration cache, the remaining data disks will use partitions located on different cache disks on the same CPU bus as their acceleration caches.

[0147] The advantage of doing this is that it can balance the caching service of each cache disk, avoid the storage performance bottleneck caused by excessive pressure on the disk, and thus improve the read and write stability of the cache disk.

[0148] Please continue reading. Figure 4 The CPU0 disk group has 30 data disks and 4 cache disks. The remainder when the number of data disks is divided by the number of cache disks is 2. The different sub-cache regions of the 4 cache disks are used in sequence to deploy acceleration cache for the 30 data disks. The sub-cache regions used are: nvme0n1p1, nvme1n1p1, nvme2n1p1, nvme3n1p1, nvme0n1p2...nvme3n1p7. At this point, 28 data disks in the integer part have been deployed, and 2 data disks remain to be deployed. At this time, the sub-cache regions nvme0n1p8 and nvme1n1p8 of different cache disks on the CPU0 disk are used as cache for the remaining 2 data disks.

[0149] The cache deployment method provided in this application determines the target number of cache disk partitions based on the number of cache disks and data disks, and partitions each cache disk based on the target number of partitions to obtain multiple sub-cache areas. Based on the hardware topology information of the target flash storage server, it obtains the data disks and cache disks on each CPU bus. Then, based on the drive letters of the multiple data disks, the drive letters of the multiple cache disks, and the partition number of the sub-cache area corresponding to each cache disk, it groups each data disk and cache disk on each CPU bus to obtain disk groups corresponding to the CPUs. For each disk group, it sequentially establishes the association between each sub-cache area and the data disk. This method improves the partitioning efficiency of cache disks, making the partitioning more reasonable. When deploying the cache, these partitions are used sequentially to configure the cache for each data disk, thereby effectively improving the efficiency and stability of subsequent cache deployment.

[0150] Figure 5 A schematic diagram of the cache deployment device provided in this application is shown below. Figure 5 As shown, the cache deployment device 500 provided in this embodiment includes:

[0151] The acquisition module 501 is used to acquire the hardware topology information of the target flash storage service server, wherein the hardware topology information is used to indicate the physical topology relationship between multiple CPUs, cache disks and data disks of the server;

[0152] Processing module 502 is used to parse and process the hardware topology information to obtain the cache disk and data disk connected to the CPU bus of each CPU;

[0153] The processing module 502 is further configured to group the cache disk and data disk according to the corresponding CPU bus to obtain multiple disk groups, wherein the disk groups and the CPUs have a corresponding relationship.

[0154] The processing module 502 is further configured to configure multiple sub-cache areas within each disk group as caches for the data disk for each disk group. The sub-cache areas are obtained by partitioning the cache disk based on the number of cache disks and data disks.

[0155] Optionally, the acquisition module 501 is further configured to acquire configuration information of the target mixed flash storage service server, the configuration information including: the number and capacity of cache disks, and the number of data disks;

[0156] The processing module 502 is further configured to obtain the target number of cache disks based on the number of cache disks and the number of data disks;

[0157] The processing module 502 is further configured to partition the capacity of each cache disk sequentially according to the target number of partitions, thereby obtaining multiple sub-cache areas corresponding to each cache disk, wherein the capacity of each sub-cache area of ​​the same cache disk is equal.

[0158] Optionally, the processing module 502 is specifically used when the number of cache disks is M and the number of data disks is N;

[0159] If M is divisible by N, the target number of partitions for the cache disk is determined to be N / M;

[0160] If M is not divisible by N, the target number of partitions for the cache disk is determined to be N / M+1.

[0161] Optionally, the acquisition module 501 is further configured to acquire the drive letters of the plurality of data disks, the drive letters of the plurality of cache disks, and the partition number of the sub-cache area corresponding to each cache disk;

[0162] The processing module 502 is further configured to sort the drive letters of the multiple cache disks and the partition numbers of the sub-cache areas corresponding to each cache disk according to the positions of the multiple cache disks on the CPU bus, so as to obtain a cache disk list corresponding to each CPU.

[0163] The processing module 502 is further configured to sort the disk letters of the multiple data disks according to their positions on the CPU bus, and obtain a list of data disks corresponding to each CPU.

[0164] The processing module 502 is also used to determine multiple disk groups based on the cache disk list and data disk list corresponding to each CPU.

[0165] Optionally, the processing module 502 is further configured to traverse the data disk list corresponding to each disk group, and sequentially establish the association between the disk letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group, wherein the target sub-cache area selected each time is a sub-cache area in a different cache disk.

[0166] Optionally, the processing module 502 is further configured to traverse the cache disk list corresponding to the disk group and sequentially determine the target cache disk and the target sub-cache area corresponding to the target cache disk;

[0167] The processing module 502 is also used to sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area.

[0168] Optionally, the processing module 502 is further configured to, after sequentially deploying the caches of N / M data disks when M does not satisfy the condition that N is divisible by N and the remainder of N / M is L, sequentially use the sub-cache areas corresponding to different cache disks within the disk group as caches for L data disks.

[0169] The cache deployment device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0170] Figure 6 A schematic diagram of the cache deployment device provided in this application. Figure 6 As shown, this application provides a cache deployment device 600, which includes a receiver 601, a transmitter 602, a processor 603, and a memory 604.

[0171] Receiver 601 is used to receive instructions and data;

[0172] Transmitter 602 is used to send commands and data;

[0173] Memory 604 is used to store instructions executed by the computer;

[0174] The processor 603 is used to execute computer execution instructions stored in the memory 604 to implement the various steps of the cache deployment method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing cache deployment method embodiments.

[0175] Alternatively, the memory 604 can be either standalone or integrated with the processor 603.

[0176] When the memory 604 is set up independently, the electronic device also includes a bus for connecting the memory 604 and the processor 603.

[0177] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described cache deployment method.

[0178] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described cache deployment method.

[0179] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0180] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0181] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A cache deployment method, characterized in that, Applied to a hybrid flash storage server, the method includes: Obtain the configuration information of the target mixed flash storage service server, including: the number and capacity of cache disks, and the number of data disks; The target number of cache disks is obtained based on the number of cache disks and the number of data disks; According to the target number of partitions, the capacity of each cache disk is partitioned sequentially to obtain multiple sub-cache areas corresponding to each cache disk, wherein the capacity of each sub-cache area of ​​the same cache disk is equal. Obtain the hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between the server's multiple CPUs, cache disks, and data disks; The hardware topology information is parsed to obtain the cache disk and data disk connected to the CPU bus of each CPU; Obtain the drive letters of the multiple data disks, the drive letters of the multiple cache disks, and the partition number of the sub-cache area corresponding to each cache disk; Based on the position of the multiple cache disks on the CPU bus, the disk letters of the multiple cache disks and the partition numbers of the sub-cache areas corresponding to each cache disk are sorted to obtain a cache disk list corresponding to each CPU. Based on the position of the multiple data disks on the CPU bus, the disk letters of the multiple data disks are sorted to obtain a list of data disks corresponding to each CPU; Based on the cache disk list and data disk list corresponding to each CPU, multiple disk groups are determined, and there is a corresponding relationship between the disk groups and the CPUs. Iterate through the data disk list corresponding to each disk group, and sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group. The target sub-cache area selected each time is a sub-cache area in a different cache disk. The sub-cache area is obtained by partitioning the cache disk based on the number of cache disks and data disks.

2. The method according to claim 1, characterized in that, The step of determining the target number of cache disk partitions based on the number of cache disks and the number of data disks includes: If the number of cache disks is M, and the number of data disks is N; If M is divisible by N, then the target number of partitions for the cache disk is determined to be N / M; If M is not divisible by N, then the target number of partitions for the cache disk is determined to be N / M+1.

3. The method according to claim 1, characterized in that, The step of sequentially establishing the association between the drive letter of each data disk and the partition number of the target sub-cache region in the cache disk list corresponding to the disk group includes: Traverse the list of cache disks corresponding to the disk group, and determine the target cache disk and the target sub-cache area corresponding to the target cache disk in turn; Establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in sequence.

4. The method according to claim 1, characterized in that, The method further includes: If M does not satisfy the condition that it is divisible by N and the remainder of N / M is L, after deploying the caches of N / M data disks in sequence, the sub-cache areas corresponding to different cache disks within the disk group are used as the caches of L data disks in sequence.

5. A cache deployment device, characterized in that, The device includes: The acquisition module is used to acquire the configuration information of the target mixed flash storage service server, the configuration information including: the number and capacity of cache disks, and the number of data disks; The processing module is used to obtain the target number of cache disks based on the number of cache disks and the number of data disks; and to partition the capacity of each cache disk sequentially according to the target number of partitions to obtain multiple sub-cache areas corresponding to each cache disk, wherein the capacity of each sub-cache area of ​​the same cache disk is equal. The acquisition module is further configured to acquire hardware topology information of the target flash storage server, wherein the hardware topology information is used to indicate the physical topology relationship between multiple CPUs, cache disks and data disks of the server; The processing module is further configured to parse the hardware topology information to obtain the cache disks and data disks connected to the CPU bus of each CPU; obtain the drive letters of the multiple data disks, the drive letters of the multiple cache disks, and the partition numbers of the sub-cache areas corresponding to each cache disk; sort the drive letters of the multiple cache disks and the partition numbers of the sub-cache areas corresponding to each cache disk according to their positions on the CPU bus to obtain a cache disk list corresponding to each CPU; sort the drive letters of the multiple data disks according to their positions on the CPU bus to obtain a data disk list corresponding to each CPU; determine multiple disk groups based on the cache disk list and data disk list corresponding to each CPU, wherein the disk groups and CPUs have a corresponding relationship; traverse the data disk list corresponding to each disk group, and sequentially establish the association between the drive letter of each data disk and the partition number of the target sub-cache area in the cache disk list corresponding to the disk group, wherein the target sub-cache area selected each time is a sub-cache area in a different cache disk, and the sub-cache area is obtained by partitioning the cache disks based on the number of cache disks and data disks.

6. A cache deployment device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the cache deployment method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the cache deployment method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Automatic deployment method and device for distributed storage, equipment and product

    CN115499304A

  • Storage configuration adjustment method, device and system of server, equipment and medium

    CN117472289A