Storage space allocation method, FM management unit and computing system
By allocating the storage space of the storage pool composed of multiple storage devices to nodes in proportion, the problem that nodes in traditional computing architecture cannot meet the memory space requirements is solved, and the performance improvement is achieved.
Patent Information
- Application Number
- CN202311413522.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
In traditional computing architecture, nodes can only use the memory space provided by the memory connected to the node, and cannot meet the node's memory space needs.
By allocating the storage space of the storage pool composed of multiple storage devices to the nodes in proportion, the nodes can use the storage space provided by multiple storage devices. The specific method includes receiving a storage space application request of the node, determining the allocation ratio based on the configuration capacity and the capacity parameters of the multiple storage devices, and allocating the storage space of the CXL storage pool according to the allocation ratio.
The nodes are able to utilize as many storage channels as possible provided by multiple storage devices, which improves the utilization of storage bandwidth and thus improves performance.
Smart Images

Figure CN119902695A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computing devices, and in particular to a storage space allocation method, a FM management unit and a computing system. Background Art
[0002] In traditional computing architecture, nodes are connected to storage via a bus, and nodes can only use the memory space provided by the storage connected to the node. In scenarios where nodes need more memory space, this solution cannot meet the node's demand for memory space. Summary of the invention
[0003] The embodiment of the present application provides a storage space allocation method, a computing system and an FM management unit, which allocates the storage space of a storage pool composed of multiple storage devices to nodes in proportion, so that the nodes can use the storage space provided by multiple storage devices, thereby improving performance. The technical solution is as follows.
[0004] In a first aspect, a storage space allocation method is provided, which is applied to an FM management unit, and includes: receiving a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating the capacity corresponding to the storage space that the FM management unit needs to allocate to the first node from a CXL storage pool, the CXL storage pool including multiple storage devices; determining an allocation ratio based on the configuration capacity and a capacity parameter of each storage device in the multiple storage devices; and allocating the storage space of the CXL storage pool to the first node according to the allocation ratio.
[0005] In the method provided in the first aspect, an allocation ratio is determined according to the initial configuration capacity included in the storage space allocation request of the first node and the capacity parameters of each storage device in the multiple storage devices; according to the allocation ratio, the storage space of the CXL storage pool is allocated to the first node, thereby allocating the storage space of the storage pool composed of multiple storage devices to the nodes in proportion, so that the first node can use the storage space provided by the multiple storage devices. Since the first node can use as many storage channels as possible provided by the CXL storage pool to read and write data, it is beneficial to give full play to the storage bandwidth, thereby improving performance.
[0006] In some embodiments, the CXL storage pool includes a first storage device having a non-zero remaining capacity, and determining the allocation ratio based on the configured capacity and a capacity parameter of each storage device in the plurality of storage devices includes:
[0007] Determine the allocation ratio based on the configured capacity and a total capacity parameter, where the total capacity parameter is the sum of the capacity parameters of each storage device in the plurality of storage devices;
[0008] According to the allocation ratio, the storage space of the CXL storage pool is allocated to the first node, including:
[0009] The to-be-allocated capacity of the first storage device is determined based on the capacity parameter of the first storage device and the allocation ratio, and the storage space corresponding to the to-be-allocated capacity in the first storage device is allocated to the node.
[0010] In some implementations, the capacity parameter includes the remaining capacity, and determining the allocation ratio based on the configured capacity and the total capacity parameter includes:
[0011] Determine a first allocation ratio based on the configured capacity and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the plurality of storage devices;
[0012] Determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes:
[0013] The to-be-allocated capacity of the first storage device is determined based on the remaining capacity of the first storage device and the first allocation ratio.
[0014] In some implementations, the capacity parameter includes a specification capacity, and determining the allocation ratio based on the configuration capacity and the total capacity parameter includes:
[0015] Determine a second allocation ratio based on the configuration capacity and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the plurality of storage devices;
[0016] Determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes:
[0017] The to-be-allocated capacity of the first storage device is determined based on the specification capacity of the first storage device and the second allocation ratio.
[0018] In some implementations, the capacity parameter includes the allocated capacity, and determining the allocation ratio based on the configured capacity and the total capacity parameter includes:
[0019] Determine a third allocation ratio based on the configured capacity and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the plurality of storage devices;
[0020] Determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes:
[0021] The to-be-allocated capacity of the first storage device is obtained based on the allocated capacity of the first storage device and the third allocation ratio.
[0022] In a second aspect, a storage capacity allocation method is provided, the method being applied to a FM management unit, comprising:
[0023] receiving a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating a capacity corresponding to a storage space that the FM management unit needs to allocate to the node from a CXL storage pool, the CXL storage pool including a plurality of storage devices;
[0024] Determine an allocation ratio corresponding to a first storage device based on a capacity parameter of each storage device in the plurality of storage devices and a total capacity parameter, where the total capacity parameter is the sum of the capacity parameters of each storage device in the plurality of storage devices, and the first storage device is a storage device in the plurality of storage devices whose remaining capacity is not 0;
[0025] Determine the to-be-allocated capacity of the first storage device based on the configured capacity and the allocation ratio corresponding to the first storage device;
[0026] Allocate storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0027] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0028] A first allocation ratio corresponding to the first storage device is determined based on the remaining capacity of each storage device in the plurality of storage devices and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the plurality of storage devices.
[0029] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0030] The second allocation ratio corresponding to the first storage device is determined based on the specification capacity of each storage device in the multiple storage devices and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the multiple storage devices.
[0031] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0032] A third allocation ratio corresponding to the first storage device is determined based on the allocated capacity of each storage device in the plurality of storage devices and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the plurality of storage devices.
[0033] In a third aspect, a FM management unit is provided, including:
[0034] a receiving unit, configured to receive a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating the capacity corresponding to the storage space that the FM management unit needs to allocate to the first node from a CXL storage pool, the CXL storage pool including a plurality of storage devices;
[0035] a determining unit, configured to determine an allocation ratio based on a configuration capacity and a capacity parameter of each storage device in the plurality of storage devices;
[0036] The allocation unit is configured to allocate the storage space of the CXL storage pool to the first node according to the allocation ratio.
[0037] In some embodiments, the CXL storage pool includes a first storage device having a non-zero remaining capacity, a determining unit configured to determine the allocation ratio based on the configured capacity and a total capacity parameter, the total capacity parameter being a sum of capacity parameters of each storage device in the plurality of storage devices;
[0038] The allocation unit is used to determine the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio, and allocate the storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0039] In some embodiments, the capacity parameters include remaining capacity, and a determination unit is used to determine a first allocation ratio based on the configured capacity and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the multiple storage devices; and determine the to-be-allocated capacity of the first storage device based on the remaining capacity of the first storage device and the first allocation ratio.
[0040] In some implementations, the capacity parameter includes a specification capacity, and determining the allocation ratio based on the configuration capacity and the total capacity parameter includes:
[0041] Determine a second allocation ratio based on the configuration capacity and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the plurality of storage devices;
[0042] Determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes:
[0043] The to-be-allocated capacity of the first storage device is determined based on the specification capacity of the first storage device and the second allocation ratio.
[0044] In some implementations, the capacity parameter includes the allocated capacity, and determining the allocation ratio based on the configured capacity and the total capacity parameter includes:
[0045] Determine a third allocation ratio based on the configured capacity and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the plurality of storage devices;
[0046] Determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes:
[0047] The to-be-allocated capacity of the first storage device is obtained based on the allocated capacity of the first storage device and the third allocation ratio.
[0048] In a fourth aspect, a storage capacity allocation method is provided, the method being applied to a FM management unit, comprising:
[0049] receiving a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating a capacity corresponding to a storage space that the FM management unit needs to allocate to the node from a CXL storage pool, the CXL storage pool including a plurality of storage devices;
[0050] Determine an allocation ratio corresponding to a first storage device based on a capacity parameter of each storage device in the plurality of storage devices and a total capacity parameter, where the total capacity parameter is the sum of the capacity parameters of each storage device in the plurality of storage devices, and the first storage device is a storage device in the plurality of storage devices whose remaining capacity is not 0;
[0051] Determine the to-be-allocated capacity of the first storage device based on the configured capacity and the allocation ratio corresponding to the first storage device;
[0052] Allocate storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0053] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0054] A first allocation ratio corresponding to the first storage device is determined based on the remaining capacity of each storage device in the plurality of storage devices and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the plurality of storage devices.
[0055] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0056] The second allocation ratio corresponding to the first storage device is determined based on the specification capacity of each storage device in the multiple storage devices and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the multiple storage devices.
[0057] In some implementations, determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes:
[0058] A third allocation ratio corresponding to the first storage device is determined based on the allocated capacity of each storage device in the plurality of storage devices and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the plurality of storage devices.
[0059] In a fifth aspect, a FM management unit is provided, the FM management unit comprising: a processor, the processor being coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor, so that the FM management unit implements the methods involved in the first to fourth aspects.
[0060] In a sixth aspect, a computing system is provided, the computing system comprising: a node, an FM management unit and a CXL storage pool, the CXL storage pool comprising multiple storage devices, the node being connected to the FM management unit, the FM management unit being used to allocate and manage storage space in the CXL storage pool; the FM management unit being used to implement the method provided in the first aspect or any optional manner of the first aspect.
[0061] In a seventh aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method provided in the first aspect or any optional manner of the first aspect.
[0062] In an eighth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the first aspect or any optional method of the first aspect.
[0063] In a ninth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.
[0064] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0066] Figure 2 is a schematic diagram of the hardware architecture of a computing system provided in an embodiment of the present application;
[0067] Figure 3 is a flow chart of a storage space allocation method provided by this embodiment;
[0068] Figure 4 is a flow chart of a memory allocation method provided by this embodiment;
[0069] Figure 5 is a flow chart of another storage space allocation method provided by this embodiment;
[0070] Figure 6 This is a flowchart of another storage space allocation method provided by this embodiment. DETAILED DESCRIPTION
[0071] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0072] The following is an explanation of some terminology concepts involved in the embodiments of the present application.
[0073] (1) Compute Express Link (CXL) protocol
[0074] The CXL protocol is an open industrial standard, based on the peripheral component interconnect express (PCIe) protocol, for high-bandwidth, low-latency device interconnection. The CXL protocol can be used to connect devices such as central processing units (CPUs), accelerators, memory caches, and smart network cards. The CXL protocol can be used in scenarios such as artificial intelligence (AI) and high-performance computing. CXL reuses three types of protocols based on PCIe 5.0, namely CXL.io, CXL.cache, and CXL.memory. The CXL.io protocol is used to detect devices, configurations, register accesses, and interrupts that support the CXL protocol. The CXL.cache protocol is used for the server to access the memory of the processor inside the server and cache the memory from the processor. The CXL.memory protocol is used for the server's processor to access the server's internal memory.
[0075] (2) Fabric management (Fabric management or Fabric manager or Fabric memory, FM)
[0076] FM is a management software for managing and allocating storage space in the CXL storage pool to provide the required storage space to the node. There are many types of hardware responsible for running FM. For example, FM is run by a CXL switch chip (CXL switch), or by a CXL memory expansion card (CXL expander), or by a CXL controller; or by a CPU; or by a baseboard manager controller (BMC). In this embodiment, the hardware devices running FM are collectively referred to as FM management units. The FM management unit may include management software and hardware devices running the management software. For example, the FM management unit may be a CXL controller, a CXL switch chip, or other control chips inside a node, or an independent hardware device, such as an independent server or other terminal device.
[0077] (3) Node
[0078] A node is the smallest computing unit in a computing device. A node may include components such as a central processing unit (CPU), a south bridge chip, an internal memory, a PCIe device, and their peripheral circuits. The computing device may be a server, or a tablet computer, a personal computer, a mobile phone, or other terminal devices. The node may also include an accelerator, such as a tensor processing unit (TPU), a graphics processing unit (GPU), a neural network processing unit (NPU), a data processing unit (DPU), or a smart network interface card (smart NIC, referred to as a smart network card). A node may also be software running on a computing device. For example, a node may also be a virtual machine or a container. In this embodiment, the node supports the CXL protocol, and the node may communicate with a storage device via the CXL protocol. For example, a node may include one or more CPUs, one or more GPUs, and other chips.
[0079] (4) Storage devices
[0080] Storage devices are used to provide storage space for nodes to save data. Storage devices can be memory or hard disk. Memory can be either random access memory or read-only memory (ROM). For example, random access memory is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory, and like most random access memory (RAM), it is a volatile memory device. SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. Storage class memory can provide faster read and write speeds than hard disks, but has slower access speeds than DRAM and is cheaper than DRAM. Memory can also include other random access memories, such as static random access memory (SRAM). Read-only memory is, for example, programmable read only memory (PROM) or erasable programmable read only memory (EPROM). Exemplarily, the storage device is a dual in-line memory module or a dual in-line memory module (DIMM) memory stick. For example, the storage device is a module composed of DRAM. Exemplarily, the storage device is a memory expansion card. Exemplarily, the storage device is a memory disk with a PCIe interface. Alternatively, the storage device is a hard disk. For example, the storage device is a solid state drive (SSD) or a hard disk drive (HDD).
[0081] The embodiments of the present application relate to application scenarios of a CXL storage pool, which may include storage space provided by multiple storage devices. The storage devices in the CXL storage pool are, for example, memory or hard disks. In order to distinguish different storage devices, "first storage device" and "second storage device" are used to distinguish and describe multiple different storage devices. Since the processing logic of FM for allocating storage space from each storage device is similar, in order to make the description clear and concise, the embodiments of the present application focus on the process of how FM allocates the storage space of the first storage device to the node as an example. The process of FM allocating storage space to other storage devices other than the first storage device can refer to the process of allocating the storage space of the first storage device to the node.
[0082] (5) Specifications and capacity
[0083] The specification capacity may also be referred to as the total capacity, nominal capacity or rated capacity. The specification capacity is, for example, the theoretical maximum capacity set for the storage device by the manufacturer of the storage device during the production of the storage device. For example, the specification capacity of the storage device is 32G, 64G, 128G or 256G.
[0084] (6) Total specification capacity
[0085] The total specification capacity refers to the sum of the specification capacity of each storage device in the multiple storage devices in the CXL storage pool. The total specification capacity is obtained by, for example, adding the specification capacity of each storage device in the CXL storage pool. For example, the CXL storage pool includes storage device A, storage device B, and storage device C, and the specification capacities of storage device A, storage device B, and storage device C are 128G, 128G, and 128G, respectively, then the total specification capacity is 128G+128G+128G=384G.
[0086] (7) Configuration capacity
[0087] Configuration capacity can also be called demand capacity. Configuration capacity refers to the amount of storage space a node needs to obtain from the CXL storage pool. Configuration capacity can also be understood as the amount of storage space that FM needs to allocate to a node. For example, configuration capacity is obtained from a storage space application request initiated by a node to the FM management unit.
[0088] (8) Remaining capacity
[0089] The remaining capacity can also be called unallocated capacity, free capacity or available capacity. The remaining capacity refers to the capacity of the storage space in the storage device that has not been allocated to the node for use. The remaining capacity is, for example, the capacity of the free storage space in the storage device. For example, if the storage device has a specification capacity of 100G and 20G of the storage space has been allocated to the node in the storage space with a capacity of 100G, the remaining capacity of the storage device is 80G.
[0090] (9) Total remaining capacity
[0091] The total remaining capacity refers to the sum of the remaining capacity of each storage device in the multiple storage devices in the CXL storage pool. The total remaining capacity is obtained by, for example, adding the remaining capacity of each storage device in the CXL storage pool. The total remaining capacity is used to indicate the total free storage capacity of the CXL storage pool that has not yet been allocated. For example, the CXL storage pool includes storage device A, storage device B, and storage device C, and the remaining capacities of storage device A, storage device B, and storage device C are 10G, 20G, and 30G, respectively. Then the total remaining capacity is 10G+20G+30G=60G, indicating that the total amount of memory in the CXL storage pool that has not yet been allocated is 60G.
[0092] (10) Allocated capacity
[0093] Allocated capacity can also be called used capacity. Allocated capacity refers to the capacity of the storage space on the storage device that has been allocated to the node. For example, allocated capacity is the capacity of the storage space on the storage device that has been occupied. For example, if the specification capacity of a storage device is 128G, after FM allocates 28G of storage space in the storage device to the node, the allocated capacity is 28G.
[0094] (11)Total allocated capacity
[0095] The total allocated capacity refers to the sum of the allocated capacity of each storage device in the multiple storage devices in the CXL storage pool. The total allocated capacity is obtained by, for example, adding the allocated capacity of each storage device in the CXL storage pool. For example, the CXL storage pool includes storage device A, storage device B, and storage device C, and the allocated capacities of storage device A, storage device B, and storage device C are 15G, 15G, and 30G, respectively. Then the total allocated capacity is 15G+15G+30G=60G, indicating that the total allocated storage capacity of the CXL storage pool is 60G.
[0096] (12) Capacity parameters and total capacity parameters
[0097] The capacity parameter refers to a parameter used to describe the memory capacity of a storage device. The capacity parameter includes but is not limited to at least one of the specification capacity, the allocated capacity, or the remaining capacity. The total capacity parameter refers to the sum of the capacity parameters of each storage device in the multiple storage devices in the CXL storage pool. The total capacity parameter includes at least one of the total specification capacity, the total allocated capacity, or the total remaining capacity.
[0098] (13) Storage Channel
[0099] A storage channel refers to a channel between a node and a storage device. A storage channel is used to transmit data or instructions between a node and a storage device. For example, if the CXL storage pool is a memory pool, a storage channel is a memory channel, and a memory channel is a channel between a processor (such as a CPU) and a memory. For another example, a storage channel is a channel between a CPU and a hard disk.
[0100] (14) Storage channel bandwidth
[0101] The bandwidth of a storage channel refers to the amount of data that can be transmitted in a storage channel per unit time. The larger the bandwidth of a storage channel, the faster the memory read and write speed, thereby speeding up data access and processing and improving performance. Improving the bandwidth of a storage channel is particularly important for applications that require large data throughput and high-performance computing, such as data centers, scientific computing, and massively parallel computing.
[0102] (15) Storage capacity table
[0103] The storage capacity table is used to record the information of all storage devices in the CXL storage pool. The information of the storage device includes the identification of the storage device and the capacity parameters of the storage device. The identification of the storage device is used to identify the corresponding storage device. The identification of the storage device is, for example, the serial number of the storage device. The capacity parameters of the storage device include but are not limited to the capacity specification of the storage device, the used capacity of the storage device, and the remaining capacity of the storage device. In a possible implementation, the storage capacity table is also used to record the total capacity parameters of all storage devices in the CXL storage pool. The total capacity parameters include the total specification capacity, the total allocated capacity, and the total remaining capacity.
[0104] In a possible implementation of generating a storage capacity table, when the FM management unit is powered on, the FM detects all storage devices connected to the FM, the FM reads the information of the corresponding storage device from each storage device, and the FM generates a storage capacity table based on the information of all storage devices. The memory capacity table includes information of all storage devices connected to the FM. The FM saves the memory capacity table when it is powered off, so that the storage capacity table can be read and the storage capacity table can be continued to be used for storage space allocation when it is powered on next time. The FM can save the storage capacity table on the persistent storage in the hardware where the FM is located, and the FM can also save the storage capacity table on the persistent storage of the node.
[0105] Exemplarily, the storage capacity table is shown in Table 1 below. The items in the row of ellipsis ... in Table 1 represent the specification capacity, allocated capacity and remaining capacity of storage devices that are not shown in Table 1 but exist. The items in the row of summary represent the total specification capacity, total allocated capacity and total remaining capacity of m storage devices in the CXL storage pool. The total specification capacity is obtained by summing the specification capacity (128G) of storage device 1, the specification capacity (256G) of storage device 2, ..., and the specification capacity (256G) of storage device m. The total allocated capacity is obtained by summing the allocated capacity (6G) of storage device 1, the allocated capacity (12G) of storage device 2, ..., and the allocated capacity (12G) of storage device m. The total remaining capacity is obtained by summing the remaining capacity (122G) of storage device 1, the remaining capacity (244G) of storage device 2, ..., and the remaining capacity (244G) of storage device m.
[0106] Table 1 Storage capacity table
[0107] Storage device identification Specifications and capacity Allocated capacity Remaining capacity Storage device 1 128G 6G 122G Storage Device 2 256G 12G 244G …… …… …… …… Storage device m 256G 12G 244G Summary Total specification capacity Total allocated capacity Total remaining capacity
[0108] Since FM adopts a proportional allocation method, and the specification capacity of storage device 1, the specification capacity of storage device 2, and the specification capacity of storage device m are 128G, 256G, and 256G respectively, the ratio between the specification capacity of storage device 1, the specification capacity of storage device 2, and the specification capacity of storage device m = 128G:256G:256G=1:2:2, so FM can be allocated in a ratio of 1:2:2. For example, as shown in Table 1, the allocated capacity of storage device 1, the allocated capacity of storage device 2, and the allocated capacity of storage device m are 6G, 12G, and 12G respectively.
[0109] The following is an example of an application scenario of the embodiment of the present application.
[0110] The embodiments of the present application can be applied to a scenario where FM allocates storage space to a node from a CXL storage pool. Figure 1 (a) or Figure 1 In (b), the storage space in the CXL storage pool is, for example, the memory space provided by the memory stick. Figure 1 In (c), the storage space in the CXL storage pool includes the memory space provided by the memory module, the storage space provided by the SSD, and the storage space provided by the HDD.
[0111] In the architecture of traditional computing devices, such as Figure 1As shown in (a), the memory sticks are directly connected to the nodes through the bus, and the nodes can only use the memory space provided by the memory sticks directly connected to them. For example, node 1 is directly connected to memory sticks 1, 2, and 3, and node 2 is directly connected to memory sticks 4, 5, and 6. The memory space of any memory stick among memory sticks 1, 2, and 3 can only be allocated to node 1 and cannot be allocated to node 2. The memory space of any memory stick among memory sticks 4, 5, and 6 can only be allocated to node 2 and cannot be allocated to node 1. As a result, each node can only use the memory space provided by three memory sticks. When the CPU in the node needs to use the memory space, the memory capacity and bandwidth available to the CPU will be limited by the number of CPU pins, and the memory capacity and bandwidth are difficult to expand.
[0112] The problem of memory capacity and bandwidth being limited by CPU pins can be solved by establishing a storage pool system through the CXL protocol. For example, a large number of memory sticks are combined into a storage pool, and then the CXL protocol is used to connect the storage pool to the CPUs in multiple nodes, so that the memory space in the storage pool can be allocated to multiple CPUs as needed. For example, please refer to the attached Figure 1 (b), attached Figure 1 (b) shows a scenario of interconnecting multiple nodes and storage pools based on a CXL controller. Memory bars 1, 2 to 6 form a storage pool. A portion of the interfaces of the CXL controller are connected to each of the memory bars 1, 2 to 6, and another portion of the interfaces of the CXL controller are connected to node 1 and node 2, respectively. The CXL controller can run FM management software, and the CXL controller manages the allocation of memory space of each of the memory bars 1, 2 to 6 based on the FM management software. The CXL controller can allocate the memory space of any memory bar among memory bars 1, 2 to 6 to node 1 or node 2, so that node 1 and node 22 can share the memory space of 6 memory bars. Since each node connected to the CXL controller can share the memory space of all memory bars connected to the CXL controller, the problem of memory capacity and bandwidth being limited by CPU pins in the node is solved to a certain extent.
[0113] For example, please refer to the attached Figure 1 (c), attached Figure 1 (c) shows a scenario where multiple nodes and storage pools are interconnected based on a CXL switch. FM management software can also be run on the CXL switch to manage and allocate memory space in the storage pool. In addition, the CXL switch can provide more interfaces than the CXL controller. The CXL switch can connect to multiple nodes and storage pools, allowing more nodes to share the storage space in the storage pool.
[0114] The storage pool implemented based on CXL (hereinafter referred to as CXL storage pool) is composed of memory bars, which is only exemplary. The CXL storage pool can also be composed of other types of storage devices. For example, the CXL storage pool can also include hard disks such as SSD or HDD. For example, FM allocates the storage space in the SSD as storage space to the node. In addition, the storage capacity of each storage device in the CXL storage pool can be the same; the storage capacity of each storage device in the CXL storage pool can also be different; the type of each storage device in the CXL storage pool can be the same, for example, the type of each storage device in the CXL storage pool is a DIMM memory bar. Alternatively, the type of each storage device in the CXL storage pool can also be different. For example, the type of some storage devices in the CXL storage pool is a DIMM memory bar, and the type of other storage devices is a hard disk.
[0115] In addition, allocating the storage space in the CXL storage pool to the CPU is only exemplary, and the storage space in the CXL storage pool may also be allocated to other hardware entities, for example, allocating the storage space in the CXL storage pool to an accelerator or a server.
[0116] In summary, please refer to the attached Figure 2 , attached Figure 2 1 is a schematic diagram of the hardware architecture of a computing system 10 provided in an embodiment of the present application. Figure 2 The computing system 10 shown may be a Figure 1 The system shown in (b) or the attached Figure 1 The system shown in (c).
[0117] The computing system 10 includes n nodes, a FM management unit 200 , and a CXL storage pool. The CXL storage pool includes m storage devices, where n is a positive integer greater than or equal to 1, and m is a positive integer greater than or equal to 1.
[0118] Nodes 1-n can be used to process business data. Nodes 1-n can use the memory space provided by the CXL storage pool to temporarily cache business data. For further explanation of nodes, please refer to (3) in the above terminology concept section. Figure 2 Node 1 in the Figure 1 (b) or attached Figure 1 Node 1 in (c) is attached Figure 2 Node 2 in the Figure 1 (b) or attached Figure 1 Node 2 in (c).
[0119] Nodes 1-n may be n servers, or multiple nodes may be deployed in one server. For example, nodes 1-4 may be deployed in one server, and nodes 5-n may be deployed in other servers. The corresponding quantity relationship between nodes and servers is not specifically limited here.
[0120] In some implementations, the n nodes, Node 1 to Node n, are deployed on a server, and the CXL storage pool is a storage system independent of the server.
[0121] The n nodes can be separated from each other. For example, the n nodes are n servers. The n nodes can also be integrated into the same hardware entity. For example, the n nodes are deployed on the same server.
[0122] The FM management unit 200 is hardware for running the FM 221. The FM management unit 200 is, for example, an attached Figure 1 The CXL controller shown in (b) of FIG. 1 is also shown in FIG. Figure 1 The CXL switch chip shown in (c) of FIG. FM management unit 200 is also a CXL storage expansion card, such as a CXL memory expansion card.
[0123] The FM management unit 200 includes a processor 210, a memory 220, an interface 230, an interface 240, and a bus 250. The processor 210, the memory 220, the interface 230, and the interface 240 are communicatively connected via the bus 250.
[0124] The bus 250 may be a peripheral component interconnect (PCI) bus, a PCIe bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 The bus 250 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 250 may include a path for transmitting information between various components of the FM management unit 200 (eg, the processor 210, the memory 220, the interface 230, and the interface 240).
[0125] The interface 230 uses a transceiver module such as, but not limited to, a network interface card, a transceiver, an optical module, etc. to realize communication between the FM management unit 200 and the n nodes. The interface 230 is, for example, one interface, or the interface 230 includes a combination of multiple interfaces. The present embodiment does not limit the number of interfaces 230.
[0126] The interface 240 uses a transceiver module such as, but not limited to, a network interface card, a transceiver, or an optical module to implement communication between the FM management unit 200 and the m storage devices in the CXL storage pool. In a possible implementation, the interface 240 is a PCIe interface, each of the m storage devices in the CXL storage pool includes a PCIe interface, and the PCIe interface of the FM management unit 200 is connected to the m storage devices in the CXL storage pool via a PCIe bus. The interface 240 is, for example, a single interface, or a combination of multiple interfaces. The present embodiment does not limit the number of interfaces 240.
[0127] The FM management unit 200 may be an independent physical hardware device. The FM management unit 200 and each storage device in the CXL storage pool may be completely separated and not located on the same device.
[0128] The CXL storage pool is a storage device independent of the nodes 1 - n; the FM management unit may be independent of the server deployed by the nodes 1 - n and the CXL storage pool, for example, the FM management unit may be another computing device or a terminal device.
[0129] The FM management unit 200 may also be integrated with each storage device in the CXL storage pool in the same device. For example, the FM management unit 200 may also be integrated with each storage device in the CXL storage pool in a storage server.
[0130] Currently, there is a lack of solutions for how to allocate storage space in a CXL storage pool. Based on this, an embodiment of the present application provides a method for allocating storage space to nodes according to a fixed allocation ratio for each storage device in a CXL storage pool.
[0131] The allocation ratio is used to indicate the capacity of storage space that a storage device needs to provide or the capacity of storage space that FM needs to allocate from a storage device.
[0132] In a first possible way to determine the allocation ratio, the allocation ratio is determined based on the configuration capacity and the total capacity parameter. For example, the allocation ratio is the ratio between the configuration capacity and the total capacity parameter. For example, the allocation ratio is the ratio between the configuration capacity and the total specification capacity. For another example, the allocation ratio is the ratio between the configuration capacity and the total allocated capacity. For another example, the allocation ratio is the ratio between the configuration capacity and the total remaining capacity.
[0133] Combined with the above allocation ratio determination method, when FM allocates memory, FM can determine an allocation ratio based on the configuration capacity and the total capacity parameters, and determine the capacity of the storage space allocated from each storage device based on the capacity parameters and allocation ratio of each storage device participating in the memory allocation in the CXL storage pool. For example, the capacity of the storage space allocated by FM from a storage device is the product of the capacity parameter of the storage device and the allocation ratio. For example, the capacity of the storage space allocated by FM from a storage device is the product of the remaining capacity of the storage device and the first allocation ratio, and the first allocation ratio is the ratio between the configuration capacity and the total remaining capacity. For another example, the capacity of the storage space allocated by FM from a storage device is the product of the specification capacity of the storage device and the second allocation ratio, and the second allocation ratio is the ratio between the specification capacity and the total specification capacity. For another example, the capacity of the storage space allocated by FM from a storage device is the product of the allocated capacity of the storage device and the third allocation ratio, and the third allocation ratio is the ratio between the configuration capacity and the total allocated capacity.
[0134] The storage devices participating in the memory allocation in the CXL storage pool are, for example, all the storage devices connected to the FM, or the storage devices connected to the FM and matching the setting parameters configured by the user. For example, the setting parameters configured by the user are, for example, the type of storage device. The type of storage device is, for example, a hard disk or a memory. The parameters of the target storage device match the setting parameters, for example, the type of storage device is the same as the type of storage device set in advance. For example, the user sets the type of storage device participating in the storage space allocation to be a memory, and the FM determines from the CXL memory pool a storage device whose remaining capacity is not zero and whose type is a memory as the target storage device. The user divides the CXL storage pool into a plurality of storage device groups, and each storage device group includes one or more storage devices. The FM management unit assigns a corresponding group identifier to each storage device group. The storage space application request sent by the node includes a group identifier, thereby specifying the allocation of storage space from the storage devices in the corresponding storage device group. The FM can use all storage devices in the storage device group corresponding to the group identifier as storage devices that need to participate in the memory allocation in the CXL storage pool.
[0135] In a second possible way of determining the allocation ratio, the allocation ratio of a storage device is determined based on the capacity parameter of the storage device. The allocation ratio of a storage device is positively correlated with the capacity parameter of the storage device. In other words, if the capacity parameter of a storage device is larger, the more storage space FM allocates from the storage device, and if the capacity parameter of a storage device is smaller, the less storage space FM allocates from the storage device. For example, the allocation ratio corresponding to a storage device is the ratio between the capacity parameter of the storage device and the total capacity parameter of each storage device in the CXL storage pool. For example, the allocation ratio of a storage device is the ratio between the remaining capacity of the storage device and the total remaining capacity of each storage device in the CXL storage pool. For another example, the allocation ratio of a storage device is the ratio between the specification capacity of the storage device and the total specification capacity of each storage device in the CXL storage pool. For another example, the allocation ratio of a storage device is the ratio between the allocated capacity of the storage device and the total allocated capacity of each storage device in the CXL storage pool.
[0136] Combined with the above allocation ratio determination method, when FM allocates memory, FM can determine the allocation ratio of the corresponding storage device based on the capacity parameters of each storage device, and determine the capacity of the storage space allocated from each storage device based on the corresponding allocation ratio and configuration capacity of each storage device. The ratio between the capacities of the storage space allocated by FM from different storage devices can be equal to the ratio between the capacity parameters of different storage devices. For example, if the capacity parameter of storage device A is k times the capacity parameter of storage device B, then the capacity of the storage space allocated by FM from storage device A is k times the capacity of the storage space allocated by FM from storage device B, where k is a positive integer. For example, storage device A and storage device B participate in memory allocation, the configuration capacity is 3G, the remaining capacity of storage device A is 128G, and the remaining capacity of storage device B is 64G. FM allocates 2G of storage space from storage device A, and FM allocates 1G of storage space from storage device B.
[0137] Regardless of the allocation ratio determination method, since FM allocates storage space according to the allocation ratio, each time memory is allocated, FM can allocate the storage space of each storage device participating in memory allocation in the CXL storage pool to the same node. In other words, each storage device participating in memory allocation in the CXL storage pool can provide storage space to the same node. Storage devices with large capacity parameters provide more storage space, and storage devices with small capacity parameters provide less storage space, avoiding the situation where all storage space of some storage devices has been allocated (the remaining capacity is 0), but other storage devices still have remaining storage space that has not been allocated. Therefore, when the node uses the allocated storage space to read and write data, the node can concurrently access the storage space provided by multiple storage devices, thereby improving the performance of node reading and writing data.
[0138] For example, please refer to the attached Figure 2 , Figure 2 In the figure, the storage space is represented by a rectangle. The ratio of the specification capacity of storage device 1, storage device 2, storage device 3 and storage device m is 1:2:1:4. Therefore, FM allocates storage space to storage device 1, storage device 2, storage device 3 and storage device m according to the allocation ratio of 1:2:1:4 (in Figure 2 The filled rectangle in the figure represents the capacity of the allocated storage space).
[0139] In addition, since each storage device participating in the storage space allocation in the CXL storage pool must allocate storage space to the node, it is avoided that the storage space of only one storage device is allocated to the node, resulting in insufficient bandwidth resources and performance limitations caused by the node being able to use only one storage channel between the storage device to read and write data. For example, the CXL storage pool includes a total of m storage devices. After the storage space of m storage devices is allocated to the same node, the data generated by the node can be concurrently transmitted to the m storage devices through m storage channels, so that all m storage channels can be used, improving the utilization of memory bandwidth.
[0140] In addition, since the ratio between the capacity of the storage space provided by each storage device participating in the storage space allocation in the CXL storage pool meets the ratio between the remaining capacities of the corresponding storage devices, storage devices with large remaining capacities provide more storage space, and storage devices with small remaining capacities provide less storage space, thereby making the load of each storage device relatively balanced and the load of each storage channel relatively balanced.
[0141] In addition, when the first allocation ratio determination method is adopted, FM does not need to determine the corresponding allocation ratio for each storage device in the CXL storage pool. Each storage device can share the same allocation ratio, so the calculation complexity is relatively small and the processing logic is relatively simple.
[0142] Attached Figure 3 : is a flow chart of a memory allocation method provided by this embodiment. Figure 3 The method shown includes the following steps S301 to S305.
[0143] Attached Figure 3 The method shown can be applied to the Figure 1 For example, the system architecture shown in (b) is Figure 3 In the method shown, FM is the Figure 1 (b) CXL controller, attached Figure 3 The node in the method shown is attached Figure 1 (b) Node 1 or Node 2.
[0144] Attached Figure 3 The method shown can also be applied to the Figure 1 The system architecture is shown in (c). Figure 3 In the method shown, FM is the Figure 1 (c) CXL switch chip, attached Figure 3 The node in the method shown is attached Figure 1 (c) Node 1 or Node 2.
[0145] Attached Figure 3 The method shown can also be applied to the Figure 2 For example, the attached Figure 3 In the method shown, FM is the Figure 2 The software running in the FM management unit 200 is attached Figure 3 The node in the method shown is attached Figure 2 Any node among the n nodes, attached Figure 3 In the method shown, the CXL storage pool is attached Figure 2 CXL storage pool.
[0146] Step S301: The node sends a storage space application request to the FM.
[0147] The storage space application request is used to request FM to allocate storage space for the node. The storage space includes the storage space and the storage space provided by the hard disk. The node sends a storage space application request to FM to inform FM that the node needs to obtain storage space, thereby triggering FM to perform the storage space allocation process. The storage space application request can be a message with the encapsulation format specified by the CXL protocol.
[0148] In a possible implementation, the storage space application request is used to indicate the configuration capacity requested to be allocated by the first node. The configuration capacity indicates the capacity of the storage space that the node needs to obtain from the CXL storage pool, and the configuration capacity can be understood as how much storage space the node needs. The configuration capacity is the configuration capacity based on which the FM performs storage space allocation. Exemplarily, if the node needs to obtain a storage space with a capacity of 60G, the storage space application request sent by the node to the FM can carry a data indication of "60G". Since the storage space application request is used to indicate the configuration capacity requested to be allocated by the first node, the FM can accurately determine the capacity of the storage space that needs to be allocated to the node based on the configuration capacity. Optionally, the storage space application request also includes a group identifier, and the group identifier is used to identify the corresponding storage device group in the CXL storage pool. Since the storage space application request includes the group identifier, it instructs the FM to allocate storage space to the node from the specified storage device group, so that all storage devices in the specified storage device group participate in the storage space allocation process, and the storage devices that do not belong to the storage device group in the CXL storage pool do not need to participate in the storage space allocation process.
[0149] Step S302, FM receives a storage space allocation request, FM obtains the total remaining capacity of multiple storage devices in the CXL storage pool, and FM compares the total remaining capacity of multiple storage devices with the configured capacity. If the total remaining capacity of multiple storage devices is greater than or equal to the configured capacity, FM further executes step S303. If the total remaining capacity of multiple storage devices is less than the configured capacity, FM further executes step S305.
[0150] In one possible implementation of determining the total remaining capacity, FM searches the memory storage space capacity table based on the identifier of each storage device in the CXL storage pool to obtain the remaining capacity of each storage device in the CXL storage pool; FM accumulates the remaining capacity of each storage device in the CXL storage pool to obtain the total remaining capacity. In another possible implementation of determining the total remaining capacity, the memory storage space capacity table itself records the total remaining capacity of all storage devices in the CXL storage pool, and FM searches the memory storage space capacity table to obtain the total remaining capacity of all storage devices in the CXL storage pool. In yet another possible implementation of determining the total remaining capacity, FM searches the memory storage space capacity table based on the group identifier to obtain the remaining capacity of each storage device in the CXL storage pool that belongs to the storage device group corresponding to the group identifier, and FM accumulates the remaining capacity of each storage device in the storage device group to obtain the total remaining capacity of the storage device group.
[0151] Step S303: FM determines a first allocation ratio based on the configured capacity and the total remaining capacity.
[0152] In a possible implementation, the first allocation ratio is positively correlated with the configured capacity, and negatively correlated with the total remaining capacity. For example, the first allocation ratio is the ratio between the configured capacity and the total remaining capacity.
[0153] Step S304, FM obtains the to-be-allocated capacity of the first storage device based on the remaining capacity and the allocation ratio of the first storage device, and allocates the storage space corresponding to the to-be-allocated capacity in the first storage device to the node. All storage devices in the CXL storage pool sequentially provide storage space to the first node in this allocation manner.
[0154] In a possible implementation, the to-be-allocated capacity of the first storage device is the product of the remaining capacity of the first storage device and the first allocation ratio. In a possible implementation of obtaining the to-be-allocated capacity of the first storage device, FM searches the storage space capacity table based on the identifier of the first storage device to obtain the remaining capacity of the first storage device; FM obtains the product of the remaining capacity of the first storage device and the first allocation ratio to obtain the to-be-allocated capacity of the first storage device.
[0155] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3. The remaining capacity of storage device 1 is 15G, the remaining capacity of storage device 2 is 15G, and the remaining capacity of storage device 3 is 30G. Then the total remaining capacity of multiple storage devices is 15G+15G+30G=60G. The configuration capacity carried in the storage space allocation request sent by the node is 20G. FM determines that the first allocation ratio is 20G / 60G=1 / 3. FM determines that the capacity to be allocated of storage device 1 = the remaining capacity of storage device 1 * the first allocation ratio = 15G*1 / 3=5G, the capacity to be allocated of storage device 2 = the remaining capacity of storage device 2 * the first allocation ratio = 15G*1 / 3=5G, and the capacity to be allocated of storage device 3 = the remaining capacity of storage device 3 * the first allocation ratio = 30G*1 / 3=10G.
[0156] In another possible implementation, Figure 3 Step S303 is replaced by the following step S313, and step S304 is replaced by the following step S314, which can also achieve the allocation of storage space in proportion based on the remaining capacity.
[0157] Step S313: FM determines the allocation ratio corresponding to the first storage device based on the remaining capacity of the first storage device and the total remaining capacity of the plurality of storage devices.
[0158] In a possible implementation, the allocation ratio corresponding to the first storage device is positively correlated with the remaining capacity of the first storage device, and the allocation ratio corresponding to the first storage device is negatively correlated with the total remaining capacity. For example, the allocation ratio corresponding to the first storage device is the ratio between the remaining capacity of the first storage device and the total remaining capacity.
[0159] Step S314: FM obtains the to-be-allocated capacity of the first storage device based on the allocation ratio and the configuration capacity corresponding to the first storage device, and FM allocates the storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0160] In a possible implementation, the to-be-allocated capacity of the first storage device is positively correlated with the configured capacity, and the to-be-allocated capacity of the first storage device is positively correlated with the allocation ratio corresponding to the first storage device. For example, the to-be-allocated capacity of the first storage device is the product of the configured capacity and the allocation ratio corresponding to the first storage device.
[0161] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3. The remaining capacity of storage device 1 is 15G, the remaining capacity of storage device 2 is 15G, and the remaining capacity of storage device 3 is 30G. The total remaining capacity of the three storage devices is 15G+15G+30G=60G. The configuration capacity carried in the storage space allocation request sent by the node is 20G. FM determines that the corresponding allocation ratio of storage device 1 is =15G / 60G=1 / 4, the corresponding allocation ratio of storage device 2 is =15G / 60G=1 / 4, and the corresponding allocation ratio of storage device 3 is =30G / 60G=1 / 2. FM determines that the capacity to be allocated of storage device 1 = configured capacity * allocation ratio corresponding to storage device 1 = 20G * 1 / 4 = 5G, the capacity to be allocated of storage device 2 = configured capacity * allocation ratio corresponding to storage device 2 = 20G * 1 / 4 = 5G, and the capacity to be allocated of storage device 3 = configured capacity * allocation ratio corresponding to storage device 3 = 20G * 1 / 2 = 10G.
[0162] Step S305: If the total remaining capacity of the plurality of storage devices is less than the configured capacity or the configured capacity is not greater than 0, the FM generates a configuration error message, and the FM sends the configuration error message to the node.
[0163] A configuration error message indicates that FM was unable to configure storage for the node. For example, a configuration error message indicates that an error occurred during the storage allocation process.
[0164] If the total remaining capacity of multiple storage devices is less than the configured capacity, it indicates that the node has requested too much storage space, and the storage space requested by the node exceeds the total amount of storage space that FM can allocate (the total remaining capacity of all storage devices in the CXL storage pool). Even if FM allocates the total remaining capacity of all storage devices to the node, the allocated storage space still cannot meet the node's needs. In this case, FM can directly notify the node of a configuration error without executing the storage space allocation process.
[0165] If the configuration capacity is not greater than 0, it indicates that the node does not need storage space. Therefore, when the configuration capacity is not greater than 0, FM does not need to execute the storage space allocation process and can send a configuration error message to the node.
[0166] The method provided in this embodiment allocates the storage space required for the node according to the ratio of the remaining capacity of each storage device to the total remaining capacity, so that all storage devices can provide storage space to one node at the same time. Therefore, the node can use all storage channels concurrently, and the bandwidth performance between each node is stable, balanced and equal.
[0167] In addition, an effective method for allocating and managing storage space in a CXL storage pool is implemented, so that multiple nodes can share the storage space in the CXL storage pool.
[0168] In addition, the storage space required by each node is distributed across all storage devices in the CXL storage pool, enabling concurrent use of multiple storage channels, which helps to fully utilize the storage space bandwidth.
[0169] In addition, the storage space in the CXL storage pool is used in a more balanced manner, and the bandwidth performance provided to each node is more balanced.
[0170] In the attached Figure 3 In the embodiment, the allocation ratio is determined based on the remaining capacity. In another possible implementation, the allocation ratio is determined based on the specification capacity. Figure 4 Description of embodiments.
[0171] Attached Figure 4 FIG. 1 is a flow chart of another storage space allocation method provided by this embodiment. Figure 4 The method shown in the attached Figure 3 The difference between the methods shown is that Figure 3 In the method shown, step S303 is replaced by Figure 4 Step S403 of the method shown, Figure 3 Step S304 in the method shown is replaced by Figure 4 Step S404 in the method shown, Figure 4 For other steps in the method shown, please refer to the attached Figure 3 Description of the method.
[0172] Step S403: FM determines a second allocation ratio based on the configuration capacity and the total specification capacity.
[0173] In a possible implementation, the second allocation ratio is positively correlated with the configuration capacity, and the second allocation ratio is negatively correlated with the total specification capacity. For example, the second allocation ratio is a ratio between the configuration capacity and the total specification capacity.
[0174] Step S404, FM determines the to-be-allocated capacity of the first storage device based on the specification capacity of the first storage device and the second allocation ratio, and FM allocates storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0175] In a possible implementation, the to-be-allocated capacity of the first storage device is positively correlated with the specification capacity of the first storage device, and the to-be-allocated capacity of the first storage device is positively correlated with the second allocation ratio. For example, the to-be-allocated capacity of the first storage device is the product of the specification capacity of the first storage device and the second allocation ratio.
[0176] In a possible implementation method of obtaining the to-be-allocated capacity of the first storage device, FM searches the storage space capacity table based on the identifier of the first storage device to obtain the specification capacity of the first storage device; FM obtains the to-be-allocated capacity of the first storage device based on the product of the specification capacity of the first storage device and the second allocation ratio.
[0177] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3. The specification capacity of storage device 1 is 128G, the specification capacity of storage device 2 is 128G, and the specification capacity of storage device 3 is 256G. Then the total specification capacity is 128G+128G+256G=512G. The configuration capacity carried in the storage space allocation request sent by the node is 4G. FM determines that the second allocation ratio is configuration capacity / total specification capacity=4G / 512G=1 / 128. FM determines that the capacity to be allocated of storage device 1=the specification capacity of storage device 1*the second allocation ratio=128G*(1 / 128)=1G, the capacity to be allocated of storage device 2=the specification capacity of storage device 2*the second allocation ratio=128G*(1 / 128)=1G, and the capacity to be allocated of storage device 3=the specification capacity of storage device 3*the second allocation ratio=256G*(1 / 128)=2G.
[0178] In another possible implementation, Figure 4 Step S303 is replaced by the following step S413, and step S404 is replaced by the following step S414, which can also achieve proportional allocation of storage space based on specification capacity.
[0179] Step S413: FM determines a second allocation ratio corresponding to the first storage device based on the specification capacity of the first storage device and the total specification capacity of the plurality of storage devices.
[0180] In one possible implementation, the second allocation ratio corresponding to the first storage device is positively correlated with the specification capacity of the first storage device and negatively correlated with the total specification capacity. For example, the second allocation ratio corresponding to the first storage device is the ratio between the specification capacity of the first storage device and the total specification capacity.
[0181] Step S414, FM determines the to-be-allocated capacity of the first storage device based on the second allocation ratio and the configured capacity corresponding to the first storage device, and FM allocates the storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0182] In a possible implementation, the to-be-allocated capacity of the first storage device is positively correlated with the configured capacity, and the to-be-allocated capacity of the first storage device is positively correlated with the second allocation ratio corresponding to the first storage device. For example, the to-be-allocated capacity of the first storage device is the product of the configured capacity and the second allocation ratio corresponding to the first storage device.
[0183] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3. The specification capacity of storage device 1 is 128G, the specification capacity of storage device 2 is 128G, and the specification capacity of storage device 3 is 256G. The total specification capacity of multiple storage devices is 128G+128G+256G=512G, and the configuration capacity carried in the storage space allocation request sent by the node is 4G. FM determines that the second allocation ratio corresponding to storage device 1 = specification capacity of storage device 1 / total specification capacity = 128G / 512G=1 / 4, the second allocation ratio corresponding to storage device 2 = specification capacity of storage device 2 / total specification capacity = 128G / 512G=1 / 4, and the second allocation ratio corresponding to storage device 3 = specification capacity of storage device 3 / total specification capacity = 256G / 512G=1 / 2. FM determines that the capacity to be allocated of storage device 1 = configured capacity * the second allocation ratio corresponding to storage device 1 = 4G*1 / 4 = 1G, the capacity to be allocated of storage device 2 = configured capacity * the second allocation ratio corresponding to storage device 3 = 4G*1 / 4 = 1G, and the capacity to be allocated of storage device 3 = configured capacity * the second allocation ratio corresponding to storage device 3 = 4G*1 / 2 = 2G.
[0184] The method provided in this embodiment allocates the storage space required for the node according to the ratio of the specification capacity of each storage device to the total specification capacity, so that all storage devices can provide storage space to one node at the same time. Therefore, the node can use all storage channels concurrently, and the bandwidth performance between each node is stable, balanced and equal.
[0185] In the attached Figure 3 In an embodiment, the allocation ratio is determined based on the remaining capacity. In another possible implementation, the allocation ratio is determined based on the allocated capacity. Figure 5 Description of embodiments.
[0186] Attached Figure 5 FIG. 1 is a flow chart of another storage space allocation method provided by this embodiment. Figure 5 The method shown in the attached Figure 3 The difference between the methods shown is that Figure 3 In the method shown, step S303 is replaced by Figure 5 In step S503 of the method shown, Figure 3 Step S304 in the method shown is replaced by Figure 5In step S504 of the method shown, Figure 5 For other steps in the method shown, please refer to the attached Figure 3 Description of the method.
[0187] Step S503: FM determines a third allocation ratio based on the configured capacity and the total allocated capacity of the plurality of storage devices.
[0188] In a possible implementation, the third allocation ratio is positively correlated with the configured capacity, and negatively correlated with the total allocated capacity. For example, the third allocation ratio is a ratio between the configured capacity and the total allocated capacity.
[0189] Step S504: FM determines the to-be-allocated capacity of the first storage device based on the allocated capacity of the first storage device and the third allocation ratio, and FM allocates storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0190] In a possible implementation, the capacity to be allocated of the first storage device is positively correlated with the allocated capacity of the first storage device, and the capacity to be allocated of the first storage device is positively correlated with the third allocation ratio. For example, the capacity to be allocated of the first storage device is the product of the allocated capacity of the first storage device and the third allocation ratio.
[0191] In a possible implementation method of obtaining the to-be-allocated capacity of the first storage device, FM searches the storage space capacity table based on the identifier of the first storage device to obtain the allocated capacity of the first storage device; FM obtains the product of the allocated capacity of the first storage device and the third allocation ratio to obtain the to-be-allocated capacity of the first storage device.
[0192] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3, the allocated capacity of storage device 1 is 15G, the allocated capacity of storage device 2 is 15G, and the allocated capacity of storage device 3 is 30G. Then the total allocated capacity of multiple storage devices is 15G+15G+30G=60G, the configuration capacity carried in the storage space allocation request sent by the node is 20G, and the third allocation ratio is 20G / 60G=1 / 3. FM determines that the capacity to be allocated of storage device 1 = 15G*1 / 3 = 5G, the capacity to be allocated of storage device 2 = 15G*1 / 3 = 5G, and the capacity to be allocated of storage device 3 = 30G*1 / 3 = 10G.
[0193] In another possible implementation, Figure 5 Step S503 is replaced by the following step S513, and step S504 is replaced by the following step S514, which can also achieve proportional allocation of storage space based on the allocated capacity.
[0194] Step S513: FM determines a third allocation ratio corresponding to the first storage device based on the allocated capacity of the first storage device and the total allocated capacity of the plurality of storage devices.
[0195] In a possible implementation, the third allocation ratio corresponding to the first storage device is positively correlated with the allocated capacity of the first storage device, and the third allocation ratio corresponding to the first storage device is negatively correlated with the total allocated capacity. For example, the third allocation ratio corresponding to the first storage device is the ratio between the allocated capacity of the first storage device and the total allocated capacity.
[0196] Step S514, FM determines the to-be-allocated capacity of the first storage device based on the third allocation ratio and the configured capacity corresponding to the first storage device, and FM allocates the storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
[0197] In a possible implementation, the to-be-allocated capacity of the first storage device is positively correlated with the configured capacity and the third allocation ratio corresponding to the first storage device. For example, the to-be-allocated capacity of the first storage device is the product of the configured capacity and the third allocation ratio corresponding to the first storage device.
[0198] Exemplarily, the CXL storage pool includes three storage devices, storage device 1 to storage device 3. The allocated capacity of storage device 1 is 15G, the allocated capacity of storage device 2 is 15G, and the third allocated capacity of storage device 3 is 30G. The total allocated capacity of multiple storage devices is 15G+15G+30G=60G. The configuration capacity carried in the storage space allocation request sent by the node is 20G. FM determines that the allocation ratio corresponding to storage device 1 = the allocated capacity of storage device 1 / the total allocated capacity = 15G / 60G=1 / 4, the allocation ratio corresponding to storage device 2 = the allocated capacity of storage device 2 / the total allocated capacity = 15G / 60G=1 / 4, and the allocation ratio corresponding to storage device 3 = the allocated capacity of storage device 3 / the total allocated capacity = 30G / 60G=1 / 2. FM determines that the capacity to be allocated of storage device 1 = configured capacity * allocation ratio corresponding to storage device 1 = 20G * 1 / 4 = 5G, the capacity to be allocated of storage device 2 = configured capacity * allocation ratio corresponding to storage device 2 = 20G * 1 / 4 = 5G, and the capacity to be allocated of storage device 3 = configured capacity * allocation ratio corresponding to storage device 3 = 20G * 1 / 2 = 10G.
[0199] The method provided in this embodiment allocates the storage space required for the node to be configured according to the ratio of the allocated capacity of each storage device to the total allocated capacity, so that all storage devices can provide storage space to one node at the same time. Therefore, the node can use all storage channels concurrently, and the bandwidth performance between each node is stable, balanced and equal.
[0200] Attached Figure 3 The method shown, Figure 4 The method shown or attached Figure 5 The method shown can be executed after the node loads the storage space. Exemplarily, the process of the node loading the storage space includes the following steps 1 to 4.
[0201] Step 1: The basic input / output system (BIOS) of the node detects the CXL device.
[0202] CXL devices include FM and CXL-enabled storage devices.
[0203] Step 2: The BIOS of the node reports the information of the detected CXL device to the operating system (OS) of the node.
[0204] Step 3: The node OS loads the CXL device as a direct access (DAX) device.
[0205] Step 4: The node sends a storage space request to FM, thus triggering the attached Figure 3 The method shown or attached Figure 4 The method shown.
[0206] In addition, FM performs additional Figure 3 The method shown, Figure 4 The method shown or attached Figure 5 After the storage space is allocated by the method shown, FM can send the address of the storage space allocated to the node to the node. The node uses the mmap (Memory Map) function to map the / dev / dax0.x file to the address space of the user-mode program in the node according to the address of the storage space, and manages the storage space through the user-mode program in the node.
[0207] Figure 6 This is a flowchart of another storage space allocation method provided in an embodiment of the present application. Figure 6 The method is applied to the FM management unit of the CXL storage pool, and the FM management unit is used to allocate storage space in the CXL storage pool. Figure 6 The method shown includes S601 to S603.
[0208] S601, the FM management unit receives a storage space application request from a first node, the storage space application request includes a configuration capacity, the configuration capacity indicates the capacity corresponding to the storage space that the FM management unit needs to allocate to the first node from a CXL storage pool, the CXL storage pool includes multiple storage devices.
[0209] S602, the FM management unit determines an allocation ratio based on the configuration capacity and a capacity parameter of each storage device in the plurality of storage devices;
[0210] S603: The FM management unit allocates the storage space of the CXL storage pool to the first node according to the allocation ratio.
[0211] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0212] A refers to B, which means that A is the same as B or A is a simple variant of B.
[0213] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects, and cannot be understood as indicating or implying relative importance. For example, the first storage device and the second storage device are used to distinguish different storage devices, rather than to describe a specific order of storage devices, and cannot be understood as the first storage device being more important than the second storage device.
[0214] In the embodiments of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more. For example, a plurality of storage devices means two or more storage devices.
[0215] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0216] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A storage space allocation method, characterized in that: The method is applied to the FM management unit, comprising: receiving a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating a capacity corresponding to a storage space that the FM management unit needs to allocate to the first node from a CXL storage pool, the CXL storage pool including a plurality of storage devices; Determining an allocation ratio based on the configured capacity and a capacity parameter of each storage device in the plurality of storage devices; The storage space of the CXL storage pool is allocated to the first node according to the allocation ratio.
2. The method according to claim 1, characterized in that The CXL storage pool includes a first storage device whose remaining capacity is not zero, and determining the allocation ratio based on the configured capacity and a capacity parameter of each storage device in the plurality of storage devices includes: Determine an allocation ratio based on the configured capacity and a total capacity parameter, where the total capacity parameter is the sum of the capacity parameters of each storage device in the plurality of storage devices; Allocating the storage space of the CXL storage pool to the first node according to the allocation ratio includes: The to-be-allocated capacity of the first storage device is determined based on the capacity parameter of the first storage device and the allocation ratio, and the storage space corresponding to the to-be-allocated capacity in the first storage device is allocated to the node.
3. The method according to claim 2, characterized in that The capacity parameter includes the remaining capacity, and the determining the allocation ratio based on the configured capacity and the total capacity parameter includes: Determine a first allocation ratio based on the configured capacity and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the plurality of storage devices; The determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes: The to-be-allocated capacity of the first storage device is determined based on the remaining capacity of the first storage device and the first allocation ratio.
4. The method according to claim 2, characterized in that: The capacity parameter includes a specification capacity, and the determining of the allocation ratio based on the configuration capacity and the total capacity parameter includes: Determine a second allocation ratio based on the configuration capacity and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the plurality of storage devices; The determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes: The to-be-allocated capacity of the first storage device is determined based on the specification capacity of the first storage device and the second allocation ratio.
5. The method according to claim 2, characterized in that: The capacity parameter includes the allocated capacity, and the determining of the allocation ratio based on the configured capacity and the total capacity parameter includes: Determine a third allocation ratio based on the configured capacity and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the plurality of storage devices; The determining the to-be-allocated capacity of the first storage device based on the capacity parameter of the first storage device and the allocation ratio includes: The to-be-allocated capacity of the first storage device is obtained based on the allocated capacity of the first storage device and the third allocation ratio.
6. A storage capacity allocation method, characterized in that: The method is applied to the FM management unit, comprising: receiving a storage space application request from a first node, the storage space application request including a configuration capacity, the configuration capacity indicating a capacity corresponding to a storage space that the FM management unit needs to allocate to the node from a CXL storage pool, the CXL storage pool including a plurality of storage devices; Determine an allocation ratio corresponding to a first storage device based on a capacity parameter of each storage device in the plurality of storage devices and a total capacity parameter, wherein the total capacity parameter is the sum of the capacity parameters of each storage device in the plurality of storage devices, and the first storage device is a storage device in the plurality of storage devices whose remaining capacity is not 0; Determine the to-be-allocated capacity of the first storage device based on the configured capacity and the allocation ratio corresponding to the first storage device; Allocate storage space corresponding to the to-be-allocated capacity in the first storage device to the node.
7. The method according to claim 6, characterized in that The determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes: A first allocation ratio corresponding to the first storage device is determined based on the remaining capacity of each storage device in the multiple storage devices and the total remaining capacity, where the total remaining capacity is the sum of the remaining capacity of each storage device in the multiple storage devices.
8. The method according to claim 6, characterized in that The determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes: A second allocation ratio corresponding to the first storage device is determined based on the specification capacity of each storage device in the multiple storage devices and the total specification capacity, where the total specification capacity is the sum of the specification capacity of each storage device in the multiple storage devices.
9. The method according to claim 6, characterized in that The determining the allocation ratio corresponding to the first storage device based on the capacity parameter of each storage device in the plurality of storage devices and the total capacity parameter includes: A third allocation ratio corresponding to the first storage device is determined based on the allocated capacity of each storage device in the multiple storage devices and the total allocated capacity, where the total allocated capacity is the sum of the allocated capacity of each storage device in the multiple storage devices.
10. A FM management unit, characterized in that: The FM management unit comprises: a processor, the processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor so that the FM management unit implements the method according to any one of claims 1 to 9.
11. A computing system, characterized in that: The computing system comprises: a computing unit, a FM management unit and a CXL storage pool, the computing unit is connected to the FM management unit, the FM management unit is connected to the CXL storage pool, and the FM management unit is used to implement the method according to any one of claims 1 to 9.