Data access method and device for a storage device, electronic device, and storage medium

By splitting the data volume into multiple storage intervals and dynamically allocating processor resources, the problem of low data access efficiency of storage devices is solved, and more efficient data access and processor resource utilization is achieved.

CN119718685BActive Publication Date: 2025-07-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510227353.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-07-11
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

The data access method of existing storage devices is inefficient and cannot fully utilize multi-core processor resources.

Method used

Split the data volume into multiple storage intervals, and dynamically allocate multiple processor resources for processing according to data access requests to realize parallel access to the data volume.

Benefits of technology

Improves data access efficiency and utilization of processor resources, and reduces waste of processor performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718685B_ABST
    Figure CN119718685B_ABST
Patent Text Reader

Abstract

The present application discloses a data access method and apparatus for a storage device, an electronic device, and a storage medium, relating to the technical field of data processing. Among them, the method includes: when a data volume on the storage device allows the use of multiple processor resources of the storage device, adopting a strategy of dynamically allocating processor resources according to the storage range corresponding to the data access request. By splitting the data volume into multiple storage ranges and dynamically allocating the data access request to the corresponding processor resource for processing according to the corresponding relationship between the storage range and the processor resource, the utilization rate of the processor resource can be improved, solving the technical problem of low data access efficiency existing in the data access method of the storage device in the related art, and achieving the technical effect of improving the data access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a data access method and apparatus for a storage device, an electronic device, and a storage medium. Background Art

[0002] When a user uses a storage device, a volume can be first created on the storage device, and then the volume is mapped to the user's server. After a volume of the storage device is mapped to the server, it is equivalent to a physical hard disk of the server, and the user can subsequently operate based on this hard disk. For example, a file system is mounted, and it is virtualized into drive C, drive D, etc. under the operating system.

[0003] In the related art, a volume of a storage device can use one processor resource of the storage device. When accessing data of a volume of the storage device, the corresponding processor resource is utilized to perform data access in a serial execution manner. However, the data access method of the storage device in the related art has the problem of low data access efficiency. Summary of the Invention

[0004] This application provides a data access method and apparatus for a storage device, an electronic device, and a storage medium, so as to at least solve the problem of low data access efficiency existing in the data access method of the storage device in the related art.

[0005] According to one aspect of the embodiments of the present application, a data access method for a storage device is provided, including: when a data volume on the storage device allows using multiple processor resources of the storage device, determining multiple storage intervals into which the data volume is split, where one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources; determining a target storage interval corresponding to a data access request of the data volume from the multiple storage intervals; and using the processor resource corresponding to the target storage interval to perform a data access operation requested by the data access request on the target storage interval.

[0006] According to another aspect of the embodiments of the present application, a data access apparatus for a storage device is further provided, including: a first determination unit, configured to determine multiple storage intervals into which the data volume is split when a data volume on the storage device allows using multiple processor resources of the storage device, where one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources; a second determination unit, configured to determine a target storage interval corresponding to a data access request of the data volume from the multiple storage intervals; and an execution unit, configured to use the processor resource corresponding to the target storage interval to perform a data access operation requested by the data access request on the target storage interval.

[0007] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the steps of the data access method of any of the above storage devices through the computer program.

[0008] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the steps of the data access method of any of the above storage devices when running.

[0009] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the data access method of any of the above storage devices.

[0010] Through the present application, since in the case where the data volume on the storage device allows the use of multiple processor resources of the storage device, a strategy of dynamically allocating processor resources according to the storage range corresponding to the data access request is adopted. By splitting the data volume into multiple storage ranges and according to the corresponding relationship between the storage range and the processor resources, the data access request is dynamically allocated to the corresponding processor resources for processing. For the data access of a single data volume, it can be scheduled to multiple processor resources for processing, which can improve the utilization rate of processor resources. And having multiple processor resources process the data access of the same data volume can achieve the technical effect of improving the data access efficiency. Therefore, the technical problem of low data access efficiency existing in the data access method of the storage device in the related art can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0012] Figure 1 It is a schematic diagram of an application scenario of a data access method of a storage device according to an embodiment of the present application.

[0013] Figure 2 It is a schematic flowchart of an optional data access method of a storage device according to an embodiment of the present application.

[0014] Figure 3 It is a schematic diagram of an optional data access method for a storage device according to an embodiment of the present application.

[0015] Figure 4 It is a schematic diagram of another optional data access method for a storage device according to an embodiment of the present application.

[0016] Figure 5 It is a schematic diagram of yet another optional data access method for a storage device according to an embodiment of the present application.

[0017] Figure 6 It is a block diagram of a structure of an optional data access device for a storage device according to an embodiment of the present application. Specific Embodiments

[0018] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0019] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0020] To enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0021] According to one aspect of the embodiments of the present application, a data access method for a storage device is provided. Optionally, in this embodiment, the above data access method for a storage device may be applied to, but not limited to, such as Figure 1In the hardware environment shown, which includes a terminal device 102, a server 104, a storage device 106, and a disk 108. The server 104 can be connected to the terminal device 102 and the storage device 106 through a network. The disk 108 can belong to the storage device 106, which can be a part of the storage device 106 and can be used for data storage. When the terminal device 102 needs to access the data stored on the disk 108 (for example, read and write data), it can send a data access request to the corresponding storage device 106 through the server 104. The storage device 106 can respond to the data access request and perform a data access operation on the corresponding disk 108.

[0022] The above network can include but is not limited to at least one of the following: a wired network, a wireless network. The above wired network can include but is not limited to at least one of the following: a wide area network, a metropolitan area network, a local area network. The above wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can be but is not limited to a PC (Personal Computer), a mobile phone, a tablet computer, etc. The server 104 can be but is not limited to a cloud server, a server cluster, or other server types. The disk 108 can include but is not limited to at least one of the following: a magnetic disk, for example, a hard disk, a floppy disk, etc.; a non-magnetic disk, for example, a solid-state drive, an optical disc, a USB flash drive, etc.

[0023] The data access method of the storage device in the embodiments of the present application can be executed by the storage device 106, or can be executed by the storage device 106 in combination with at least one of the terminal device 102 and the server 104. Among them, the execution of the data access method of the storage device in the embodiments of the present application by the terminal device 102 can also be executed by a client installed thereon.

[0024] Taking the execution of the data access method of the storage device in this embodiment by the storage device 106 as an example, Figure 2 is a schematic flowchart of an optional data access method of a storage device according to an embodiment of the present application, as Figure 2 shown, the process of this method can include steps S202 to S206.

[0025] Step S202, when the data volume on the storage device allows the use of multiple processor resources of the storage device, determine multiple storage intervals into which the data volume is split, where one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources.

[0026] Step S204, determine a target storage interval corresponding to the data access request of the data volume from among the multiple storage intervals.

[0027] Step S206: using the processor resources corresponding to the target storage interval, executing the data access operation requested by the data access request on the target storage interval.

[0028] The data access method of the storage device in this embodiment can be applied to the field of data processing, and to the scenario of using processor resources to process data access requests of data volumes. In the field of data processing, when using a storage device, a user can create a data volume on the storage device, and the created data volume can be mapped to a server. After a data volume on the storage device is mapped to a server, it is equivalent to a physical hard disk of the server (similar to the hard disk of a laptop computer). The user can subsequently perform operations based on this hard disk, such as mounting a file system, or virtualizing it into a C drive, a D drive, etc. under the operating system.

[0029] It should be noted that a data volume is a volume used to store data, which can also be called a volume or storage volume, and a storage device can be called a storage or storage system. A storage device can have multiple disks, and a storage device can be understood as a part between a server and a disk, which can include memory, cache, and RAID (Redundant Array of Independent Disks) function modules (which can be implemented in hardware or software), where the RAID function module can be used to determine the disk to which data access falls.

[0030] Based on user configuration or default configuration, multiple disks can be divided into multiple pools (storage resource pools), and a data volume can belong to a pool. It can use the disk space in the pool to which it belongs, but will not exceed the pool to which it belongs. When a user accesses data on a data volume, he can send a data access request to the server through his terminal device. Since the data disk of the storage device is mapped to the physical hard disk of the server, the server will forward the data access request to the storage device (some packaging may be performed, such as repackaging of the request message, etc.), and the storage device (for example, the RAID function module thereon) can respond to the data access request and determine the disk to which the accessed data belongs, thereby completing the data access.

[0031] When using storage devices, users can create different numbers of data volumes on the storage devices according to their own needs. For example, if a user needs multiple data volumes, the user can create multiple data volumes and map the data volumes to the same or multiple servers as multiple physical hard disks. The corresponding relationship between the data volumes and the servers is as follows: Figure 3 As shown, a server can correspond to one or more data volumes. For another example, in a scenario where a user only needs one data volume, a data volume can be mapped to a server and used as a physical hard disk. The specific number of volumes created on the storage depends on the user's needs.

[0032] In a computer system, data access to a storage device is usually performed through a data access request, and the data access request may include, but is not limited to, at least one of the following: a data read request, a data write request (the data read request and the data write request may be collectively referred to as IO). For a storage device, the data access request requires the use of processor resources. Here, the processor resources may be resources on the processor and may include, but are not limited to, at least one of the following: a processor core, that is, a CPU (Central Processing Unit) core, cache resources, memory resources, etc. In at least some examples of this embodiment, the processor resources are described by taking the processor core as an example. For other types of processor resources, the processing method may be similar.

[0033] In the related art, for the convenience of business processing, a data volume only uses one processor core. In this way, the business on many data volumes can utilize the characteristics of serial execution of a single processor core to simplify business processing. Here, the business may be data access. For example, the way for the IO of a user on a single volume to select different processor cores is that the IO on a data volume all uses one processor core. However, for the above data access method on the data volume, the data access efficiency is low. In addition, current processors are usually multi-core. For example, industrial commonly used processors may have more than a dozen or even more cores. Only when multiple data volumes are established will multiple cores of the processor be used, and it is possible to make full use of the cores of the processor. When the number of data volumes is small (for example, there is only one data volume), only a small number of processor cores can be used, and the performance of the processor cannot be fully exerted. In this scenario, problems such as low utilization rate of processor resources and poor performance experience of users for storage will occur.

[0034] To at least partially solve the above technical problems, in this embodiment, a mode in which a data volume on a storage device is allowed to use multiple processor resources of the storage device can be configured. In this mode, the data volume is split into multiple storage intervals corresponding to the processor resources (that is, the data volume is split into multiple small intervals), and data access operations are performed using the corresponding processor resources according to the storage intervals corresponding to the data access requests, so as to achieve the purpose of a data volume using multiple processor resources, which can not only improve the data access efficiency, but also improve the utilization rate of processor resources and reduce the waste of processor performance.

[0035] In this embodiment, the storage device can obtain the number of processor resources available to the storage device. Taking the processor resources as processor cores as an example, first, determine the number of processor cores that can be used in the single volume (i.e., a single data volume) scenario. The number of processor cores that can be used can be obtained by the configuration module of the storage system. These processor cores are the processor cores that this data volume can use in the single volume scenario. When the number of processor resources available on the storage device is multiple, then determine the mode in which the data volumes on the storage device use the processor resources of the storage device. The way to determine the mode in which the data volumes on the storage device use the processor resources of the storage device can be: determine the mode in which the data volume uses the processor resources of the storage device from the first usage mode and the second usage mode, where the first usage mode is the mode in which the data volume is allowed to use a single processor resource, and the second usage mode is the mode in which the data volume is allowed to use multiple processor resources of the storage device.

[0036] Optionally, the storage device can also obtain the number of data volumes created on the storage device. When the number of processor resources available on the storage device is multiple, it can further determine whether the number of data volumes on the storage device is greater than a preset quantity threshold. When the number of data volumes on the storage device is greater than the preset quantity threshold, then determine the mode in which the data volumes on the storage device use the processor resources of the storage device. The preset quantity threshold can be a fixed value, which can be related to the number of processor resources of the storage device. For example, it can be half, one-third, etc. of the processor resources of the storage device; the preset quantity threshold can also be a non-fixed value, which can be related to the number of processor resources available on the storage device. For example, it can be half, one-third, etc. of the processor resources available on the storage device. In this embodiment, the preset quantity threshold is not limited.

[0037] Here, the data volume can be an independent storage unit created by the user on the storage device (i.e., the data volumes are independent of each other), and it can be mapped to the physical hard disk of the server. The disk set on the storage device can be divided into one or more storage resource pools. A data volume can belong to one storage resource pool and is allowed to use the disks in the belonging storage resource pool. Through the data volume, the user can use the disks on the storage device.

[0038] When a data volume on a storage device allows the use of multiple processor resources of the storage device, determine multiple storage ranges into which the data volume is split. Here, the splitting of the data volume can be based on the logical address of the data volume or on the size of the data volume. In addition, the splitting of the data volume can be performed after it is determined that the data volume on the storage device allows the use of multiple processor resources of the storage device, or can be performed in advance, that is, the data volume is split in advance, the splitting result is recorded through configuration information, and after it is determined that the data volume on the storage device allows the use of multiple processor resources of the storage device, the splitting result is directly determined based on the configuration information. Other methods for determining the splitting result can also be used, and this is not limited in this embodiment. Among them, the multiple processor resources can be all the processor resources of the storage device or the available processor resources of the storage device. One storage range among the multiple storage ranges corresponds to one processor resource among the multiple processor resources, and one processor resource can correspond to one storage range or can correspond to at least two storage ranges at the same time.

[0039] For a data access request received for a data volume, a target storage range corresponding to the data access request can be determined from among the multiple storage ranges. Here, the data access request can be a data read request for the data volume or a data write request for the data volume. Regardless of what type of data access request it is, what is requested is to perform a data access operation on a section of the storage space of the data volume. The storage range to which the above-mentioned storage space belongs is the target storage range. The target storage range can include one storage range or can include at least two storage ranges. The storage space requested to be accessed by the data access request can be determined by the address information or address indication information carried in the data access request, and other determination methods can also be used, which are not limited in this embodiment.

[0040] After determining the target storage range corresponding to the above data access request, based on the correspondence between the storage range and the processor resources, determine the processor resources corresponding to the target storage range. The determined processor resources are the processor resources for processing the data access request. Then, the corresponding processor resources can be used to perform an access operation on the data requested to be executed by the data access request. Since the number of storage ranges included in the target storage range can be one or more, the number of processor resources corresponding to the above target storage range can also be one or more.

[0041] It should be noted that the number of data volumes on the storage device can be one or more. For each data volume, when it is allowed to use multiple processor resources of the storage device, the data access requests can be processed in the same or similar manner as described above. The multiple processor resources allowed to be used by different data volumes can be the same or different. For a data volume, the number of data access requests for accessing data on it can be one or more, and the processing methods of different data access requests can be the same or similar to the method of processing data access requests described above.

[0042] Through the embodiments provided by this application, when a data volume on the storage device is allowed to use multiple processor resources of the storage device, determine multiple storage intervals into which the data volume is split, where one of the multiple storage intervals corresponds to one of the multiple processor resources; determine a target storage interval corresponding to the data access request of the data volume from the multiple storage intervals; use the processor resource corresponding to the target storage interval to perform the data access operation requested by the data access request on the target storage interval, which solves the technical problem of low data access efficiency existing in the data access method of the storage device in the related art and improves the data access efficiency.

[0043] In an exemplary embodiment, when a data volume on the storage device is allowed to use multiple processor resources of the storage device, determining multiple storage intervals into which the data volume is split includes: when the data volume is allowed to use multiple processor resources, determining multiple storage intervals into which the data volume is split according to the first interval size.

[0044] In this embodiment, in order to ensure the rationality and convenience of splitting the data volume, the data volume can be split according to a certain interval size. The interval size used to split the data volume can be the first interval size. Correspondingly, when the data volume is allowed to use multiple processor resources, it can be determined that the data volume is split into multiple storage intervals according to the first interval size. Here, the interval size of the storage intervals in the multiple storage intervals is less than or equal to the first interval size. The interval size of the multiple storage intervals after splitting the data volume should be as equal as possible to the first interval size. In the case where the first interval size cannot equally divide the data volume, the remaining storage interval with an interval size less than the first interval size can be used as the last storage interval after splitting.

[0045] Optionally, the storage ranges among multiple storage ranges can have unique range numbers, and the processing performed on the storage ranges can be executed based on the range numbers. The range numbers can start from 0 or 1 and increase sequentially, or other numbering methods can be adopted. The processor resources among multiple processor resources can have unique resource numbers, and the processing performed on the processor resources can be executed based on the resource numbers. The resource numbers can start from 0 or 1 and increase sequentially, or other numbering methods can be adopted.

[0046] For example, for the case where the size of the first range is 10M and the size of the data volume to be split is 1024M, the data volume can be split into 1024 / 10 + 1 = 103 storage ranges, that is, 102 storage ranges with a range size equal to the first range size of 10M, and 1 storage range with a size of 4M. Each storage range has a corresponding number, for example, starting from 0 to N (where N is 102 here).

[0047] Through this embodiment, by splitting the data volume according to the first range size, multiple storage ranges after splitting can be obtained. By corresponding use of the multiple storage ranges and multiple processor resources, the utilization rate of the processor resources can be improved, thereby improving the data access efficiency.

[0048] In an exemplary embodiment, when the data volume allows the use of multiple processor resources, determining the multiple storage ranges into which the data volume is split according to the first range size includes: when the data volume allows the use of multiple processor resources, splitting the data volume into multiple storage ranges according to the first range size based on the logical address of the data volume.

[0049] In this embodiment, in order to reduce the amount of data to be stored, after determining that the data volume allows the use of multiple processor resources, the data volume can be split into multiple storage ranges according to a certain range size, for example, splitting the data volume into multiple storage ranges according to the first range size. To facilitate the splitting of the data volume, the data volume can be split into multiple storage ranges according to the logical address of the data volume, for example, splitting the data volume into multiple storage ranges according to the first range size based on the logical address of the data volume.

[0050] Here, the logical address is an abstract address used in the storage system to identify and locate the data position on the data volume. It is usually represented as a linear address space and can be used in scenarios such as data positioning, data access, and data management. To facilitate the management of multiple storage ranges, the characteristic of linear continuity of the logical address can be utilized to split the address space with continuous logical addresses into the same storage range.

[0051] Through this embodiment, the data volume can be split into multiple storage intervals according to a certain interval size based on the logical address of the data volume, which facilitates the management of multiple storage intervals and improves the efficiency of data access.

[0052] In an exemplary embodiment, when the data volume allows the use of multiple processor resources, determining the multiple storage intervals into which the data volume is split according to the first interval size includes: when the data volume allows the use of multiple processor resources, determining the multiple storage intervals into which the data volume is split according to the first interval size according to the specified configuration information.

[0053] To improve the efficiency and stability of data volume splitting, the data volume can be split in advance, and the specified configuration information can be specified in the configuration file based on the splitting result. The specified configuration information is used to indicate the respective storage intervals into which the data volume is split. The specified configuration information can include the indication information of the respective storage intervals into which the data volume is split (for example, interval number, start address, end address, etc.). For the case where the data volume is split using multiple interval sizes, the specified configuration information can also include the information of the interval sizes used for splitting. In addition, the number of data volumes created on the storage device can be multiple, and the specified configuration information corresponding to each data volume can be the same. In this case, the specified configuration information can also include information such as the identification information of the data volume and the logical address of the data volume; the specified configuration information corresponding to each data volume can be different. In this case, the number of specified configuration information can be multiple.

[0054] For the case where the data volume is split according to the first interval size, the specified configuration information is used to indicate the storage intervals into which the data volume is split according to the first interval size. After determining that the data volume on the storage device allows the use of multiple processor resources of the storage device, based on the specified configuration information, the multiple storage intervals into which the data volume is split according to the first interval size can be determined. For example, the interval size, interval number, and logical address of each storage interval can be determined. By adopting the above method, by reading the specified configuration information, the multiple storage intervals into which the data volume is split according to the first interval size can be directly determined.

[0055] Through this embodiment, by splitting the data volume in advance and recording the information of the split storage intervals through the configuration information, the multiple storage intervals into which the data volume is split can be directly determined by reading the above configuration information, the process of splitting the data volume can be omitted, and the efficiency and stability of data volume splitting can be improved.

[0056] In an exemplary embodiment, after determining the multiple storage intervals into which the data volume is split according to the first interval size, the method further includes: when the idle rate of the use of multiple processor resources within a specified time period is greater than or equal to an idle rate threshold, updating the multiple storage intervals to the storage intervals into which the data volume is split according to a second interval size.

[0057] Since the locations, sizes, etc. of the data accessed by different data access requests are not fixed, after splitting the data volume according to a certain interval size, there may be a situation where the idle rate of the use of processor resources is high. If the idle rate of the use of processor resources is high, the interval size for splitting the data volume can be reduced (i.e., the interval size), so that the data access requests can select more processor resources for execution.

[0058] Taking the processor resources as processor cores and the data access requests as I / O as an example, in a single-volume scenario, the current usage of processor cores can be counted. According to the statistical situation of the use of processor cores, if the idle rate of the use of processor cores is high, then the splitting interval size of the volume is reduced, so that I / O can select more processor cores for execution. Because if the idle rate of the use of processor cores is high, it means that only a few cores used by the I / O for the current interval size are used. At this time, the interval size needs to be reduced so that the current I / O entering the storage can fall into as many intervals as possible, thereby using as many processor cores as possible.

[0059] In this embodiment, the idle rate of the use of multiple processor resources within a specified time period can be counted. The specified time period can be a time period with a certain time length ending at the current moment or a specified moment, or a time period with a certain time length starting at a specified moment. The above time length can be 5 minutes, 10 minutes, etc., and can also be other time lengths. When the above idle rate is greater than or equal to a preset idle rate threshold, the data volume is re-split according to a second interval size smaller than the first interval size. The manner of splitting the data volume according to the second interval size is similar to the manner of splitting the data volume according to the first interval size in the foregoing embodiment, and will not be elaborated in this embodiment.

[0060] It should be noted that the specified configuration information in the foregoing embodiment may include the splitting scheme of the data volume under the second interval size, and when updating the storage intervals, it can be updated by reading the specified configuration information.

[0061] For example, in a single-volume scenario, according to the usage of processor cores, the size of the storage intervals for splitting the data volume is intelligently switched to make the I / O in different scenarios fully utilize the processor cores as much as possible. In a single-volume scenario, all the cores of the processor are used as much as possible for different I / O models to maximize the performance of the storage.

[0062] Through this embodiment, when the idle rate of the processor resources is high, reducing the interval size used for splitting the data volume can increase the number of storage intervals, thereby improving the utilization rate of the processor resources and making full use of the processor performance.

[0063] In an exemplary embodiment, reducing the interval size can increase the number of storage intervals, so as to make full use of the processor resources. However, if the interval size of splitting the data volume is too small, it will cause the splitting of the data volume and the switching of the processor resources to be too frequent, which will affect the performance. Therefore, the range of the interval size of the data volume can be limited to N interval sizes, and the data volume is allowed to be split into storage intervals according to the specified N interval sizes, where N is a positive integer greater than or equal to 2, and the N interval sizes include a first interval size. For the set N interval sizes, it can be ensured that the smallest interval size is not too small. The number N of the interval sizes can be set according to experience, and the N interval sizes can also be set according to experience.

[0064] For example, the range of the interval size of the storage interval can be limited to five grades (that is, the value of N is 5), and the five grades are 128M, 96M, 64M, 32M, and 16M respectively. The splitting of the data volume can be performed using any one of the above five grades of interval sizes.

[0065] In this embodiment, for the case where there are M interval sizes smaller than the first interval size among the N interval sizes, before updating the multiple storage intervals to the storage intervals obtained by splitting the data volume according to the second interval size, the interval size used for re-splitting the data volume can be determined first, that is, the second interval size. For the case of M = 1, the only interval size smaller than the first interval size can be directly determined as the second interval size.

[0066] For M being a positive integer greater than or equal to 2, multiple methods can be used to determine the interval size used for re-splitting the data volume. As an optional implementation manner, the maximum space size among the M interval sizes can be determined as the second interval size. The above method of re-determining the interval size may result in the need to re-determine the interval size used for re-splitting the data volume due to the too high idle rate of the processor resource usage.

[0067] As another alternative implementation, in the case where there are M interval sizes smaller than the first interval size among the N interval sizes, the free rate corresponding to the interval size among the M interval sizes can be estimated based on the usage information of multiple processor resources within a specified time period; in the case where there is an interval size among the M interval sizes whose corresponding free rate is smaller than the free rate threshold, the largest interval size whose corresponding free rate is smaller than the free rate threshold is determined as the second interval size.

[0068] For the M interval sizes smaller than the first interval size, the free rate corresponding to the interval size among the M interval sizes can be estimated respectively, that is, in the case where the data volume is split into multiple storage intervals according to the interval size among the M interval sizes, the free rate of the use of multiple processor resources. The free rate corresponding to the interval size among the M interval sizes can be estimated based on the usage information of multiple processor resources within a specified time period, and the usage information of multiple processor resources within a specified time period is used to describe the usage situation of multiple processor resources within a specified time period. Since the above usage situation is related to the storage intervals of the data volume, based on the above usage situation, the free rate of the use of multiple processor resources in the case where the data volume is split into multiple storage intervals according to the interval size among the M interval sizes can be estimated.

[0069] If there is an interval size among the M interval sizes whose corresponding free rate is smaller than the free rate threshold, then the largest interval size whose corresponding free rate is smaller than the free rate threshold can be selected as the interval size used to re - split the data volume, so as to obtain the second interval size, and then the split storage intervals are updated according to the second interval size. Here, the multiple storage intervals are the storage intervals (or storage areas) obtained by splitting the data volume, and different interval sizes used to split the data volume will result in differences in the multiple storage intervals. Therefore, if the interval size used to split the data volume changes, the multiple storage intervals will also be updated. And selecting the largest interval size whose corresponding free rate is smaller than the free rate threshold can avoid the too - frequent splitting of the data volume and switching of processor resources caused by too small interval sizes, thereby improving the storage performance.

[0070] For example, for the aforementioned five grades, the interval sizes corresponding to the five grades decrease in sequence. The current grade (that is, the grade corresponding to the first interval size) is the second grade. Since there are lower grades, that is, the third grade to the fifth grade. In this case, the free rates corresponding to the third grade to the fifth grade can be estimated respectively. Among them, the free rates corresponding to the fourth grade and the fifth grade are both smaller than the free rate threshold. At this time, the interval size corresponding to the fourth grade can be used to re - split the data volume.

[0071] Through this embodiment, according to the historical usage of processor resources, the free rate corresponding to different interval sizes is estimated, and then the maximum interval size with the corresponding free rate less than the free rate threshold is selected as the updated interval size, which can improve the utilization rate of processor resources and the storage performance at the same time.

[0072] In an exemplary embodiment, determining a target storage interval corresponding to a data access request of a data volume from multiple storage intervals includes: determining the target storage interval from multiple storage intervals based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request.

[0073] When a data access request for a data volume is received, for the case where the storage interval splitting method is fixed, the data access request can directly carry the interval identifier of the storage interval (for example, the interval number, and the interval identifier can be encapsulated into the data access request by the server). By extracting the carried interval identifier from the data access request, the target storage interval can be directly determined. For the above method, it is neither beneficial to improve the utilization rate of processor resources nor to improve the flexibility of processor resource utilization.

[0074] For the case where the storage interval splitting method is not fixed, the data access request can carry the start address to be accessed and the end address requested to be accessed. And each storage interval has a start address and an end address. Therefore, based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request, the target storage interval can be determined from multiple storage intervals.

[0075] There are various ways to determine the target storage interval from multiple storage intervals based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request. For example, each storage interval can be traversed in sequence, and the target storage interval can be determined based on the start address requested to be accessed by the data access request, the end address requested to be accessed by the data access request, and the logical address range of the traversed storage interval. Another example is that based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request, according to the set corresponding manner between the logical address and the storage interval, the target storage interval can be determined. Other determination methods can also be used, which are not limited in this embodiment.

[0076] Through this embodiment, determining the storage interval corresponding to the data access request through the start address and the end address requested to be accessed by the data access request can improve the utilization rate of processor resources and the flexibility of processor resource utilization.

[0077] In an exemplary embodiment, determining a target storage range from a plurality of storage ranges based on a start address requested to be accessed by a data access request and an end address requested to be accessed by the data access request includes: determining a first storage range to which the start address requested to be accessed by the data access request belongs from the plurality of storage ranges; determining a second storage range to which the end address requested to be accessed by the data access request belongs from the plurality of storage ranges; when the first storage range and the second storage range are the same storage range, determining the first storage range as the target storage range; when the first storage range and the second storage range are adjacent storage ranges, determining the first storage range and the second storage range as the target storage range; when the first storage range and the second storage range are non-adjacent storage ranges, determining the first storage range, the second storage range, and the storage ranges between the first storage range and the second storage range as the target storage range.

[0078] In this embodiment, considering that the storage space requested to be accessed by a data access request is usually a continuous storage space, and the logical addresses of multiple storage spaces are usually continuous, after determining the storage range to which the start address requested to be accessed by the data access request belongs and the storage range to which the end address requested to be accessed by the data access request belongs, the target storage address can be determined. To this end, a first storage range to which the start address requested to be accessed by the data access request belongs can be determined from the plurality of storage ranges, a second storage range to which the end address requested to be accessed by the data access request belongs can be determined from the plurality of storage ranges, and the target storage range can be determined based on whether the first storage range and the second storage range are the same storage range.

[0079] The storage area is divided according to a certain interval size. Therefore, based on the interval size, the starting address requested by the data access request can be determined. For the case where the starting address of the first storage interval is 0, the storage interval to which the starting address requested by the data access request belongs can be determined according to the result of the starting address requested by the data access request / interval size (the first interval size, the second interval size, etc.). If the storage interval is identified by an interval number and the interval numbering starts from 0, the result of the starting address requested by the data access request / interval size can be determined as the storage interval to which the starting address requested by the data access request belongs. If the storage interval is identified by an interval number and the interval numbering starts from 1, the result of the starting address requested by the data access request / interval size plus 1 can be determined as the storage interval to which the starting address requested by the data access request belongs. For other cases, a similar calculation method is used to determine the storage interval to which the starting address requested by the data access request belongs. The method for determining the storage interval to which the end address requested by the data access request belongs is the same as or similar to the method for determining the storage interval to which the starting address requested by the data access request belongs, and will not be elaborated here.

[0080] There can be various relationships between the first storage interval and the second storage interval. If the first storage interval and the second storage interval are the same storage interval, there is no cross-interval situation at this time, and the first storage interval can be determined as the target storage interval. If the first storage interval and the second storage interval are adjacent storage intervals and the storage space requested by the data access request spans two adjacent intervals, there is a cross-interval situation at this time, and the first storage interval and the second storage interval can be determined as the target storage intervals. If the first storage interval and the second storage interval are non-adjacent storage intervals and the storage space requested by the data access request spans more than two intervals, there is also a cross-interval situation at this time, and the first storage interval, the second storage interval, and the storage intervals between the first storage interval and the second storage interval can be determined as the target storage intervals.

[0081] For example, if the total size of the data volume is 1024M and it is divided into 103 storage intervals according to the interval size of 10M, the logical address of the data volume starts from 0, and the interval number of the storage interval starts from 0. For each IO, based on the start address and the end address, the interval number where the start address is located (i.e., the interval number of the storage interval where the start address is located) and the interval number where the end address is located (i.e., the interval number of the storage interval where the end address is located) can be determined: start address / interval size = the interval number where the start address is located, end address / interval size = the interval number where the end address is located. Then, it can be judged whether the IO is within the range of one interval. If the interval number where the start address is located is equal to the interval number where the end address is located, then it can be considered that this IO does not cross intervals; otherwise, it is an IO that crosses intervals.

[0082] As Figure 4 shown, interval 0 is the storage interval with the interval number 0, interval 1 is the storage interval with the interval number 1, and so on. Interval N is the storage interval with the interval number N. For the case where the above data volume is divided into 103 storage intervals, the value of N is 102. The obtained IOs include: the first IO, the second IO, and the third IO. Among them, the storage interval where the start address of the first IO is located is interval 0, and the storage interval where the end address of the first IO is located is interval 2. Therefore, the storage intervals corresponding to the first IO are interval 0, interval 1, and interval 2; the storage interval where the start address of the second IO is located is interval 2, and the storage interval where the end address of the second IO is located is interval 2. Therefore, the storage interval corresponding to the second IO is interval 2; the storage interval where the start address of the third IO is located is interval 3, and the storage interval where the end address of the third IO is located is interval 4. Therefore, the storage intervals corresponding to the third IO are interval 3 and interval 4.

[0083] Through this embodiment, by respectively determining the storage intervals to which the start address and the end address requested by the data access request belong, and then determining the storage interval corresponding to the data access request, the efficiency of data access processing can be improved.

[0084] In an exemplary embodiment, the storage intervals among multiple storage intervals have unique interval numbers, and the processor resources among multiple processor resources have unique resource numbers. The interval numbers and resource numbers are similar to those in the foregoing embodiments and will not be elaborated here. To improve the convenience of correspondence between the storage intervals and the processor resources, the storage intervals among multiple storage intervals are cyclically corresponded to the processor resources among multiple processor resources according to the interval numbers.

[0085] For example, the processor cores include core 0, core 1, and core 2. If the storage intervals of the data volume are cyclically corresponded to the processor cores according to the interval numbers, the corresponding relationship between the storage intervals divided by the data volume and the processor cores can be as Figure 5As shown, where interval 0 corresponds to core 0, interval 1 corresponds to core 1, interval 2 corresponds to core 2, interval 3 corresponds to core 0, interval 4 corresponds to core 1, interval 5 corresponds to core 2, and so on. For another example, assume the processor has 16 cores. The storage intervals numbered 0 - 15 correspond to cores 0 - 15, and the storage intervals numbered 16 - 31 correspond to cores 0 - 15, and so on.

[0086] Correspondingly, before performing the data access operation requested by the data access request on the target storage interval using the processor resources corresponding to the target storage interval, the above method further includes: determining the remainder obtained by taking the remainder of the interval number of the target storage interval divided by the number of processor resources among the multiple processor resources; and determining the processor resource with the resource number being the remainder among the multiple processor resources as the processor resource corresponding to the target storage interval.

[0087] In order to quickly determine the corresponding processor resources after receiving the data access request and then have the determined processor resources process the data access request, after determining the target storage interval, the processor resource corresponding to the target storage interval can be directly determined based on the interval number of the target storage interval. The remainder obtained by taking the remainder of the interval number of the target storage interval divided by the number of processor resources among the multiple processor resources is the resource number of the processor resource to be used for processing the data access request.

[0088] Optionally, in the case where the target storage interval includes at least two storage intervals, each storage interval in the target storage interval has its corresponding processor resource. Therefore, in addition to using the start address requested by the data access request to determine the corresponding data device resource for the storage interval where the start address requested by the data access request is located, the remaining storage intervals can use the start address of the storage interval to determine the corresponding data device resource.

[0089] For example, the algorithm for the IO to select the processor core can be: divide the start address by the interval size to obtain the interval number of the storage interval to which the IO belongs, and then take the remainder of the interval number divided by the number of available processor cores. The obtained value is the core number of the processor core to be used for this IO (an example of the resource number of the processor resource). The calculation formula can be as shown in formula (1):

[0090] Processor core = start address of IO / interval size % number of available processor cores (1)

[0091] Here, in the single - volume scenario, the I / O is switched to different processor cores for execution according to the interval number it belongs to, changing the way that the I / O on a data volume is only executed on one processor core, and improving the I / OPS (Input / Output Operations Per Second) in the single - volume scenario. In addition, for the I / O recovered after a node fails, the recovered I / O still adopts the above - mentioned method, and the corresponding processor core is selected according to the starting address of the I / O.

[0092] Through this embodiment, based on the interval number of the storage interval and the number of processor resources, the processor resources corresponding to the storage interval can be determined, which can improve the convenience of determining the processor resources.

[0093] In an exemplary embodiment, one of the multiple processor resources can correspond to a request queue (for example, an I / O data queue), and the request queue of the processor resources among the multiple processor resources allows the threads assigned by the processor resources among the multiple processor resources to access. The data access operation requested to be executed by using the processor resources to execute the data access request can be realized by the threads assigned by the processor resources to process the data access request.

[0094] In the related art, a data volume only uses one processor resource, and the data structure (such as a queue) storing the data access requests is only accessed by one thread. In this embodiment, a data volume can use multiple processor resources, and the data access requests and control - flow data need to be adapted to multiple threads. For this reason, corresponding request queues can be set respectively for each of the processor resources allowed to be used by the data volume. Then, a data volume has multiple queue accesses. The original request queue can be split into an array of queues (which is also a request queue), and each thread only accesses the corresponding data access requests in the corresponding array of queues according to the allocated processor resources.

[0095] The target storage interval can only include one storage interval, and then the corresponding processor resource is one. At this time, the data access request does not cross intervals (that is, the storage space requested to be accessed by the data access request belongs to one storage interval), and then the corresponding request queue is also one. The target storage interval can also include at least two storage intervals, and then the corresponding processor resources are at least two. At this time, the data access request crosses intervals (that is, the storage space requested to be accessed by the data access request belongs to at least two storage intervals), and then the corresponding request queues are also at least two. For different situations, different processing methods can be adopted to process the data access requests.

[0096] As an alternative implementation, when the target storage range contains only one storage range, use the processor resources corresponding to the target storage range to perform the data access operation requested by the data access request on the target storage range, including: writing the data access request into the request queue of the processor resources corresponding to the target storage range; accessing the data access request in the request queue of the processor resources corresponding to the target storage range through the thread allocated by the processor resources corresponding to the target storage range, and in response to the data access request, performing a data access operation on the target storage range.

[0097] In this embodiment, for the case where the target storage range contains only one storage range, the data access request does not cross ranges and can be directly written into the request queue of the processor resources corresponding to the target storage range. Here, the method for determining the processor resources corresponding to the target storage range is similar to that in the foregoing embodiment and will not be elaborated here. Then, the thread allocated by the processor resources corresponding to the target storage range can sequentially process the data access requests in the request queue of the processor resources corresponding to the target storage range, so as to perform the corresponding data access operation on the target storage range in response to the data access request and complete the processing of the data access request.

[0098] Through this embodiment, writing the data access requests into the corresponding request queues according to the corresponding storage ranges, so that the threads allocated by different processor resources can execute, can improve the processing speed of the data access requests.

[0099] As another alternative implementation, when the target storage range contains at least two storage ranges, use the processor resources corresponding to the target storage range to perform the data access operation requested by the data access request on the target storage range, including: splitting the data access operation into at least two access requests according to the logical address requested by the data access request; writing each sub-access request into the request queue of the processor resources corresponding to each sub-access request; accessing each sub-access request in the request queue of the processor resources corresponding to each sub-access request through the thread allocated by the processor resources corresponding to each sub-access request, and in response to each sub-access request, performing a data access operation on the storage range to which the logical address requested by each sub-access request belongs.

[0100] In this embodiment, for the case where the target storage range includes at least two storage ranges and the data access request spans ranges, the cross-range data access request can be split into at least two sub-access requests. One sub-access request among the at least two split sub-access requests requests to access a logical address that belongs to one of the at least two storage ranges, thereby ensuring that each sub-access request does not span ranges. Each of the split sub-access requests can be separately written into the request queue of the processor resource corresponding to each sub-access request. In the above manner, the splitting and distribution of the data access request can be completed.

[0101] Optionally, after splitting the data access request into sub-access requests that do not span ranges, the processor resource corresponding to the sub-access request can be determined according to the starting address of the sub-access request. The processor resource corresponding to each sub-access request is the processor resource corresponding to the storage range to which the logical address requested by each sub-access request belongs. The method of determining the processor resource corresponding to the sub-access request according to the starting address of the sub-access request can be similar to that in the foregoing embodiment. The starting address of the sub-access request can be divided by the range size used for splitting the data volume to obtain the range number of the storage range, and then the remainder of the range number of the storage range divided by the number of processor resources is taken. The remainder result is the number of the processor resource corresponding to the sub-access request.

[0102] For example, in a single-volume scenario, the processor core is selected according to the volume range to which each IO belongs. If an IO spans ranges, the IO can be split into multiple sub-IOs, and it is necessary to ensure that each sub-IO does not span ranges. After the cross-range IO is split, the core numbers of the processor cores to be used by the split sub-IOs can be calculated separately, which can be calculated according to the starting address of the sub-IO.

[0103] The thread assigned the processor resource corresponding to each sub-access request can access each sub-access request in the request queue of the processor resource corresponding to each sub-access request, and in response to each sub-access request, perform a data access operation on the storage range to which the logical address requested by each sub-access request belongs. The processing method of each sub-access request is similar to the method of processing the data access request described above, and will not be elaborated here.

[0104] In addition, if the range size of the storage range of the data volume is too small, it will also cause the IO to be split too frequently. In the foregoing method of intelligently adjusting the splitting range of the volume space (i.e., the data volume), limiting the range of the range size to a certain number can also reduce the frequency of IO splitting and avoid the impact of frequent IO splitting on storage performance.

[0105] Through this embodiment, by splitting the cross-range data access request into sub-access requests for different storage ranges and scheduling each sub-access request into the request queue of the corresponding processor resource for processing, the problems of low processing efficiency and high latency in cross-storage range data access operations can be solved, and the efficiency and stability of data access are improved.

[0106] In an exemplary embodiment, the above method further includes: when the silent process on the storage device is triggered, putting the silent process function of the silent process into the thread assigned by the processor resource corresponding to each sub-access request, so as to perform silent processing on the thread assigned by the processor resource corresponding to each sub-access request.

[0107] The start of the silent process is to cancel the data access requests in the waiting resource queue and avoid the risk of data corruption or service interruption that may be brought by data access requests during fault recovery or system maintenance. In the related art, only one processor resource is used for one data volume, and it is only necessary to apply the silent process function to the request queue of this processor resource to cancel the waiting of the data access requests in the request queue.

[0108] In this embodiment, multiple processor resources can be used for one data volume, so the silent process also needs to be adapted to multi-threading. If the silent process on the storage device is triggered, according to the number of threads, the silent process function of the silent process can be put into the thread assigned by the processor resource corresponding to each sub-access request, so as to perform silent processing on all the threads assigned by the processor resource corresponding to each sub-access request.

[0109] For example, in scenarios such as single-node failure, the node needs to be silenced first, and the silent process needs to cancel the waiting of the I / O in the waiting resource queue. Single-volume multi-threading will cause the I / O waiting for resources to be on multiple request queues, so the silent process also needs multi-threading processing: when the silent process is triggered and called, the silent process function is placed on different threads for processing according to the number of threads.

[0110] Through this embodiment, by putting the silent process function into each thread, the silent process can be adapted to multi-threaded scenarios, ensuring the security of data during the silent process.

[0111] In an exemplary embodiment, the above method further includes: when the number of data volumes on the storage device is one, skipping the specified lock when executing to the specified lock on the storage device, where the specified lock is a lock set to protect the critical resources between different data volumes.

[0112] To avoid data chaos and resource conflicts caused by concurrent access to critical resources (such as shared caches, buses, or storage media) between different data volumes on a storage device, specific locks are usually set to protect these resources. When there is only one data volume on the storage device, there is no resource competition between different data volumes, and the setting of such locks is not only redundant but also affects the data access efficiency.

[0113] To reduce unnecessary lock operations, if a scenario with only one volume is identified, the locks (i.e., specified locks) used for protecting critical resources between multiple volumes can be skipped, and subsequent operations can be directly executed, which can reduce the time consumed by lock acquisition and release and improve the single - volume performance (the performance when there is only one data volume in the storage device).

[0114] Through this embodiment, skipping the locks used for protecting critical resources between multiple volumes in a single - volume scenario can reduce latency and improve single - volume performance.

[0115] In an exemplary embodiment, the way data volumes use processor resources can be selected according to the number of data volumes on the storage device, that is, a data volume is allowed to use multiple processor resources, or a data volume is allowed to use one processor resource. The processor resources that a data volume is allowed to use can include, but are not limited to, available processor cores.

[0116] As an alternative implementation, the above - mentioned method further includes: when the number of data volumes on the storage device is less than or equal to a preset quantity threshold, determining that a data volume is allowed to use multiple processor resources.

[0117] For the case where the number of data volumes on the storage device is less than or equal to the preset quantity threshold, at this time the number of data volumes is small. If each data volume is only allowed to use one processor resource, the idle rate of processor resources is high, and the processor performance cannot be fully exerted. To fully exert the processor performance and improve the utilization rate of processor resources, each data volume can be allowed to use all the processor resources on the storage device.

[0118] As another alternative implementation, the above - mentioned method further includes: when the number of data volumes on the storage device is greater than the preset quantity threshold, determining that a data volume is allowed to use one of the multiple processor resources.

[0119] For the case where the number of data volumes on the storage device is greater than the preset quantity threshold, at this time the number of data volumes is large. If each data volume uses all the processor resources, the number of core switches is too large, which will instead lead to performance degradation. Therefore, when the number of data volumes on the storage device is large, a strategy of one data volume using one processor resource can be adopted, and when the number of data volumes is small, the strategy can be switched to one data volume using multiple processor resources.

[0120] The preset quantity threshold is similar to that in the foregoing embodiments. It can be a fixed value or a dynamically changing value. It can be related to all processor resources or available processor resources. The preset quantity threshold can be set as needed, and it is not limited in this embodiment.

[0121] For example, in a multi-volume (i.e., multiple data volumes) scenario, if each data volume still uses all available processor cores, the number of times of switching processor cores will be too many, which will instead lead to lower performance (compared with the method of using one processor core for each data volume). Therefore, the way each data volume uses processor cores can be intelligently adjusted according to the number of data volumes on the storage device to maximize the storage performance: if the number of data volumes on the storage device is large, adopt the strategy of using one processor core for one data volume; if the number of data volumes on the storage device is small, adopt the strategy of using multiple processor cores for one data volume. Through the above method, the way data volumes use processor cores can be changed intelligently. In a multi-volume scenario, each data volume only uses one processor core allocated to it. When the number of data volumes is small, each data volume can use all available processor cores.

[0122] The way data volumes use processor cores can be intelligently changed according to the number of available processor cores. For example, if the number of data volumes created on the storage device is less than one-third of the number of available processor cores, each data volume can use all available processor cores. If the number of data volumes created on the storage device is greater than or equal to one-third of the number of available processor cores, then each data volume only uses one available processor core.

[0123] Through this embodiment, by intelligently adjusting the way each data volume uses cores according to the number of data volumes on the storage device, the storage performance can be maximized and the data access efficiency can be improved.

[0124] In an exemplary embodiment, the above method further includes: when the number of data volumes on the storage device is greater than the preset quantity threshold, allocating allowed-to-use processor resources for the data volumes from multiple processor resources according to the historical resource utilization rate of the data volumes.

[0125] In this embodiment, for the case where the number of data volumes is greater than the preset quantity threshold, in order to improve the utilization rate of processor resources, different amounts of processor resources can be allocated to different data volumes according to the historical resource utilization rate of the data volumes, that is, allocating allowed-to-use processor resources for the data volumes from multiple processor resources. Here, the historical resource utilization rate of the data volumes can describe the situation of the data volumes using processor resources in a historical time period.

[0126] After allocating the allowed processor resources for the data volumes, the allowed processor resources for different data volumes are different from each other (that is, one processor resource is not allocated to two data volumes). Some data volumes are only allowed to use one processor resource, and some other data volumes are allowed to use at least two processor resources. The data volumes that are only allowed to use one processor resource are the data volumes with relatively low historical resource utilization rates, while the data volumes that are allowed to use at least two processor resources are the data volumes with relatively high historical resource utilization rates. For the convenience of processor resource allocation, some other data volumes can be allowed to use two processor resources.

[0127] Through this embodiment, by intelligently allocating processor resources, differential processor resource support can be provided for different data volumes, ensuring that each data volume can obtain a better resource ratio according to event requirements, thereby improving the processing speed of data access requests and the overall response efficiency of the storage system.

[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0129] According to another aspect of the embodiments of the present application, there is also provided a data access device for a storage device. The data access device for the storage device can be used to implement the data access method for the storage device provided in the above embodiments, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation by hardware, or a combination of software and hardware is also possible and contemplated.

[0130] Figure 6 is a structural block diagram of an optional data access device for a storage device according to the embodiments of the present application. As Figure 6 shown in, the data access device for the storage device includes a first determination unit 602, a second determination unit 604, and an execution unit 606.

[0131] The first determination unit 602 is configured to determine a plurality of storage intervals into which a data volume is split when the data volume on the storage device is allowed to use multiple processor resources of the storage device, where one of the plurality of storage intervals corresponds to one of the multiple processor resources.

[0132] The second determination unit 604 is configured to determine a target storage interval corresponding to a data access request of the data volume from the plurality of storage intervals.

[0133] An execution unit 606, configured to perform a data access operation requested by a data access request on a target storage range by using processor resources corresponding to the target storage range.

[0134] It should be noted that the first determination unit 602 in this embodiment may be configured to perform the above-mentioned step S202, the second determination unit 604 in this embodiment may be configured to perform the above-mentioned step S204, and the execution unit 606 in this embodiment may be configured to perform the above-mentioned step S206.

[0135] Through the embodiments provided in this application, when a data volume on a storage device allows the use of multiple processor resources of the storage device, multiple storage ranges into which the data volume is split are determined, where one storage range among the multiple storage ranges corresponds to one processor resource among the multiple processor resources; a target storage range corresponding to a data access request of the data volume is determined from the multiple storage ranges; and a data access operation requested by the data access request is performed on the target storage range by using processor resources corresponding to the target storage range, thereby solving the technical problem of low data access efficiency existing in the data access method of the related storage device and improving the data access efficiency.

[0136] In an exemplary embodiment, the first determination unit includes: a first determination module, configured to determine multiple storage ranges into which a data volume is split according to a first range size when the data volume allows the use of multiple processor resources, where the range size of each storage range among the multiple storage ranges is less than or equal to the first range size.

[0137] In an exemplary embodiment, the first determination module includes: a splitting sub-module, configured to split the data volume into multiple storage ranges according to a first range size based on the logical address of the data volume when the data volume allows the use of multiple processor resources.

[0138] In an exemplary embodiment, the first determination module includes: a first determination sub-module, configured to determine multiple storage ranges into which a data volume is split according to a first range size according to specified configuration information when the data volume allows the use of multiple processor resources, where the specified configuration information is used to indicate the storage ranges into which the data volume is split according to the first range size.

[0139] In an exemplary embodiment, the above-mentioned apparatus further includes: an updating unit, configured to, after determining multiple storage ranges into which a data volume is split according to a first range size, update the multiple storage ranges into storage ranges into which the data volume is split according to a second range size when the idle rate of multiple processor resources used within a specified time period is greater than or equal to an idle rate threshold, where the second range size is less than the first range size.

[0140] In an exemplary embodiment, a data volume is allowed to be split into storage intervals according to N specified interval sizes, where N is a positive integer greater than or equal to 2; the apparatus further includes: an estimation unit, configured to, before updating multiple storage intervals to the storage intervals into which the data volume is split according to a second interval size, estimate the free rate corresponding to an interval size among M interval sizes that are smaller than a first interval size based on the usage information of multiple processor resources within a specified time period, where the free rate corresponding to an interval size among M interval sizes is the free rate of the usage of multiple processor resources when the data volume is split into multiple storage intervals according to the interval size among M interval sizes, and M is a positive integer greater than or equal to 2; a third determination unit, configured to, when there is an interval size among M interval sizes whose corresponding free rate is smaller than a free rate threshold, determine the largest interval size whose corresponding free rate is smaller than the free rate threshold as the second interval size.

[0141] In an exemplary embodiment, the second determination unit includes: a second determination module, configured to determine a target storage interval from multiple storage intervals based on the start address requested to be accessed by a data access request and the end address requested to be accessed by the data access request.

[0142] In an exemplary embodiment, the second determination module includes: a second determination sub-module, configured to determine a first storage interval to which the start address requested to be accessed by the data access request belongs from multiple storage intervals; a third determination sub-module, configured to determine a second storage interval to which the end address requested to be accessed by the data access request belongs from multiple storage intervals; a fourth determination sub-module, configured to, when the first storage interval and the second storage interval are the same storage interval, determine the first storage interval as the target storage interval; a fifth determination sub-module, configured to, when the first storage interval and the second storage interval are adjacent storage intervals, determine the first storage interval and the second storage interval as the target storage interval; a sixth determination sub-module, configured to, when the first storage interval and the second storage interval are non-adjacent storage intervals, determine the first storage interval, the second storage interval, and the storage intervals between the first storage interval and the second storage interval as the target storage interval.

[0143] In an exemplary embodiment, a storage range among a plurality of storage ranges has a unique range number, a processor resource among a plurality of processor resources has a unique resource number, and the storage ranges among the plurality of storage ranges are cyclically corresponding to the processor resources among the plurality of processor resources according to the range numbers; the apparatus further includes: a fourth determination unit, configured to determine a remainder obtained by taking the remainder of the range number of the target storage range divided by the number of the processor resources among the plurality of processor resources before performing, by using the processor resource corresponding to the target storage range, a data access operation requested by a data access request on the target storage range; a fifth determination unit, configured to determine, among the plurality of processor resources, the processor resource whose resource number is the remainder as the processor resource corresponding to the target storage range.

[0144] In an exemplary embodiment, one processor resource among a plurality of processor resources corresponds to one request queue, and the request queue of the processor resources among the plurality of processor resources allows threads assigned by the processor resources among the plurality of processor resources to access; the execution unit includes: a first writing module, configured to write a data access request into the request queue of the processor resource corresponding to the target storage range when the target storage range only includes one storage range; a first execution module, configured to access, by a thread assigned by the processor resource corresponding to the target storage range, the data access request in the request queue of the processor resource corresponding to the target storage range, and perform a data access operation on the target storage range in response to the data access request.

[0145] In an exemplary embodiment, the execution unit further includes: a splitting module, configured to split, when the target storage range includes at least two storage ranges, a data access operation into at least two access requests according to a logical address requested to be accessed by the data access request, where a logical address requested to be accessed by each of the at least two sub-access requests belongs to one of the at least two storage ranges; a second writing module, configured to write each sub-access request into the request queue of the processor resource corresponding to each sub-access request, where the processor resource corresponding to each sub-access request is the processor resource corresponding to the storage range to which the logical address requested to be accessed by each sub-access request belongs; a second execution module, configured to access, by a thread assigned by the processor resource corresponding to each sub-access request, each sub-access request in the request queue of the processor resource corresponding to each sub-access request, and perform a data access operation on the storage range to which the logical address requested to be accessed by each sub-access request belongs in response to each sub-access request.

[0146] In an exemplary embodiment, the above-mentioned device further includes: a putting unit, configured to, when a silent process on the storage device is triggered, put the silent process function of the silent process into the thread allocated with the processor resources corresponding to each sub-access request, so as to perform silent processing on the thread allocated with the processor resources corresponding to each sub-access request.

[0147] In an exemplary embodiment, the above-mentioned device further includes: a skipping unit, configured to, when the number of data volumes on the storage device is one, skip a specified lock when executing to the specified lock on the storage device, where the specified lock is a lock set to protect the critical resources between different data volumes.

[0148] In an exemplary embodiment, the above-mentioned device further includes: a sixth determination unit, configured to, when the number of data volumes on the storage device is less than or equal to a preset number threshold, determine that the data volume allows the use of multiple processor resources, where the multiple processor resources are the available processor cores on the storage device.

[0149] In an exemplary embodiment, the above-mentioned device further includes: a seventh determination unit, configured to, when the number of data volumes on the storage device is greater than the preset number threshold, determine that the data volume allows the use of one of the multiple processor resources.

[0150] In an exemplary embodiment, the above-mentioned device further includes: an allocation unit, configured to, when the number of data volumes on the storage device is greater than the preset number threshold, allocate the allowed processor resources for the data volume from the multiple processor resources according to the historical resource usage rate of the data volume; where the allowed processor resources for different data volumes are different from each other, some data volumes only allow the use of one processor resource, and some other data volumes allow the use of at least two processor resources.

[0151] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above-mentioned modules are located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.

[0152] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the data access method for a storage device.

[0153] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the data access method for a storage device when running.

[0154] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), external hard drives, magnetic disks, or optical discs that can store computer programs.

[0155] According to another aspect of the embodiments of the present application, there is also provided a computer program product, the computer program product including a computer program, where the computer program, when executed by a processor, implements the steps in any of the above-described embodiments of the data access method for a storage device.

[0156] The embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps in any of the above-described embodiments of the data access method for a storage device.

[0157] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0158] The above has provided a detailed introduction to the data access for a storage device provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A data access method for a storage device, characterized in that, Including: When a data volume on the storage device allows multiple processor resources of the storage device to be used, determining a plurality of storage ranges into which the data volume is split, wherein one of the plurality of storage ranges corresponds to one of the multiple processor resources, one of the multiple processor resources corresponds to a request queue, and a request queue of a processor resource among the multiple processor resources allows threads assigned by the processor resource among the multiple processor resources to access; Determining a target storage range corresponding to a data access request of the data volume from the plurality of storage ranges; Using a processor resource corresponding to the target storage range to perform a data access operation requested by the data access request on the target storage range; The using a processor resource corresponding to the target storage range to perform a data access operation requested by the data access request on the target storage range includes: when the target storage range includes at least two storage ranges, splitting the data access request into at least two sub-access requests according to a logical address requested to be accessed by the data access request, wherein a logical address requested to be accessed by each of the at least two sub-access requests belongs to one of the at least two storage ranges; writing each of the sub-access requests into a request queue of a processor resource corresponding to each of the sub-access requests, wherein the processor resource corresponding to each of the sub-access requests is a processor resource corresponding to the storage range to which the logical address requested to be accessed by each of the sub-access requests belongs; accessing each of the sub-access requests in the request queue of the processor resource assigned to by the processor resource corresponding to each of the sub-access requests through a thread assigned by the processor resource corresponding to each of the sub-access requests, and in response to each of the sub-access requests, performing the data access operation on the storage range to which the logical address requested to be accessed by each of the sub-access requests belongs.

2. The method according to claim 1, characterized in that The when a data volume on the storage device allows multiple processor resources of the storage device to be used, determining a plurality of storage ranges into which the data volume is split, includes: When the data volume allows the multiple processor resources to be used, determining the plurality of storage ranges into which the data volume is split according to a first range size, wherein a range size of a storage range among the plurality of storage ranges is less than or equal to the first range size.

3. The method according to claim 2, wherein The when the data volume allows the multiple processor resources to be used, determining the plurality of storage ranges into which the data volume is split according to a first range size, includes: When the data volume allows the multiple processor resources to be used, splitting the data volume into the plurality of storage ranges according to the first range size based on a logical address of the data volume.

4. The method according to claim 2, characterized in that The when the data volume allows the multiple processor resources to be used, determining the plurality of storage ranges into which the data volume is split according to a first range size, includes: When the data volume allows the use of the multiple processor resources, determine, according to specified configuration information, the multiple storage intervals into which the data volume is split according to the first interval size, where the specified configuration information is used to indicate the storage intervals into which the data volume is split according to the first interval size.

5. The method according to claim 2, wherein After determining the multiple storage intervals into which the data volume is split according to the first interval size, the method further includes: When the idle rate of the multiple processor resources used within a specified time period is greater than or equal to an idle rate threshold, update the multiple storage intervals to the storage intervals into which the data volume is split according to a second interval size, where the second interval size is smaller than the first interval size.

6. The method according to claim 5, wherein The data volume allows to be split into storage intervals according to specified N interval sizes, where N is a positive integer greater than or equal to 2; Before updating the multiple storage intervals to the storage intervals into which the data volume is split according to the second interval size, the method further includes: When there are M interval sizes smaller than the first interval size among the N interval sizes, estimate, according to the usage information of the multiple processor resources within the specified time period, the idle rate corresponding to the interval size among the M interval sizes, where the idle rate corresponding to the interval size among the M interval sizes is the idle rate of the multiple processor resources used when the data volume is split into the multiple storage intervals according to the interval size among the M interval sizes, and M is a positive integer greater than or equal to 2; When there is an interval size among the M interval sizes whose corresponding idle rate is less than the idle rate threshold, determine the largest interval size whose corresponding idle rate is less than the idle rate threshold as the second interval size.

7. The method according to claim 1, characterized in that Determining the target storage interval corresponding to the data access request of the data volume from the multiple storage intervals includes: Based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request, determine the target storage interval from the multiple storage intervals.

8. The method according to claim 7, wherein Based on the start address requested to be accessed by the data access request and the end address requested to be accessed by the data access request, determining the target storage interval from the multiple storage intervals includes: Determine the first storage interval to which the start address requested to be accessed by the data access request belongs from the multiple storage intervals; Determine the second storage interval to which the end address requested to be accessed by the data access request belongs from the multiple storage intervals; When the first storage interval and the second storage interval are the same storage interval, determine the first storage interval as the target storage interval; When the first storage interval and the second storage interval are adjacent storage intervals, determine the first storage interval and the second storage interval as the target storage interval; When the first storage interval and the second storage interval are non - adjacent storage intervals, determine the first storage interval, the second storage interval, and the storage interval between the first storage interval and the second storage interval as the target storage interval.

9. The method according to claim 1, wherein The storage intervals among the multiple storage intervals have unique interval numbers, the processor resources among the multiple processor resources have unique resource numbers, and the storage intervals among the multiple storage intervals correspond to the processor resources among the multiple processor resources in a cyclic manner according to the interval numbers; Before using the processor resource corresponding to the target storage interval to perform the data access operation requested by the data access request on the target storage interval, the method further includes: Determine the remainder obtained by taking the remainder of the interval number of the target storage interval divided by the number of processor resources among the multiple processor resources; Determine the processor resource with the resource number being the remainder among the multiple processor resources as the processor resource corresponding to the target storage interval.

10. The method according to claim 1, wherein Using the processor resource corresponding to the target storage interval to perform the data access operation requested by the data access request on the target storage interval includes: When the target storage interval contains only one storage interval, write the data access request into the request queue of the processor resource corresponding to the target storage interval; Access the data access request in the request queue of the processor resource corresponding to the target storage interval through a thread assigned by the processor resource corresponding to the target storage interval, and in response to the data access request, perform the data access operation on the target storage interval.

11. The method according to claim 1, characterized in that, The method further includes: When the silent process on the storage device is triggered, put the silent process function of the silent process into the thread assigned by the processor resource corresponding to each sub - access request to perform silent processing on the thread assigned by the processor resource corresponding to each sub - access request.

12. The method according to claim 1, wherein The method further includes: When the number of data volumes on the storage device is one, when reaching the specified lock on the storage device, skip the specified lock, where the specified lock is a lock set to protect the critical resources between different data volumes.

13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: When the number of data volumes on the storage device is less than or equal to a preset quantity threshold, determine that the data volumes are allowed to use the multiple processor resources, where the multiple processor resources are the available processor cores on the storage device.

14. The method according to claim 13, wherein The method further includes: When the number of data volumes on the storage device is greater than the preset quantity threshold, determine that the data volumes are allowed to use one processor resource among the multiple processor resources.

15. The method according to claim 13, wherein The method further includes: When the number of data volumes on the storage device is greater than the preset quantity threshold, allocate the allowed - to - use processor resources for the data volumes from the multiple processor resources according to the historical resource utilization rate of the data volumes; Among them, the processor resources allowed to be used by different data volumes are different from each other. Some of the data volumes only allow the use of one processor resource, and some other data volumes allow the use of at least two processor resources.

16. A data access device for a storage device, characterized in that Including: A first determination unit, configured to determine, when a data volume on the storage device allows the use of multiple processor resources of the storage device, multiple storage intervals into which the data volume is split. Among them, one storage interval in the multiple storage intervals corresponds to one processor resource in the multiple processor resources. One processor resource in the multiple processor resources corresponds to a request queue, and the request queue of the processor resource in the multiple processor resources allows the threads allocated by the processor resource in the multiple processor resources to access; A second determination unit, configured to determine a target storage interval corresponding to the data access request of the data volume from the multiple storage intervals; An execution unit, configured to use the processor resource corresponding to the target storage interval to perform the data access operation requested by the data access request on the target storage interval; The execution unit includes: a splitting module, configured to, when the target storage interval includes at least two storage intervals, split the data access request into at least two sub-access requests according to the logical address requested to be accessed by the data access request. Among them, the logical address requested to be accessed by each sub-access request in the at least two sub-access requests belongs to one storage interval in the at least two storage intervals; a second writing module, configured to write each sub-access request into the request queue of the processor resource corresponding to each sub-access request. The processor resource corresponding to each sub-access request is the processor resource corresponding to the storage interval to which the logical address requested to be accessed by each sub-access request belongs; a second execution module, configured to access each sub-access request in the request queue of the processor resource corresponding to each sub-access request through the thread allocated by the processor resource corresponding to each sub-access request, and in response to each sub-access request, perform the data access operation on the storage interval to which the logical address requested to be accessed by each sub-access request belongs.

17. An electronic device, characterized in that, Including: A memory, configured to store a computer program; A processor, configured to implement the steps of the data access method of the storage device according to any one of claims 1 to 15 when executing the computer program.

18. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data access method of the storage device according to any one of claims 1 to 15 are implemented.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the data access method of the storage device according to any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Metadata volume storage state recording method and system and related components

    CN109445713A

  • Multi-core-oriented NVM storage device simulator and design method

    CN112506425A

  • Memory access circuit, memory access method, integrated circuit and electronic equipment

    CN116820344A