Data access method and device of storage equipment, electronic equipment and storage medium

By allowing the data volume to use multiple processor resources on the storage device to dynamically allocate data access requests to the corresponding processor resource processing, the problem of low data access efficiency in the prior art is solved, and higher processor resource utilization and data access efficiency are achieved.

CN119718685AActive Publication Date: 2025-03-28INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The data access method of existing storage devices has the problem of low data access efficiency.

Method used

By allowing the data volume to use multiple processor resources on the storage device, dynamically allocate data access requests to the corresponding processor resource processing, the multi-processor resource utilization of the data volume is realized.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718685A_ABST
    Figure CN119718685A_ABST
Patent Text Reader

Abstract

The invention discloses a data access method and device of a storage device, electronic equipment and a storage medium, and relates to the technical field of data process.The method comprises the steps that under the condition that a data volume on the storage device is allowed to use a plurality of processor resources of the storage device, the data volume on the storage device is accessed; by adopting the strategy of dynamically allocating the processor resources according to the storage intervals corresponding to the data access requests, the data volume is divided into a plurality of storage intervals, and the data access requests are dynamically allocated to the corresponding processor resources for processing according to the corresponding relationship between the storage intervals and the processor resources, so that the utilization rate of the processor resources can be improved; the technical problem of low data access efficiency of the data access method of the storage device in the related technology is solved, and the technical effect of improving the data access efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, 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 users use storage devices, they can first create volumes on the storage device and then map the volumes to the user's server. After a volume of a storage device is mapped to a server, it is equivalent to a physical hard disk of the server. Users can subsequently perform operations based on this hard disk, such as mounting a file system and virtualizing it into a C drive or a D drive under the operating system.

[0003] In the related art, a volume of a storage device can use a processor resource of the storage device. When data is accessed on a volume of the storage device, the data is accessed by utilizing the serial execution characteristics of the corresponding processor resource. 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] The present 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 for a storage device in the related art.

[0005] According to one aspect of an embodiment of the present application, a data access method for a storage device is provided, comprising: in a case where a data volume on the storage device allows use of multiple processor resources of the storage device, determining multiple storage intervals into which the data volume is split, wherein one storage interval among the multiple storage intervals corresponds to one of the multiple processor resources; determining a target storage interval corresponding to a data access request for the data volume from the multiple storage intervals; and 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.

[0006] According to another aspect of an embodiment of the present application, a data access device for a storage device is also provided, comprising: a first determination unit, for determining, when the data volume on the storage device allows use of multiple processor resources of the storage device, the multiple storage intervals into which the data volume is split, wherein one storage interval among the multiple storage intervals corresponds to one of the multiple processor resources; a second determination unit, for determining, from the multiple storage intervals, a target storage interval corresponding to a data access request for the data volume; and an execution unit, for executing 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.

[0007] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the steps of any of the above-mentioned data access methods of the storage device through the computer program.

[0008] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned storage device data access methods 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, 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 performs the steps of any of the above-mentioned data access methods of the storage device.

[0010] Through the present application, since 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 interval corresponding to the data access request is adopted. By splitting the data volume into multiple storage intervals and dynamically allocating data access requests to the corresponding processor resources for processing according to the correspondence between the storage intervals and the processor resources, data access to a single data volume can be scheduled to be processed by multiple processor resources, which can improve the utilization rate of processor resources. By having multiple processor resources process data access to the same data volume, the technical effect of improving data access efficiency can be achieved. 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 following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

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

[0013] Figure 2 It is a flowchart of an optional data access method for 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 of a storage device according to an embodiment of the present application.

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

[0017] Figure 6 It is a structural block diagram of a data access device of an optional storage device according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

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

[0020] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0021] According to one aspect of an embodiment of the present application, a method for accessing data of a storage device is provided. Optionally, in this embodiment, the method for accessing data of the storage device may be applied to, but is not limited to, Figure 1The hardware environment shown 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, and 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 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, and 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-mentioned network may include but is not limited to at least one of the following: wired network, wireless network. The above-mentioned wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above-mentioned wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be, but is not limited to, a PC (Personal Computer), a mobile phone, a tablet computer, etc. The server 104 may be, but is not limited to, a cloud server, a server cluster, or other server types. The disk 108 may include but is not limited to at least one of the following: a disk, such as a hard disk, a floppy disk, etc.; a non-disk, such as a solid state drive, an optical disk, a USB flash drive, etc.

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

[0024] Taking the storage device 106 as an example to execute the data access method of the storage device in this embodiment, Figure 2 is a flow chart of an optional method for accessing data of a storage device according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may 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 the multiple storage intervals into which the data volume is split, wherein 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 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 (a data read request and a data write request may be collectively referred to as IO). For a storage device, a data access request requires the use of processor resources, where the processor resources may be resources on a processor, and may include but is not limited to at least one of the following: a processor core, i.e., a CPU (Central Processing Unit) core, cache resources, memory resources, etc. In at least some examples of this embodiment, the processor resources are described using a processor core as an example, and other types of processor resources may be processed in a similar manner.

[0033] In the related art, in order to facilitate the processing of services, a data volume will only use one processor core, so that the services on many data volumes can simplify the service processing by utilizing the characteristics of the single-core serial execution of the processor. The services here can be data access. For example, the way in which the IO of a user on a single volume selects different processor cores is: all the IO on a data volume uses one processor core. However, for the data access method on the above data volume, the efficiency of data access is low. In addition, current processors are usually multi-core. For example, processors commonly used in industry can 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 the cores of the processor can be fully utilized. When the number of data volumes is small (for example, there is only one data volume), only a few processor cores can be used, and the performance of the processor cannot be fully utilized. In this scenario, it will cause low utilization of processor resources and poor user experience of storage performance.

[0034] In order 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 the corresponding processor resources are used to perform data access operations according to the storage intervals corresponding to the data access request, thereby achieving the purpose of using multiple processor resources for one data volume, which can not only improve 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 resource as a processor core as an example, first determine the number of processor cores that can be used in a 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 processor cores that can be used by this data volume in a single volume scenario. In the case where the number of processor resources available on the storage device is multiple, then determine the mode in which the data volume on the storage device uses the processor resources of the storage device. The method for determining the mode in which the data volume on the storage device uses 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 a first usage mode and a second usage mode, wherein the first usage mode is a mode in which the data volume is allowed to use a single processor resource, and the second usage mode is a mode in which the data volume is allowed to use multiple processor resources of the storage device.

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

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

[0038] In the case where the data volume on the storage device allows the use of multiple processor resources of the storage device, determine the multiple storage intervals 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 it can be based on the size of the data volume. In addition, the splitting of the data volume can be performed after determining that the data volume on the storage device allows the use of multiple processor resources of the storage device, or it can be performed in advance, that is, the data volume is split in advance, and the splitting result is recorded through configuration information. After determining 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 ways of determining the splitting result can also be used, which are not limited in this embodiment. Among them, the multiple processor resources can be all the processor resources of the storage device, or they can be the processor resources available to the storage device. One storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources, and one processor resource can correspond to one storage interval, or it can correspond to at least two storage intervals at the same time.

[0039] For a data access request received for a data volume, a target storage interval corresponding to the data access request can be determined from multiple storage intervals. 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 the data access request, the request is to perform a data access operation on a storage space of the data volume. The storage interval to which the above storage space belongs is the target storage interval. The target storage interval can include one storage interval, or it can include at least two storage intervals. 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, or other determination methods can be used, which are not limited in this embodiment.

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

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

[0042] Through the embodiments provided by the present application, when a data volume on a storage device allows the use of multiple processor resources of the storage device, multiple storage intervals into which the data volume is split are determined, wherein one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources; a target storage interval corresponding to a data access request for the data volume is determined from the multiple storage intervals; and the processor resources corresponding to the target storage interval are used to execute the data access operation requested by the data access request on the target storage interval, thereby solving the technical problem of low data access efficiency in the data access method of the storage device in the related art and improving the data access efficiency.

[0043] In an exemplary embodiment, when a data volume on a storage device allows the use of multiple processor resources of the storage device, determining the multiple storage intervals into which the data volume is split 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 a first interval size.

[0044] In this embodiment, in order to ensure the rationality and convenience of data volume splitting, the data volume can be split according to a certain interval size. The interval size used for splitting the data volume can be the first interval size. Correspondingly, in the case where the data volume allows the use of 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 sizes of the storage intervals in the multiple storage intervals are all less than or equal to the first interval size. The interval sizes of the multiple storage intervals after the data volume is split should be as equal to the first interval size as possible. In the case where the first interval size cannot divide the data volume equally, the remaining storage interval whose interval size is smaller than the first interval size can be used as the last storage interval after the split.

[0045] Optionally, a storage interval in the plurality of storage intervals may have a unique interval number, and processing on the storage interval may be performed based on the interval number. The interval number may start from 0 or 1 and increase in sequence, or other numbering methods may be used. A processor resource in the plurality of processor resources may have a unique resource number, and processing on the processor resource may be performed based on the resource number. The resource number may start from 0 or 1 and increase in sequence, or other numbering methods may be used.

[0046] For example, if the first interval size 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 intervals, that is, 102 storage intervals with interval sizes equal to the first interval size of 10M and 1 storage interval with an interval size of 4M. Each storage interval has a corresponding number, for example, starting from 0 to N (where N is 102).

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

[0048] 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 a first interval size includes: when the data volume allows the use of multiple processor resources, based on the logical address of the data volume, splitting the data volume into multiple storage intervals according to the first interval size.

[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 intervals according to a certain interval size, for example, the data volume can be split into multiple storage intervals according to the first interval size. In order to facilitate the splitting of the data volume, the data volume can be split into multiple storage intervals according to the logical address of the data volume, for example, based on the logical address of the data volume, the data volume can be split into multiple storage intervals according to the first interval size.

[0050] Here, the logical address is an abstract address used in the storage system to identify and locate the data location on the data volume. It is usually expressed as a linear address space and can be used for data location, data access, data management, etc. In order to facilitate the management of multiple storage intervals, the linear continuity of logical addresses can be used to split the address space with continuous logical addresses into the same storage interval.

[0051] Through this embodiment, the data volume is split into multiple storage intervals according to a certain interval size based on the logical address of the data volume, which can facilitate the management of multiple storage intervals and improve 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 a 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 specified configuration information.

[0053] In order to improve the efficiency and stability of data volume splitting, the data volume can be split in advance, and the configuration information can be specified in the configuration file based on the splitting result. The specified configuration information is used to indicate the storage intervals into which the data volume is split, and the specified configuration information can include the indication information of the storage intervals into which the data volume is split (for example, interval number, start address, end address, etc.). In the case of splitting the data volume using multiple interval sizes, the specified configuration information can also include information on the interval size 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 the identification information of the data volume, the logical address of the data volume, and other information; the specified configuration information corresponding to each data volume can be different, in which case the number of specified configuration information can be multiple.

[0054] In the case of splitting the data volume 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 is allowed to use multiple processor resources of the storage device, the multiple storage intervals into which the data volume is split according to the first interval size can be determined based on the specified configuration information, for example, the interval size, interval number, and logical address of each storage interval can be determined. In the above manner, 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 storage intervals into which the data volume is split through 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 that the data volume is split into multiple storage intervals according to a first interval size, the above method also includes: when the idle rate used by multiple processor resources within a specified time period is greater than or equal to an idle rate threshold, updating the multiple storage intervals to storage intervals into which the data volume is split according to a second interval size.

[0057] Since the location and size of the data accessed by different data access requests are not fixed, after the data volume is split according to a certain interval size, there may be a high idle rate of processor resources. If the idle rate of processor resources is high, the interval size (i.e., interval size) of the data volume split can be reduced to allow data access requests to select more processor resources for execution.

[0058] For example, if the processor resource is the processor core and the data access request is IO, in a single volume scenario, the current processor core usage can be counted. According to the statistics of processor core usage, if the idle rate of processor core usage is high, then the size of the volume split interval is reduced so that IO can select more processor cores for execution. Because if the idle rate of processor core usage is high, it means that the current interval size causes only a few cores to be used for IO. At this time, the size of the interval needs to be reduced so that the current IO entering the storage falls into as many intervals as possible, thereby using as many processor cores as possible.

[0059] In this embodiment, the idle rate of multiple processor resources used in a specified time period can be counted. The specified time period can be a time period with a certain time length starting at the current time or a specified time as the end time, or a time period with a certain time length starting at a specified time as the start time. The above time length can be 5 minutes, 10 minutes, etc., or other time lengths. When the above idle rate is greater than or equal to the preset idle rate threshold, the data volume is re-split according to a second interval size that is smaller than the first interval size. The method of splitting the data volume according to the second interval size is similar to the method of splitting the data volume according to the first interval size in the aforementioned embodiment, and will not be repeated in this embodiment.

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

[0061] For example, in a single volume scenario, the size of the data volume split storage interval is intelligently switched according to the usage of the processor core, so that the IO in different scenarios can fully utilize the processor core. In a single volume scenario, all the cores of the processor are used as much as possible for different IO models to maximize the performance of storage.

[0062] Through this embodiment, when the processor resource idle rate is high, the interval size used for splitting the data volume can be reduced, and the number of storage intervals can be increased, thereby improving the utilization rate of the processor resources and fully utilizing the processor performance.

[0063] In an exemplary embodiment, reducing the interval size can increase the number of storage intervals, thereby making full use of processor resources. However, if the interval size of the split data volume is too small, the split data volume and the processor resource switching will be too frequent, affecting performance. To this end, 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 the first interval size. For the set N interval sizes, it can be ensured that the minimum interval size is not too small. The number of interval sizes N can be set based on experience, and the N interval sizes can also be set based on experience.

[0064] For example, the range of the interval size of the storage interval can be limited to five levels (ie, the value of N is 5), and the five levels are 128M, 96M, 64M, 32M and 16M. The data volume can be split using any of the five levels of interval size.

[0065] In this embodiment, when 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 into which the data volume is split according to the second interval size, the interval size used for re-splitting the data volume, i.e., the second interval size, can be first determined. When M=1, the only interval size smaller than the first interval size can be directly determined as the second interval size.

[0066] When M is 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, 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 an excessively high idle rate of processor resources.

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

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

[0069] If there is an interval size with a corresponding idle rate less than the idle rate threshold among the M interval sizes, then the maximum interval size with a corresponding idle rate less than the idle rate threshold can be selected as the interval size used to re-split the data volume, thereby obtaining a second interval size, and then the split storage interval is updated according to the second interval size. Here, multiple storage intervals are storage intervals (or storage areas) obtained by splitting the data volume. The interval sizes used to split the data volume are different, and there will be differences between the multiple storage intervals. Therefore, if the interval size used to split the data volume changes, the multiple storage intervals will also be updated. Selecting the maximum interval size with a corresponding idle rate less than the idle rate threshold can avoid splitting the data volume and switching the processor resources too frequently due to the interval size being too small, thereby improving storage performance.

[0070] For example, for the five grades mentioned above, the interval sizes corresponding to the five grades decrease in sequence. The current grade (i.e., the grade corresponding to the first interval size) is the second grade. Since there are lower grades, i.e., the third to fifth grades. In this case, the idle rates corresponding to the third to fifth grades can be estimated respectively. Among them, the idle rates corresponding to the fourth grade and the idle rates corresponding to the fifth grade are both less than the idle 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, the idle rates corresponding to different interval sizes are estimated according to the historical usage of processor resources, and then the maximum interval size with the corresponding idle rate less than the idle rate threshold is selected as the updated interval size, which can improve the storage performance while improving the processor resource utilization.

[0072] In an exemplary embodiment, determining a target storage interval corresponding to a data access request for a data volume from a plurality of storage intervals includes: determining the target storage interval from a plurality of storage intervals based on a starting address requested by the data access request and an ending address requested by the data access request.

[0073] When a data access request for a data volume is received, in 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), and the target storage interval can be directly determined by extracting the carried interval identifier from the data access request. The above method is not conducive to improving the utilization rate of processor resources, and reduces 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 starting address to be accessed and the ending address to be requested to access, and each storage interval has a starting address and an ending address. Therefore, based on the starting address requested to access by the data access request and the ending address requested to access by the data access request, the target storage interval can be determined from multiple storage intervals.

[0075] There may be a variety of ways to determine a target storage interval from multiple storage intervals based on the starting address requested by the data access request and the ending address requested by the data access request. For example, each storage interval may be traversed in turn to determine the target storage interval based on the starting address requested by the data access request and the ending address requested by the data access request, and the logical address range of the traversed storage interval. For another example, the target storage interval may be determined based on the starting address requested by the data access request and the ending address requested by the data access request in accordance with the set correspondence between the logical address and the storage interval. Other determination methods may also be used, which are not limited to this in the present embodiment.

[0076] Through this embodiment, the storage interval corresponding to the data access request is determined according to the start address and the end address requested by the data access request, which can improve the utilization rate of the processor resources and the flexibility of the processor resource utilization.

[0077] In an exemplary embodiment, a target storage interval is determined from multiple storage intervals based on a starting address requested for access by a data access request and an ending address requested for access by the data access request, including: determining a first storage interval to which the starting address requested for access by the data access request belongs from multiple storage intervals; determining a second storage interval to which the ending address requested for access by the data access request belongs from multiple storage intervals; when the first storage interval and the second storage interval are the same storage interval, determining the first storage interval as the target storage interval; when the first storage interval and the second storage interval are adjacent storage intervals, determining 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, determining 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.

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

[0079] The storage interval is divided according to a certain interval size, so the starting address requested by the data access request can be determined according to the interval size. In 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 / interval size (first interval size, second interval size, etc.) requested by the data access request. If the storage interval is identified by an interval number, and the interval number starts from 0, the result of the starting address / interval size requested by the data access request 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 number starts from 1, the result of the starting address / interval size requested by the data access request can be added by 1 to determine 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 of 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 of determining the storage interval to which the start address requested by the data access request belongs, and will not be described in detail here.

[0080] There can be many kinds of 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, the storage space requested to be accessed by the data access request spans two adjacent intervals, and 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 interval. If the first storage interval and the second storage interval are non-adjacent storage intervals, the storage space requested to be accessed by the data access request spans more than two intervals, and there is also a cross-interval situation at this time, and the first storage interval, the second storage interval, and the storage interval between the first storage interval and the second storage interval can be determined as the target storage interval.

[0081] For example, the total size of the data volume is 1024M, which 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 starting address and the ending address, the interval number of the starting address (that is, the interval number of the storage interval where the starting address is located) and the interval number of the ending address (that is, the interval number of the storage interval where the ending address is located) can be determined: starting address / interval size = interval number of the starting address, ending address / interval size = interval number of the ending address, and then determine whether the IO is within a range. If the interval number of the starting address is equal to the interval number of the ending address, then it can be considered that the IO does not cross intervals, otherwise it is a cross-interval IO.

[0082] like Figure 4 As shown, interval 0 is the storage interval with interval number 0, interval 1 is the storage interval with interval number 1, and so on, interval N is the storage interval with interval number N, and for the case where the above data volume is divided into 103 storage intervals, the value of N is 102. The acquired IO includes: the first IO, the second IO, and the third IO, wherein the storage interval where the start address of the first IO is located is interval 0, the storage interval where the end address of the first IO is located is interval 2, and 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, the storage interval where the end address of the third IO is located is interval 4, and 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 to be accessed 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, a storage interval in the plurality of storage intervals has a unique interval number, and a processor resource in the plurality of processor resources has a unique resource number. The interval number and the resource number are similar to those in the aforementioned embodiment and are not described in detail here. In order to improve the convenience of the correspondence between the storage interval and the processor resource, the storage interval in the plurality of storage intervals corresponds to the processor resource in the plurality of processor resources in a cyclic manner according to the interval number.

[0085] For example, the processor core includes core 0, core 1 and core 2. The storage intervals of the data volume are cyclically associated with 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 follows: Figure 5As shown, 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, assuming that the processor has 16 cores, the storage intervals numbered 0-15 correspond to cores 0-15, the storage intervals numbered 16-31 correspond to cores 0-15, and so on.

[0086] Correspondingly, before using the processor resources corresponding to the target storage interval to execute the data access operation requested by the data access request on the target storage interval, the above method also includes: determining the modulo result obtained by taking the modulo of the interval number of the target storage interval and the number of processor resources among multiple processor resources; and determining the processor resource whose resource number is the modulo result among the multiple processor resources as the processor resource corresponding to the target storage interval.

[0087] In order to quickly determine the corresponding processor resource after receiving a data access request, and then have the determined processor resource 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 interval number of the target storage interval can be modulo the number of processor resources in the plurality of processor resources, and the obtained value is the resource number of the processor resource to be used to process 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 resources. For this purpose, except for the storage interval where the starting address requested by the data access request is located, which uses the starting address requested by the data access request to determine the corresponding data resource, the remaining storage intervals can use the starting address of the storage interval to determine the corresponding data resource.

[0089] For example, the algorithm for selecting a processor core by IO may be: divide the starting address by the interval size to obtain the interval number of the storage interval to which the IO belongs, and then take the modulus of the interval number by the number of available processor cores to obtain the core number of the processor core to be used by this IO (an example of the resource number of the processor resource). The calculation formula may be as shown in formula (1):

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

[0091] Here, in the single-volume scenario, IO is switched to different processor cores according to the interval number to which it belongs, changing the way that IO on a data volume is executed only on one processor core, and improving the IOPS (Input / Output Operations Per Second) of the single-volume scenario. In addition, for IO that is restored after a node hangs up, the above method is still used for the restored IO, and the corresponding processor core is selected according to the starting address of the IO.

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

[0093] In an exemplary embodiment, one of the processor resources among the multiple processor resources may correspond to a request queue (e.g., an IO data queue), and the request queue of the processor resource among the multiple processor resources allows access by a thread to which the processor resource among the multiple processor resources is assigned. The data access operation requested to be executed by executing the data access request using the processor resource may be implemented by processing the data access request by the thread to which the processor resource is assigned.

[0094] In the related art, a data volume uses only one processor resource, and the data structure storing data access requests (e.g., queue) is accessed by only one thread. In this embodiment, a data volume can use multiple processor resources, and the storage data access requests and control flow data must be adapted to multiple threads. To this end, corresponding request queues can be set for each processor resource allowed to be used by the data volume. If a data volume has multiple queues to access, the original request queue can be split into queue arrays (also request queues), and each thread only accesses the corresponding data access request in the corresponding queue array according to the allocated processor resources.

[0095] The target storage interval may include only one storage interval, and the corresponding processor resource is one. In this case, 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 the corresponding request queue is also one. The target storage interval may also include at least two storage intervals, and the corresponding processor resource is at least two. In this case, 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 the corresponding request queue is also at least two. Different processing methods can be used to process data access requests in different situations.

[0096] As an optional implementation, when the target storage interval only includes one storage interval, the processor resources corresponding to the target storage interval are used to execute the data access operation requested by the data access request on the target storage interval, including: writing the data access request to the request queue of the processor resource corresponding to the target storage interval; accessing the data access request in the request queue of the processor resource corresponding to the target storage interval through the thread allocated to the processor resource corresponding to the target storage interval, and executing the data access operation on the target storage interval in response to the data access request.

[0097] In this embodiment, in the case where the target storage interval only includes one storage interval, the data access request does not cross intervals, and can be directly written into the request queue of the processor resource corresponding to the target storage interval. Here, the method of determining the processor resource corresponding to the target storage interval is similar to that in the aforementioned embodiment, and is not described in detail here. Then, the thread to which the processor resource corresponding to the target storage interval is allocated can sequentially process the data access request in the request queue of the processor resource corresponding to the target storage interval, thereby responding to the data access request, executing the corresponding data access operation on the target storage interval, and completing the processing of the data access request.

[0098] Through this embodiment, data access requests are written into corresponding request queues according to corresponding storage intervals, and are executed by threads allocated by different processor resources, thereby improving the processing speed of data access requests.

[0099] As another optional implementation, in the case where the target storage interval includes at least two storage intervals, the processor resources corresponding to the target storage interval are used to perform the data access operation requested by the data access request on the target storage interval, including: splitting the data access operation into at least two access requests according to the logical address requested to be accessed by the data access request; writing each sub-access request to the request queue of the processor resource corresponding to each sub-access request; accessing each sub-access request in the request queue of the processor resource corresponding to each sub-access request through the thread allocated to the processor resource corresponding to each sub-access request, and performing the data access operation on the storage interval to which the logical address requested to be accessed by each sub-access request belongs, in response to each sub-access request.

[0100] In this embodiment, in the case where the target storage interval includes at least two storage intervals, the data access request spans the intervals, and the data access request spanning the intervals can be split into at least two sub-access requests, and the logical address requested to be accessed by one of the at least two sub-access requests after the splitting belongs to one of the at least two storage intervals, thereby ensuring that each sub-access request does not span the interval. Each of the split sub-access requests can be written into the request queue of the processor resource corresponding to each sub-access request, and the splitting and distribution of the data access request can be completed in the above manner.

[0101] Optionally, after splitting the data access request into sub-access requests that do not cross intervals, the processor resource corresponding to the sub-access request can be determined based on the starting address of the sub-access request, and 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. The method of determining the processor resource corresponding to the sub-access request based on the starting address of the sub-access request can be similar to that in the aforementioned embodiment, where the starting address of the sub-access request can be divided by the interval size used to split the data volume to obtain the interval number of the storage interval, and then the interval number of the storage interval is modulo the number of processor resources, and the modulo 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 the IO crosses ranges, the IO can be split into multiple sub-IOs, and each sub-IO must not cross ranges. After the cross-range IO is split, the core number of the processor core to be used by the split sub-IO can be calculated separately, based on the starting address of the sub-IO.

[0103] Through the thread to which the processor resource corresponding to each sub-access request is allocated, each sub-access request in the request queue of the processor resource corresponding to each sub-access request can be accessed, and in response to each sub-access request, a data access operation is performed on the storage interval to which the logical address requested to be accessed by each sub-access request belongs. The processing method of each sub-access request is similar to the aforementioned processing method of the data access request, and will not be repeated here.

[0104] In addition, if the interval size of the storage interval of the data volume is too small, it will also cause IO splitting to be too frequent. In the aforementioned method of intelligently adjusting the volume space (i.e., data volume) splitting range, limiting the interval size range 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 cross-interval data access requests into sub-access requests for different storage intervals, and scheduling each sub-access request to the request queue of the corresponding processor resource for processing, the problems of low efficiency and high latency in processing data access operations across storage intervals can be solved, thereby improving the efficiency and stability of data access.

[0106] In an exemplary embodiment, the above method also includes: when a silent process on a storage device is triggered, placing the silent process function of the silent process into the thread to which the processor resources corresponding to each sub-access request are allocated, so as to perform silent processing on the thread to which the processor resources corresponding to each sub-access request are allocated.

[0107] The purpose of starting the silent process is to cancel the data access requests in the waiting resource queue to avoid the risk of data damage or service interruption caused by data access requests during fault recovery or system maintenance. In the related art, a data volume only uses one processor resource, and it is only necessary to apply the silent process function to the request queue of the processor resource to cancel the data access requests in the request queue.

[0108] In this embodiment, a data volume can use multiple processor resources, so the silent process also needs to adapt to multiple threads. If the silent process on the storage device is triggered, the silent process function of the silent process can be placed in the thread to which the processor resource corresponding to each sub-access request is allocated according to the number of threads, so that the thread to which the processor resource corresponding to each sub-access request is allocated is silently processed.

[0109] For example, in scenarios such as single-node failure, the node needs to be silent first, and the silent process needs to cancel the IO waiting for the resource queue. Single-volume multi-threading will cause the IO waiting for resources to be on multiple request queues, so the silent process also requires multi-threaded processing: when the silent process is triggered, 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 adapt to the multi-threaded scenario, thereby ensuring the security of data in the silent process.

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

[0112] In order to avoid data confusion and resource conflicts caused by concurrent access to critical resources (e.g., shared cache, bus, 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 a storage device, there is no resource competition between different data volumes. Setting such locks is not only redundant, but also affects data access efficiency.

[0113] To reduce unnecessary lock operations, if a scenario with only one volume is identified, the locks used to protect critical resources between multiple volumes (i.e., designated locks) can be skipped and subsequent operations can be performed directly. This can reduce the time consumed in acquiring and releasing locks and improve single-volume performance (performance when there is only one data volume in the storage device).

[0114] Through this embodiment, in a single volume scenario, the locks used to protect critical resources between multiple volumes are skipped, which can reduce latency and improve single volume performance.

[0115] In an exemplary embodiment, the method of using processor resources for a data volume 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 allowed to be used by a data volume may include but are not limited to: available processor cores.

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

[0117] When the number of data volumes on the storage device is less than or equal to the preset number threshold, the number of data volumes is small. If each data volume is only allowed to use one processor resource, the idle rate of the processor resource is high and the processor performance cannot be fully utilized. In order to fully utilize 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 optional implementation, the method further includes: when the number of data volumes on the storage device is greater than a preset number threshold, determining that the data volume is allowed to use one processor resource among the multiple processor resources.

[0119] When the number of data volumes on the storage device is greater than the preset number threshold, the number of data volumes is small. If each data volume uses all processor resources, too many core switching times will lead to performance degradation. Therefore, when the number of data volumes on the storage device is large, a strategy of using one processor resource for one data volume can be adopted. When the number of data volumes is small, a strategy of using multiple processor resources for one data volume can be switched.

[0120] The preset quantity threshold is similar to that in the aforementioned embodiment. 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. In this embodiment, there is no limitation on the preset quantity threshold.

[0121] For example, if each data volume still uses all available processor cores in a multi-volume (i.e., multiple data volumes) scenario, the number of processor core switching will be too many, which will result in lower performance (compared to the method of using one processor core for each data volume). To this end, the method of using processor cores for each data volume can be intelligently adjusted according to the number of data volumes on the storage device to maximize storage performance: if the number of data volumes on the storage device is large, the strategy of using one processor core for one data volume is adopted; if the number of data volumes on the storage device is small, the strategy of using multiple processor cores for one data volume is adopted. In the above manner, the method of using processor cores for data volumes can be changed intelligently. In a multi-volume scenario, each data volume only uses one processor core assigned to it. When there are fewer data volumes, each data volume can use all available processor cores.

[0122] The way in which data volumes use processor cores can be changed intelligently 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, each data volume only uses one available processor core.

[0123] Through this embodiment, the way in which each data volume uses the core is intelligently adjusted according to the number of data volumes on the storage device, so that the storage performance can be maximized and the efficiency of data access can be improved.

[0124] In an exemplary embodiment, the method further includes: when the number of data volumes on the storage device is greater than a preset number threshold, allocating permitted processor resources to the data volumes from a plurality of processor resources according to historical resource usage of the data volumes.

[0125] In this embodiment, when the number of data volumes is greater than a preset threshold, in order to improve the utilization of processor resources, different numbers of processor resources may be allocated to different data volumes based on the historical resource utilization of the data volumes, that is, the processor resources allowed to be used may be allocated to the data volumes from multiple processor resources. Here, the historical resource utilization of the data volumes may describe the use of processor resources by the data volumes in a historical time period.

[0126] After allocating the processor resources allowed to be used for the data volumes, the processor resources allowed to be used by different data volumes are different (that is, one processor resource will not be allocated to two data volumes). Some data volumes are only allowed to use one processor resource, while 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 those with a low historical resource utilization rate, while the data volumes that are allowed to use at least two processor resources are those with a high historical resource utilization rate. In order to facilitate processor resource allocation, the other data volumes may be allowed to use two processor resources.

[0127] Through this embodiment, by intelligently allocating processor resources, differentiated 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 implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course 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, a data access device for a storage device is also provided, and 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, which has been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0130] Figure 6 is a structural block diagram of a data access device of an optional storage device according to an embodiment of the present application, such as Figure 6 As shown in , the data access device of the storage device includes a first determining unit 602 , a second determining unit 604 and an executing unit 606 .

[0131] The first determining unit 602 is used to determine the multiple storage intervals into which the data volume is split when the data volume on the storage device allows the use of multiple processor resources of the storage device, wherein one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources.

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

[0133] The execution unit 606 is configured to use the processor resources corresponding to the target storage interval to execute the data access operation requested by the data access request on the target storage interval.

[0134] It should be noted that the first determining unit 602 in this embodiment can be used to execute the above step S202, the second determining unit 604 in this embodiment can be used to execute the above step S204, and the executing unit 606 in this embodiment can be used to execute the above step S206.

[0135] Through the embodiments provided by the present application, when a data volume on a storage device allows the use of multiple processor resources of the storage device, multiple storage intervals into which the data volume is split are determined, wherein one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources; a target storage interval corresponding to a data access request for the data volume is determined from the multiple storage intervals; and the processor resources corresponding to the target storage interval are used to execute the data access operation requested by the data access request on the target storage interval, thereby solving the technical problem of low data access efficiency in the data access method of the storage device in the related art and improving the data access efficiency.

[0136] In an exemplary embodiment, the first determination unit includes: a first determination module, which is used to determine the multiple storage intervals into which the data volume is split according to the first interval size when the data volume allows the use of multiple processor resources, wherein the interval sizes of the storage intervals in the multiple storage intervals are all less than or equal to the first interval size.

[0137] In an exemplary embodiment, the first determination module includes: a splitting submodule for splitting the data volume into multiple storage intervals according to the first interval 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, which is used to determine, when the data volume allows the use of multiple processor resources, the multiple storage intervals into which the data volume is split according to the first interval size based on the specified configuration information, wherein the specified configuration information is used to indicate the storage intervals into which the data volume is split according to the first interval size.

[0139] In an exemplary embodiment, the above-mentioned device also includes: an updating unit, which is used to update the multiple storage intervals into storage intervals into which the data volume is split according to a second interval size after determining that the data volume is split according to a first interval size, if the idle rate used by multiple processor resources within a specified time period is greater than or equal to an idle rate threshold, wherein the second interval size is smaller than the first interval size.

[0140] In an exemplary embodiment, a data volume is allowed to be split into storage intervals according to specified N interval sizes, wherein N is a positive integer greater than or equal to 2; the above-mentioned device also includes: an estimating unit, which is used to estimate the idle rate corresponding to the interval size in the M interval sizes according to the usage information of multiple processor resources in a specified time period before updating the multiple storage intervals to the storage intervals into which the data volume is split according to the second interval size, when there are M interval sizes smaller than the first interval size in the N interval sizes, wherein the idle rate corresponding to the interval size in the M interval sizes is the idle rate used by multiple processor resources when the data volume is split into multiple storage intervals according to the interval size in the M interval sizes, and M is a positive integer greater than or equal to 2; a third determining unit, which is used to determine the maximum interval size whose corresponding idle rate is less than the idle rate threshold as the second interval size when there is an interval size whose corresponding idle rate is less than the idle rate threshold in the M interval sizes.

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

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

[0143] In an exemplary embodiment, a storage interval among multiple storage intervals has a unique interval number, a processor resource among multiple processor resources has a unique resource number, and the storage intervals among the multiple storage intervals correspond cyclically to the processor resources among the multiple processor resources according to the interval number; the above-mentioned device also includes: a fourth determination unit, which is used to determine the modulo result obtained by taking the modulo of the interval number of the target storage interval and the number of processor resources among the multiple processor resources before using the processor resource corresponding to the target storage interval to execute the data access operation requested by the data access request on the target storage interval; a fifth determination unit, which is used to determine the processor resource among the multiple processor resources whose resource number is the modulo result as the processor resource corresponding to the target storage interval.

[0144] In an exemplary embodiment, a processor resource among multiple processor resources corresponds to a request queue, and the request queue of the processor resource among the multiple processor resources allows access by a thread to which the processor resource among the multiple processor resources is assigned; the execution unit includes: a first writing module, used to write a data access request to the request queue of the processor resource corresponding to the target storage interval when the target storage interval only contains one storage interval; a first execution module, used to access the data access request in the request queue of the processor resource corresponding to the target storage interval through the thread to which the processor resource corresponding to the target storage interval is assigned, and perform a data access operation on the target storage interval in response to the data access request.

[0145] In an exemplary embodiment, the execution unit also includes: a splitting module, which is used to split the data access operation into at least two access requests according to the logical address requested to be accessed by the data access request when the target storage interval includes at least two storage intervals, wherein 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 of the at least two storage intervals; a second writing module, which is used to write each sub-access request into the request queue of the processor resource corresponding to each sub-access request, wherein 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, which is used to access each sub-access request in the request queue of the processor resource corresponding to each sub-access request through the thread to which the processor resource corresponding to each sub-access request is allocated, and in response to each sub-access request, perform a data access operation on the storage interval to which the logical address requested to be accessed by each sub-access request belongs.

[0146] In an exemplary embodiment, the above-mentioned device also includes: a placement unit, which is used to place the silent process function of the silent process into the thread to which the processor resources corresponding to each sub-access request are allocated when the silent process on the storage device is triggered, so as to perform silent processing on the thread to which the processor resources corresponding to each sub-access request are allocated.

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

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

[0149] In an exemplary embodiment, the apparatus further includes: a seventh determining unit, configured to determine that a data volume is allowed to use one processor resource among a plurality of processor resources when the number of data volumes on the storage device is greater than a preset number threshold.

[0150] In an exemplary embodiment, the above-mentioned device also includes: an allocation unit, which is used to allocate allowed processor resources to the data volumes from multiple processor resources based on the historical resource usage rate of the data volumes when the number of data volumes on the storage device is greater than a preset number threshold; wherein the processor resources allowed to be used by different data volumes are different, some data volumes are only allowed to use one processor resource, and other data volumes are allowed to use at least two processor resources.

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

[0152] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein 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 data access method embodiments of the storage device.

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

[0154] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0155] According to another aspect of the embodiments of the present application, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned data access method embodiments of the storage device are implemented.

[0156] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned data access method embodiments of the storage device are implemented.

[0157] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0158] The above is a detailed introduction to the data access of a storage device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A data access method for a storage device, characterized in that: include: In a case where the data volume on the storage device allows use of multiple processor resources of the storage device, determining multiple storage intervals into which the data volume is split, wherein 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 the data access request of the data volume from the multiple storage intervals; Using processor resources corresponding to the target storage interval, the data access operation requested by the data access request is performed on the target storage interval.

2. The method according to claim 1, characterized in that In a case where the data volume on the storage device allows use of multiple processor resources of the storage device, determining the multiple storage intervals into which the data volume is split includes: In the case that the data volume allows the use of the multiple processor resources, the multiple storage intervals into which the data volume is split according to a first interval size are determined, wherein the interval sizes of the storage intervals in the multiple storage intervals are all smaller than or equal to the first interval size.

3. The method according to claim 2, characterized in that The step of determining, when the data volume allows the use of the plurality of processor resources, the plurality of storage intervals into which the data volume is split according to the first interval size comprises: In the case that the data volume allows the use of the multiple processor resources, the data volume is split into the multiple storage intervals according to the first interval size based on the logical address of the data volume.

4. The method according to claim 2, characterized in that: The step of determining, when the data volume allows the use of the plurality of processor resources, the plurality of storage intervals into which the data volume is split according to the first interval size comprises: In the case where the data volume allows the use of the multiple processor resources, the multiple storage intervals into which the data volume is split according to the first interval size are determined based on specified configuration information, wherein 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, characterized in that: After determining the plurality of storage intervals into which the data volume is split according to the first interval size, the method further includes: When the idle rate used by the multiple processor resources within a specified time period is greater than or equal to an idle rate threshold, the multiple storage intervals are updated to storage intervals into which the data volume is split according to a second interval size, wherein the second interval size is smaller than the first interval size.

6. The method according to claim 5, characterized in that The data volume allows 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; Before updating the multiple storage intervals to 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, an idle rate corresponding to an interval size among the M interval sizes is estimated according to the usage information of the multiple processor resources in the specified time period, wherein the idle rate corresponding to the interval size among the M interval sizes is an idle rate used by the multiple processor resources when the data volume is split into the multiple storage intervals according to the interval sizes among the M interval sizes, and M is a positive integer greater than or equal to 2; When there is an interval size whose corresponding idle rate is less than the idle rate threshold among the M interval sizes, the maximum interval size whose corresponding idle rate is less than the idle rate threshold is determined as the second interval size.

7. The method according to claim 1, characterized in that The determining, from the plurality of storage intervals, a target storage interval corresponding to the data access request of the data volume comprises: The target storage interval is determined from the multiple storage intervals based on the starting address requested to be accessed by the data access request and the ending address requested to be accessed by the data access request.

8. The method according to claim 7, characterized in that The step of determining the target storage interval from the plurality of storage intervals based on the starting address requested to be accessed by the data access request and the ending address requested to be accessed by the data access request comprises: Determine, from the plurality of storage intervals, a first storage interval to which the start address requested to be accessed by the data access request belongs; Determine, from the plurality of storage intervals, a second storage interval to which the end address requested to be accessed by the data access request belongs; In a case where the first storage interval and the second storage interval are the same storage interval, determining the first storage interval as the target storage interval; In a case where the first storage interval and the second storage interval are adjacent storage intervals, determining 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, the first storage interval, the second storage interval, and a storage interval between the first storage interval and the second storage interval are determined as the target storage interval.

9. The method according to claim 1, characterized in that: The storage intervals in the plurality of storage intervals have unique interval numbers, the processor resources in the plurality of processor resources have unique resource numbers, and the storage intervals in the plurality of storage intervals correspond to the processor resources in the plurality of processor resources in a cyclic manner according to the interval numbers; Before using the processor resources 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 a modulo result obtained by modulo the interval number of the target storage interval and the number of processor resources in the plurality of processor resources; The processor resource whose resource number is the modulo result among the multiple processor resources is determined as the processor resource corresponding to the target storage interval.

10. The method according to claim 1, characterized in that One of the plurality of processor resources corresponds to a request queue, the request queue of the processor resource of the plurality of processor resources allowing access by a thread to which the processor resource of the plurality of processor resources is assigned; The using the processor resources 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 includes only one storage interval, writing the data access request into a request queue of a processor resource corresponding to the target storage interval; The thread to which the processor resource corresponding to the target storage interval is allocated accesses the data access request in the request queue of the processor resource corresponding to the target storage interval, and in response to the data access request, performs the data access operation on the target storage interval.

11. The method according to claim 10, characterized in that The using the processor resources corresponding to the target storage interval to perform the data access operation requested by the data access request on the target storage interval further includes: In the case where the target storage interval includes at least two storage intervals, the data access operation is split into at least two access requests according to the logical address requested to be accessed by the data access request, wherein the 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 intervals; Writing each sub-access request into a request queue of a processor resource corresponding to each sub-access request, wherein the processor resource corresponding to each sub-access request is a processor resource corresponding to a storage interval to which a logical address requested to be accessed by each sub-access request belongs; Each sub-access request in the request queue of the processor resource corresponding to each sub-access request is accessed through the thread to which the processor resource corresponding to each sub-access request is allocated, and in response to each sub-access request, the data access operation is performed on the storage interval to which the logical address requested to be accessed by each sub-access request belongs.

12. The method according to claim 11, characterized in that The method further comprises: When the silent process on the storage device is triggered, the silent process function of the silent process is placed in the thread to which the processor resources corresponding to each sub-access request are allocated, so as to perform silent processing on the thread to which the processor resources corresponding to each sub-access request are allocated.

13. The method according to claim 1, characterized in that The method further comprises: In the case that the number of the data volumes on the storage device is one, when executing a designated lock on the storage device, the designated lock is skipped, wherein the designated lock is a lock set to protect critical resources between different data volumes.

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

15. The method according to claim 14, characterized in that The method further comprises: When the number of the data volumes on the storage device is greater than the preset number threshold, it is determined that the data volume is allowed to use one processor resource among the plurality of processor resources.

16. The method according to claim 14, characterized in that The method further comprises: When the number of the data volumes on the storage device is greater than the preset number threshold, allocating a processor resource allowed to be used to the data volume from the multiple processor resources according to a historical resource usage rate of the data volume; The processor resources allowed to be used by different data volumes are different from each other. Some of the data volumes are only allowed to use one processor resource, while other data volumes are allowed to use at least two processor resources.

17. A data access device for a storage device, characterized in that: include: a first determining unit, configured to determine, when the data volume on the storage device allows the use of multiple processor resources of the storage device, the multiple storage intervals into which the data volume is split, wherein one storage interval among the multiple storage intervals corresponds to one processor resource among the multiple processor resources; a second determining unit, configured to determine, from the plurality of storage intervals, a target storage interval corresponding to the data access request of the data volume; An execution unit is configured to use a processor resource corresponding to the target storage interval to execute the data access operation requested by the data access request on the target storage interval.

18. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data access method for a storage device according to any one of claims 1 to 16 when executing the computer program.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the data access method for the storage device according to any one of claims 1 to 16.

20. 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 16 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

  • Data storage method and device

    CN118227050A

  • Management system and management method for computer system

    US20180189109A1

Cited By

  • Data access method and apparatus for storage device, and electronic device and storage medium

    WO2026179125A1