WO2023116438A1 - Data access method and apparatus, and device - Google Patents

Data access method and apparatus, and device Download PDF

Info

Publication number
WO2023116438A1
WO2023116438A1 PCT/CN2022/137163 CN2022137163W WO2023116438A1 WO 2023116438 A1 WO2023116438 A1 WO 2023116438A1 CN 2022137163 W CN2022137163 W CN 2022137163W WO 2023116438 A1 WO2023116438 A1 WO 2023116438A1
Authority
WO
WIPO (PCT)
Prior art keywords
data access
access request
hard disk
priority
storage device
Prior art date
Application number
PCT/CN2022/137163
Other languages
French (fr)
Chinese (zh)
Inventor
朱晓明
玄在雄
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023116438A1 publication Critical patent/WO2023116438A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present application relates to the field of storage technologies, and in particular to a data access method, device and equipment.
  • the data access requests initiated by some important users can be prioritized. Before reaching the storage system, the data access requests sent by the user through the client device will be adjusted in order. In this way, some data access requests initiated by important users can reach the storage system first and be processed by the storage system first.
  • the storage system needs to bear different loads at different times, and the load here can indicate the data access requests that the storage device needs to process.
  • the storage system has a heavy load and needs to process a large number of data access requests, just adjusting the order in which the data access requests arrive at the storage system cannot fully guarantee the processing efficiency of these data access requests.
  • the heavy load of the storage system even if the data access requests initiated by important users reach the storage system first, these data access requests cannot be processed in time because there are no idle nodes inside the storage system.
  • the present application provides a data access method, device and equipment, so as to ensure accurate control of the processing sequence for processing data access requests.
  • the embodiment of the present application provides a data access method, the method is applied to a storage device in a storage system, in this method, the storage device can receive a setting request, and the setting request is used to set the data access request Processing priority (the processing priority may be simply referred to as priority in this embodiment of the application), the processing priority describes the processing order of the data access request.
  • the setting request may be sent by a device other than the storage system.
  • the storage device may configure a priority list based on the setting request, and the priority list records processing priorities of different data access requests. Subsequently, when the storage device receives the data access request, the storage device may process the received data access request according to the priority list.
  • the storage device internally saves in the priority list.
  • each data access request can be processed in strict accordance with the priority list in sequence.
  • the order in which requests arrive at the storage device is more accurate and can accurately control the processing order of data access requests.
  • the processing priority may be set based on one or more granularities, and this embodiment of the present application does not limit the setting granularity of the processing priority.
  • the setting granularity includes, but is not limited to: the user who initiates the data access request, the application program that initiates the data access request, and the client device that initiates the data access request.
  • the above-mentioned setting granularity is just an example. In practical applications, the setting granularity can be selected according to specific scenarios, and then the processing priority can be set.
  • the granularity of setting the processing priority is more diverse, which can ensure that the setting of the processing priority can be applied to different data access scenarios.
  • the data access request received by the storage device carries identification information
  • the identification information includes part or all of the following: identification information of an application program, identification information of a user, and identification information of a client device.
  • the information carried in the identification information is related to the setting granularity of the processing priority.
  • the data access request carries identification information, which can identify the priority of the data access request to a certain extent.
  • the storage device when the storage device processes the received data access request according to the processing priority, it may parse the received data access request and extract the identification information in the data access request. After the storage device acquires the identification information, it can determine the processing priority of the data access request from the priority list according to the identification information. The storage device adjusts the processing order of the data access requests according to the processing priority. In this way, the storage device can sequentially process data access requests according to the processing order.
  • the storage device can accurately determine the processing priority of the data access request, further ensuring that the storage device can accurately process the data access request according to the processing priority.
  • the storage device includes multiple hard disks, and when the storage device sequentially processes the data access requests according to the processing sequence, the storage device may monitor the states of the multiple hard disks.
  • the storage device can monitor the states of the multiple hard disks in real time, and select a target hard disk for the data access request according to the states of the multiple hard disks.
  • the storage device may send monitoring commands to multiple hard disks respectively, and the monitoring commands are used to request the status of the hard disks. After receiving the monitoring command, the hard disk may feed back the state of the hard disk to the storage device.
  • the storage device selects a target hard disk for the data access request according to the states of the multiple hard disks. Afterwards, the storage device places the command generated based on the data access request in the submission queue of the target hard disk.
  • the storage device can select a target hard disk for a data access request according to the state of the hard disk, so as to ensure that the data access request can be processed efficiently.
  • the storage device when it selects a target hard disk for a data access request according to the states of multiple hard disks, it can select a target hard disk that satisfies the state condition from among the multiple hard disks.
  • the state condition includes the following parts or All: The bandwidth of the hard disk is greater than the bandwidth threshold, the latency of the hard disk is smaller than the latency threshold, and the hard disk is normal.
  • the performance of the target hard disk selected based on the state condition is better, which ensures the processing efficiency of the data access request.
  • the storage device may insert the command generated based on the data access request into the front position of the submission queue of the target hard disk, Such as sorting at the position of the first N (N is a positive integer) or the position of the head of the team.
  • the command generated based on the data access request may also be placed in a submission queue with a priority greater than a threshold among multiple submission queues of the target hard disk.
  • the storage device when the storage device places the command generated based on the data access request in the submission queue of the target hard disk, it will try to ensure that the hard disk can obtain the command generated based on the data access request from the submission queue as soon as possible to ensure that the data access request be processed as quickly as possible.
  • the storage device further instructs the target hard disk to suspend background operations on the target hard disk.
  • the hard disk can centrally process the commands in the submission queue to ensure the processing efficiency of data access requests.
  • the storage device when the storage device places the command generated based on the data access request in the submission queue of the target hard disk, if the target hard disk is busy, the storage device can place the command generated based on the data access request on the target hard disk.
  • the backup disk of the target hard disk refers to the hard disk that stores the same data as the target hard disk.
  • the command generated based on the data access request is processed by the backup disk instead of the target hard disk, to a certain extent, it can ensure that the command generated based on the data access request is processed in time, and the processing efficiency of the data access request is improved.
  • the command generated by the storage device based on the data access request may include a priority identifier, where the priority identifier is used to indicate the priority of the command.
  • the target hard disk After the target hard disk obtains the command from the submission queue, it can identify the priority identifier and adjust the processing order of each command inside the hard disk. The processing order of the commands can also be adjusted inside the hard disk, which further ensures the processing efficiency of the commands.
  • the embodiment of the present application also provides a data access right device, the data access right device has the function of realizing the behavior in the method example of the first aspect above, and the beneficial effects can be referred to the description of the first aspect and will not be repeated here repeat.
  • the functions described above may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the device includes a receiving module, a processing module, and optionally a sending module and an indicating module. These modules can perform the corresponding functions in the method example of the first aspect above. For details, see Method The detailed description in the example is not repeated here.
  • the embodiment of the present application also provides a computing device, the computing device has the function of implementing the behavior in the method example of the first aspect above, and the beneficial effects can be referred to the description of the first aspect, which will not be repeated here.
  • the structure of the computing device includes a processor, a network card, and a memory, and the processor or the network card is configured to support the computing device to perform corresponding functions in the method of the first aspect above.
  • the memory coupled to the processor, holds program instructions and data necessary for the computing device.
  • the structure of the computing device also includes a communication interface for communicating with other devices, such as receiving setting requests and data access requests, sending commands based on data access requests, or sending instructions to the hard disk.
  • the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and each possibility of the first aspect.
  • the present application further provides a computer program product including instructions, which, when run on a computer, cause the computer to execute the method described in the above first aspect and each possible implementation manner of the first aspect.
  • the present application also provides a computer chip, the chip is connected to the memory, and the chip is used to read and execute the software program stored in the memory, and implement the above first aspect and each possibility of the first aspect.
  • Fig. 1 is the structural representation of the submission queue and completion queue of a kind of hard disk provided by the present application
  • Fig. 2 is a schematic structural diagram of a multi-pair submission queue and completion queue system of a hard disk provided by the present application;
  • FIG. 3 is a schematic structural diagram of a data access system provided by the present application.
  • FIG. 4 is a schematic diagram of a data access method provided by the present application.
  • FIG. 5 is a schematic diagram of a priority list provided by the present application.
  • FIG. 6 is a schematic structural diagram of a data access device provided by the present application.
  • the embodiment of the present application provides a data access method, device and device.
  • the connection between the storage device and the hard disk involved in the embodiment of the present application A brief description of the interactive mode.
  • the interaction mode between the storage device and the hard disk is described by taking the hard disk in the storage device as an example of a solid state disk supporting the NVMe protocol.
  • solid-state drives that support the NVMe protocol can be referred to as NVMe SSDs for short.
  • NVMe protocol storage devices and SSDs interact based on a series of paired submission queues and completion queues. These queues are created by the driver running on the storage device, and these queues are shared between the driver and the NVMe SSD. The queue itself can be located either in the shared memory of the storage device or in the memory of the NVMe SSD. After the driver configures the submission queue and completion queue, the driver and NVMe SSD can interact. See Figure 1, the interaction steps are as follows:
  • step 1 the driver places a new command on the submission queue.
  • the command may be a data write command for requesting to write data, or a data read command for requesting to read data.
  • Step 2 the driver notifies the NVMe controller in the NVMe SSD that there is a new command to be executed by writing the tail pointer pointing to the end of the submission queue into the doorbell register.
  • step 3 the NVMe controller obtains the command from the submission queue.
  • the NVMe controller obtains commands from the submission queue, it generally starts to extract commands from the head of the submission queue.
  • Step 4 the NVMe controller processes the command. For example, the NVMe controller writes data into the flash memory in the SSD according to the command, or reads data from the flash memory in the SSD according to the command.
  • Step 5 the NVMe controller puts an entry in the associated completion queue after completing the command. If the command is used to request data to be written, an entry placed into the completion queue will indicate the success or failure of the data write. If the command is used to request to read data, the entry put into the completion queue will carry the read data.
  • step 6 the NVMe controller uses an interrupt mechanism to prompt the driver program that the command has been completed.
  • Step 7 the driver extracts the entry from the completion queue
  • Step 8 the driver sends the updated head pointer to the NVMe controller by writing it into the doorbell register.
  • the submission queue and the completion queue mentioned in the above steps exist in pairs, that is, the submission queue and the completion queue are associated one by one.
  • the submission queue and the completion queue are used to implement data reading and writing.
  • management queues which are used to pass control commands to complete some management operations, such as creating queues, deleting queues, and updating firmware.
  • the NVMe protocol allows up to 65535 separate queues, each of which can have up to 65535 entries.
  • the number of queues can be determined based on the system configuration and expected load of the storage device. That is to say, multiple queue pairs are allowed to exist in the storage device, and a queue pair includes a submission queue and a completion queue.
  • the driver can set different priorities for different queue pairs.
  • the NVMe controller can extract commands from each submission queue according to the priority of the submission queues, and process the commands.
  • FIG. 2 is a schematic diagram of a queue pair mechanism. As shown in FIG. 2 , multiple queue pairs can be created in a storage device, and there is a one-to-one correspondence between the submission queue and the completion queue in each queue pair.
  • FIG. 3 is a schematic diagram of a data access system architecture provided by an embodiment of the present application.
  • the data access system includes an application server 100 and a storage device 200 .
  • Data interaction can be performed between the application server 100 and the storage device 200 .
  • the interaction between the application server 100 and the storage device 200 can be divided into two types. One is the interaction performed when the application server 100 sets the priority of the data access request of the storage device 200 , and the other is the interaction performed when the application server 100 accesses the data stored in the storage device 200 .
  • the priority of data access requests refers to the order in which the storage device 200 processes data access requests. Data access requests with high priority need to be processed first, and data access requests with low priority need to be delayed or processed according to the normal order. sequential processing.
  • the application server 100 can instruct the storage device 200 to set the priority of the data access request by sending a setting request to the storage device 200; ask.
  • the data access request includes a data write request for requesting to write data, and a data read request for requesting to read data.
  • the storage device 200 may set the priority of the data access request under the instruction of the application server 100, and process the data access request based on the priority.
  • the application server 100 may be a device running applications such as client software and deployed near the user side.
  • the application server 100 may also be called a client device 300 .
  • the user can trigger the application server 100 to generate a data access request or a setting request through an application program running on the application server 100 according to his own needs or the current scenario.
  • the application server 100 can also be an intermediate device between the client device 300 and the storage device 200, the intermediate device can forward the data access request from the client device 300 for accessing the data in the storage device 200, and can also Generate and send a data access request or setting request triggered by the user.
  • FIG. 3 only exemplarily shows the case where the application server 100 is an intermediate device.
  • the application server 100 may be a physical machine or a virtual machine.
  • Physical machines include, but are not limited to, desktop computers, servers, laptops, and mobile devices.
  • the storage device 200 is a device having both computing capability and storage capability, and the storage device 200 may be a server, a desktop computer, or the like.
  • the embodiment of the present application does not limit the location where the storage device 200 is deployed.
  • the storage device 200 may be deployed in the cloud, for example, in an edge data center, or in a central cloud data center.
  • the storage device 200 may receive a data access request or a setting request from the application server 100, process the data access request or a setting request, and perform corresponding operations.
  • the storage device 200 may set the priority of the data access request according to the setting request. And process data access requests based on the set priority.
  • the storage device 200 includes at least one processor 210 , a memory 220 , a network card 230 and a hard disk 240 .
  • the processor 210, the memory 220, the network card 230 and the hard disk 240 are connected through a bus.
  • the processor 210 and the memory 220 are used to provide computing resources.
  • the processor 210 is a central processing unit 210 (central processing unit, CPU).
  • FIG. 3 only shows two CPUs, and the embodiment of the present application does not limit the number of CPUs, which may be one or multiple.
  • the memory 220 refers to an internal memory directly exchanging data with the processor 210. It can read and write data at any time, and the speed is very fast. It serves as a memory for storing program instructions of an operating system or other running programs.
  • the memory 220 includes at least two types of memory, for example, the memory 220 can be a random access memory, such as a dynamic random access memory (DRAM), a storage class memory (storage class memory, SCM), or a read-only memory. Memory (read only memory, ROM).
  • the memory 220 may also include other random access memories, such as static random access memory (static random access memory, SRAM) and the like.
  • the memory 220 can also be a dual in-line memory module or a dual in-line memory module (DIMM).
  • the hard disk 240 is used to provide storage resources, such as storing data. It can be a magnetic disk or other types of storage media, such as a solid state disk 240 (SSD) or a shingled magnetic recording hard disk 240 .
  • SSD solid state disk 240
  • shingled magnetic recording hard disk 240 a solid state disk 240 (SSD) or a shingled magnetic recording hard disk 240 .
  • the network card 230 is used to communicate with the application server 100.
  • the network card 230 can receive messages from the application server 100.
  • the network card 230 has data processing functions, such as the network card 230 is an intelligent network card, the network card 230 can also perform some processing operations instead of the processor 210. .
  • the processor 210 can process the setting request and data access request inside the storage device 200, and the network card 230 only forwards the setting request and data access request to Processor 210.
  • the processor 210 invokes program instructions in the memory 220 to process the setting request.
  • the network card 230 may also analyze and process the configuration request and the data access request. In this processing manner, the configuration request and the data access request are not transmitted to the processor 210 , which can reduce the occupation of the processor 210 .
  • the network card 230 and the processor 210 may cooperate to process the request message. For example, the network card 230 may process the data access request, forward the data access request to the hard disk 240 to implement data access, and the processor 210 processes the setting request.
  • the storage device 200 can process data access requests according to priority, and the adjustment of the processing sequence of data access requests is more standardized and efficient, and can better guarantee the time delay of processing data access requests.
  • the following describes the data access method provided by the embodiment of the present application in conjunction with FIG. 4. As shown in FIG. 4, it is a data access method provided by the embodiment of the present application.
  • the method includes:
  • Step 401 the application server 100 sends a setting request to the storage device 200, and the setting request is used for requesting to set the priority of the data access request of the storage device 200.
  • the application program running on the application server 100 can be operated to trigger the application server 100 to generate a setting request, which is used to set the priority of the data access request of the storage device 200. class.
  • the application server 100 may send the setting request to the storage device 200 .
  • the priority of the data access request refers to the priority order that the storage device 200 needs to follow in processing the data access request.
  • the data access request may be generated by the client device 300 triggered by the user through an application program.
  • the video playing application can be deployed on different client devices 300 such as a user's mobile terminal, a smart home device (such as a TV), a desktop computer, and a notebook computer.
  • Applications deployed on different types of client devices 300 may be different.
  • Applications deployed on mobile terminals are different from applications deployed on laptops.
  • the user can enter the account number in the application program and log in to the video playback platform.
  • the user watches the video by clicking on the video view or text information on the video playback platform.
  • the client device 300 where the application is located will be triggered to generate a data access request.
  • the data access request requested The data of is the video that the user needs to watch. Considering the source of the data access request from different perspectives, the data access request may be considered to be initiated by the user, the application program, or the client device 300 .
  • the priority configuration granularity of the data access request can be configured according to the granularity of the user, application program, or client device 300 . That is to say, the priority of the data access request may also be set based on some or all of the user, the application program, and the client device 300 .
  • the application server 100 is allowed to set the priority of data access requests based on different granularities. Users set priorities for data access requests initiated by granular pairs.
  • the file management application program can be deployed on different client devices 300 such as a user's mobile terminal, desktop computer, and notebook computer. Applications deployed on different types of client devices 300 may be different.
  • the file management application deployed on the mobile terminal can be a personal-level file management software, which is suitable for users to manage personal and private files.
  • users who log in to the file management application through a mobile terminal are personal user.
  • the application program for file management of desktop computers deployed in a specific area may be enterprise-level file management software, which is suitable for internal personnel of the enterprise to manage internal files of the enterprise. For the enterprise, different personnel have different levels, and high-level enterprise personnel can manage files with higher confidentiality levels, or can manage a wider range of files.
  • the data access request can be considered to be initiated by the user (such as an enterprise-level user or an individual user), or it can be considered to be initiated by the application program (enterprise-level file management software or personal-level management software), and may also be initiated by users of different levels in the enterprise.
  • the user such as an enterprise-level user or an individual user
  • the application program enterprise-level file management software or personal-level management software
  • User priority can be understood as the priority configured for data access requests initiated by different users, such as high priority for important users and low priority for ordinary users.
  • Application priority can be understood as the priority configured for data access requests initiated by different applications, such as high priority for enterprise-level applications and low priority for personal-level applications.
  • Service priority can be understood as the priority configured for data access requests initiated by users of different levels. For example, high-level users are configured with high priority, low-level users are configured with low priority, and high-paying users are configured with high priority without additional payment. The configuration of fees has low priority.
  • the above configuration granularity of the priority is just an example, and the embodiment of the present application does not limit the specific expression form of the priority configuration granularity, and different priority configuration granularities may be used in different scenarios.
  • a user management module 110 is deployed in the application server 100 .
  • the user management module 110 can be understood as a software module running on the application server 100 .
  • the embodiment of the present application does not limit the presentation form of the software module.
  • the user management module 110 may be called in the form of an application programming interface (application programming interface, API), or in the form of an API of a communication protocol.
  • API application programming interface
  • the user management module 110 is used to implement priority setting.
  • the application server 100 may generate a setting request for setting priority by calling the user management module 110 , and send the setting request to the storage device 200 .
  • the user can configure the priority through the client device 300 , for example, the user can obtain high-priority permissions by paying.
  • the client device 300 may send the priority configured by the user to the application server 100 , or the application server 100 may collect the priority configured by the user on the client device 300 .
  • the application server 100 may call the user management module 110 to generate a setting request, and send the setting request to the storage device 200 .
  • the operation and maintenance personnel can also directly operate the application server 100 to configure the priority. For example, the operation and maintenance personnel can adjust the priority of different client devices 300 or the priority of different application programs.
  • the client device 300 may call the user management module 110 according to the configuration of the operation and maintenance personnel, generate a setting request, and send the setting request to the storage device 200 .
  • the application server 100 may be the client device 300, that is, the application server 100 is directly deployed on the user side, and can send a data access request when triggered by the user.
  • the application server 100 has a priority setting function.
  • the application server 100 implements the priority setting function, it can only set the priority for sending data access requests for applications deployed on the application server 100, and send data access requests for the application server 100.
  • the priority is set for the access request, or the priority is set for the data access request sent by the user who logs in the client software on the application server 100 .
  • the application server 100 may also set priorities for data access requests sent by various applications, set priorities for data access requests sent by different client devices 300 , or set priorities for data access requests sent by different users.
  • the application server 100 can be regarded as a priority management device, and the set priority is not limited to the data access request sent by itself, but can also be set for the data access right request initiated outside the application server 100. class.
  • the application server 100 is used as a priority management device as an example for description.
  • the application server 100 may only set the priority of some data access requests. For example, the application server 100 may set priorities for data access requests initiated by some applications, some client devices 300 or some users. The application server 100 can also set the priority of all data access requests. For example, the application server 100 may also set priorities for data access requests initiated by all applications, all client devices 300 or all users.
  • the application server 100 and the storage device 200 can use numerical values to represent the priority of different data access requests initiated by different applications.
  • the priorities are 1, 2, 3, 4.
  • the application server 100 and the storage device 200 can use English to represent different priorities of data access requests initiated by different users, and the priorities are Ex (extreme high priority), Ui (ultra high priority), Ge (general priority).
  • the embodiment of the present application does not limit the representation manner of the priority.
  • the setting request initiated by the application server 100 may carry an identifier for the application program, client device 300 or The user's information, and the priority of the application, client device 300 or user.
  • the information identifying the application, the client device 300 or the user may be simply referred to as identification information of the application, the client device 300 or the user.
  • the embodiment of the present application does not limit the specific type of the identification information, and any information that can uniquely identify the application program, the client device 300 or the user is applicable to the embodiment of the present application.
  • the setting request initiated by the application server 100 may carry the identification of the multiple applications, Information of multiple client devices 300 or multiple users, and priorities of the multiple applications, multiple client devices 300 or multiple users.
  • the information of the plurality of applications, the plurality of client devices 300 or the plurality of users, and the priorities of the plurality of applications, the plurality of client devices 300 or the plurality of users can be integrated into a priority list (table), so that It is parsed on the storage device 200.
  • the priority set by the application server 100 is not fixed, and in the embodiment of the present application, the application server 100 is allowed to dynamically adjust the priority of some or all data access requests.
  • the application server 100 may generate a setting request for setting priority, and the setting request includes but is not limited to:
  • a setting request for initializing the priority such as Init(priority table[user,app,level]), where user is used to indicate the user, app is used to indicate the application program, and level is used to indicate the priority, such as in numbers or English
  • the ID indicates priority.
  • a setting request for updating priority such as update(priority tabe[user,app,level]).
  • Step 402 the storage device 200 receives the setting request, and updates the priority list according to the setting request.
  • a priority list may be stored in the storage device 200, and the priority list may record the priority of the data access request. Based on the foregoing description, it can be seen that from the perspective of the source of the data access request, the priority of the data access request can be divided into priorities of different granularities, such as the priority of different users, the priority of different applications, and the priority of different client devices 300 class. The priority list can record the priorities of different granularities.
  • FIG. 5 it is an abstract schematic diagram of a priority list stored in the storage device 200 .
  • priorities are recorded at the granularity of user and application level. Based on the priority of the user and the application level, the storage device 200 may obtain the final overall priority of the data access request in a weighted summation manner.
  • the storage device 200 may update the priority list according to the information carried in the setting request. Such as deleting the user in the priority list, the priority of the client device 300 or the application program, modifying the user in the priority list, the priority of the client device 300 or the application program, or adding a new user or client in the priority list The priority of the end device 300 or application.
  • the priority list can be stored in the network card 230, so that the network card 230 can use the priority list to process the received data access request.
  • the priority list stored inside the network card 230 may be updated according to the setting request.
  • the priority list can be stored in the memory 220 .
  • the processor 210 may update the priority list in the memory 220 according to the setting request.
  • the priority list can be stored in the network card 230, so that the network card 230 can use
  • the priority list handles incoming data access requests.
  • the storage device 200 may also store the same priority list in the memory 220 . In this way, when the priority list in the network card 230 becomes invalid or damaged, the priority list stored in the memory 220 can be used to restore the priority list in the network card 230 .
  • the processor 210 may instruct the network card 230 to update the priority list in the network card 230 . If a priority list is also stored in the memory 220, the processor 210 may also request to update the priority list in the memory 220 according to the setting.
  • the storage device 200 may process the data access request based on the updated priority list. For the manner in which the storage device 200 processes the data access request, reference may be made to steps 403 to 404 .
  • Step 403 The application server 100 generates a data access request triggered by the user, and the data access request carries identification information, and the identification information includes part or all of the following: identification information of the application program, identification information of the user, and the client device 300 Identification information.
  • the application server 100 can detect the user's operation, identify the information of the user, and the information of the application program operated by the user.
  • the application server 100 When the application server 100 generates a data access request, it can be in the data Identification information is carried in the access request.
  • the application server 100 may retain the identification information carried in the data access request, and The data access request is sent to the storage device 200 , and the identification information includes application program identification information, user identification information, or client device 300 identification information.
  • the identification information carried by the application server 100 is related to the granularity of the priority of the data access request of the storage device 200.
  • the priority of the data access request of the storage device 200 is only set at the granularity of the user and the application program.
  • the application server 100 may only need to ensure that the data access request carries the identification information of the user and the identification information of the application program.
  • the priority of the data access request of the storage device 200 is only set at the granularity of the user, and the application server 100 may carry the identification information of the user in the data access request.
  • Data access requests include, but are not limited to:
  • a data read request for reading data such as Read IO(info[user,app,address,etc.]), where Read IO indicates that the data access request is a data read request, and info indicates that the data read request can
  • the information carried, the information carried in the data read request may include the information in square brackets, user is used to indicate the user, app is used to indicate the application program, and address is used to identify the address of the client device 300 .
  • a data write request for writing data such as Write IO(info[user,app,address,etc.]), where Read IO indicates that the data access request is a data write request.
  • info info[user,app,address,etc.]
  • Read IO indicates that the data access request is a data write request.
  • Step 404 the storage device 200 receives the data access request, parses the data access request, and processes the data access request based on the priority list.
  • the storage device 200 may determine the priority of the data access request according to the identification information carried in the data access request and the priority list stored inside the storage device 200 .
  • the storage device 200 may sequentially process each data access request according to the priority. For example, for a data access request with a higher priority, that is, the priority of the data access request is higher than the first threshold, the storage device 200 may preferentially process the data access request, preferentially select the hard disk 240 for processing the data access request, and instruct the hard disk 240 processes the data access request. It should be noted that the hard disk 240 does not directly process the data access request, but processes commands generated based on the data access request and placed in the submission queue of the hard disk 240 .
  • the storage device 200 may delay processing the data access request or The receive sequence processes the data access request normally.
  • the storage device 200 When the storage device 200 processes each data access request sequentially according to the order of priority, for any data access request, the storage device 200 can select the hard disk 240 for processing the data access request for the data access request, and will generate the data based on the data access request.
  • the command is placed in the submission queue of the hard disk 240 .
  • the storage device 200 may also adopt other methods to ensure the priority of data access requests.
  • the storage device 200 can monitor the status of each hard disk 240 in the storage device 200, and can obtain the status of each hard disk 240 (such as bandwidth, time delay, whether it works normally, etc.) in real time.
  • the storage device 200 may send a monitoring command to the hard disk 240, and the monitoring command is used to request the status of the hard disk 240.
  • the hard disk 240 recognizes the monitoring command and feeds back a monitoring response to the storage device 200.
  • the status of the hard disk 240 is carried in the monitoring response.
  • the storage device 200 may send a monitoring command for requesting the bandwidth of the hard disk 240 to the hard disk 240, and after receiving the monitoring command, the hard disk 240 may send the hard disk 240 The bandwidth carry is fed back to the storage device 200 in the monitoring response.
  • the storage device 200 can obtain the state of the hard disk 240 conveniently and quickly through the monitoring command, so as to ensure the real-time performance of the obtained state of the hard disk 240 .
  • the storage device 200 may preferentially process the data access request in some or all of the following manners:
  • Method 1 The storage device 200 selects the hard disk 240 whose status meets the status condition according to the status of each hard disk 240 in the storage device 200, and places the command generated based on the data access request in the submission queue of the hard disk 240.
  • the bandwidth of the hard disk 240 is greater than the bandwidth threshold, the delay of the hard disk 240 is less than the delay threshold, and the hard disk 240 is normal.
  • the storage device 200 may insert the command generated based on the data access request into the front position of the submission queue of the hard disk 240. For example, storage device 200 may insert the command at the head of the commit queue. For another example, the storage device 200 may insert the command at the end of the submission queue, but add an identifier to the command, where the identifier is used to indicate that the command is processed first.
  • Mode 3 the storage device 200 may place the command generated based on the data access request in the submission queue with a higher priority among the multiple submission queues of the hard disk 240 .
  • the storage device 200 may instruct the hard disk 240 to suspend some or all background operations of the hard disk 240 .
  • Background operations refer to operations other than data reading and writing in the hard disk 240 .
  • Background operations include but are not limited to garbage collection, background inspection, data rereading, wear leveling, etc.
  • the storage device 200 may place the command in the submission queue of the backup disk of the hard disk 240 .
  • the backup disk of the hard disk 240 refers to the hard disk 240 that stores the same data as the hard disk 240 .
  • the storage device 200 adds a priority identifier to the command generated based on the data access request, where the priority identifier is used to identify the priority of the command.
  • the priority identifier may be determined based on the priority of the data access request.
  • the priority identification is identifiable by the hard disk 240, that is to say, when the hard disk 240 obtains each command that needs to be processed from the submission queue, the hard disk 240 can identify the priority identification carried in the command, and according to the priority carried in the command Level IDs process the commands in the submission queue sequentially.
  • the storage device 200 may only add priority identifiers to some commands. For example, for a data access request with the highest priority or a priority greater than a set value, the storage device 200 may add a priority identifier to a command generated based on the data access request. Add the priority mark in . For example, for the data access requests of the first priority and the second priority, the storage device may add a priority identifier to the command generated based on the data access request of the first priority, so as to indicate that the priority of the command is First. The storage device may add a priority identifier to a command generated based on the data access request of the second priority, to identify that the priority of the command is second.
  • the processing sequence of the command can be advanced, and the command with the first priority is processed first, and then the command with the second priority is processed. Commands without priority flags are processed later.
  • the storage device 200 side may be pre-configured with command formats of different priorities, that is to say, different priorities have different command formats.
  • the storage device 200 may generate commands with corresponding priorities according to the priorities of the data access requests.
  • the storage device 200 places different commands in the submission queue of the hard disk 240, and the hard disk 240 obtains commands from the submission queue, identifies the priority of each command according to the format of the command, and processes each command according to the priority.
  • the embodiment of the present application also provides a data access device, the data access device is used to execute the method performed by the storage device in the method embodiment as shown in Figure 4 above, and the related features Reference may be made to the foregoing method embodiments, and details are not repeated here.
  • the data access device 600 includes a receiving module 601 and a processing module 602 .
  • the receiving module 601 is configured to receive a setting request, where the setting request is used to set the processing priority of the data access request, and the processing priority describes the processing order of the data access request.
  • the processing module 602 is configured to configure a priority list based on the setting request, and the priority list records the processing priorities of different data access requests; process the received data access requests according to the processing priorities.
  • the processing priority is set based on some or all of the following granularities: the user initiating the data access request, the application program initiating the data access request, and the client device initiating the data access request.
  • the data access request carries identification information
  • the identification information includes part or all of the following: identification information of an application program, identification information of a user, and identification information of a client device.
  • the processing module 602 may parse the received data access request and extract the identification information in the data access request.
  • the processing module 602 determines the processing priority of the data access request from the priority list according to the identification information.
  • the processing module 602 adjusts the processing sequence of the data access requests according to the processing priority; and processes the data access requests sequentially according to the processing sequence.
  • the storage device includes a plurality of hard disks, and the device further includes a sending module 603, and the sending module 603 can send a monitoring command to the plurality of hard disks respectively, and the monitoring command is used to request the status of the hard disk.
  • the receiving module 601 may acquire the states of the multiple hard disks fed back by the multiple hard disks.
  • the processing module 602 processes the data access requests sequentially according to the processing order, it can select a target hard disk for the data access request according to the status of multiple hard disks; and then place the command generated based on the data access request in the submission queue of the target hard disk.
  • the processing module 602 when the processing module 602 selects a target hard disk for a data access request according to the states of multiple hard disks, it can select a target hard disk that meets the state conditions according to the states of the multiple hard disks.
  • the state conditions include the following parts Or all: The bandwidth of the hard disk is greater than the bandwidth threshold, the latency of the hard disk is smaller than the latency threshold, and the hard disk is normal.
  • the processing module 602 may insert the command generated based on the data access request into the front row of the submission queue of the target hard disk.
  • Position such as inserting to the head of the queue, can also place the command generated based on the data access request in the submission queue with a priority greater than the threshold among the multiple submission queues of the target hard disk.
  • the device further includes an instruction module 604, where the instruction module 604 may instruct the target hard disk to suspend background operations on the target hard disk.
  • the processing module 602 when the processing module 602 places the command generated based on the data access request in the submission queue of the target hard disk, it may place the command generated based on the data access request in the submission queue of the backup disk of the target hard disk
  • the backup disk of the target hard disk refers to the hard disk that saves the same data as the target hard disk.
  • the command generated based on the data access request includes a priority identifier, where the priority identifier is used to indicate the priority of the command.
  • each functional module in the embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • the above-mentioned embodiments may be implemented in whole or in part by software, hardware, firmware or other arbitrary combinations.
  • the above-described embodiments may be implemented in whole or in part in the form of computer program products.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on the computer, the processes or functions according to the embodiments of the present invention will be generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more sets of available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media.
  • the semiconductor medium may be a solid state drive (SSD).
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Abstract

A data access method and apparatus, and a device. In the present application, a storage device receives a setting request sent by a device other than a storage system; the setting request is used for setting processing priorities of data access requests; the processing priorities describe the sequence in which the data access requests are processed; the storage device configures a priority list on the basis of the setting request; and when the storage device receives the data access requests, the storage device processes the received data access requests according to the priority list. A priority list is stored inside a storage device, and data access requests are sequentially processed according to the priority list when processing the data access requests, such that the sequence in which the data access requests are processed can be accurately controlled.

Description

一种数据访问方法、装置以及设备A data access method, device and equipment
本申请要求于2021年12月21日提交的申请号为202111574333.1、发明名称为“访问存储设备的方法及存储系统”的中国专利申请的优先权,以及于2022年2月18日提交中国专利局、申请号为202210151597.4、申请名称为“一种数据访问方法、装置以及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111574333.1 and the title of the invention "Method and Storage System for Accessing Storage Devices" filed on December 21, 2021, and submitted to the China Patent Office on February 18, 2022 , application number 202210151597.4, and application title "A Data Access Method, Device, and Equipment" is the priority of the Chinese patent application, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请涉及存储技术领域,尤其涉及一种数据访问方法、装置以及设备。The present application relates to the field of storage technologies, and in particular to a data access method, device and equipment.
背景技术Background technique
目前,为了保证存储系统仍能够高效的处理来自用户的数据访问请求,保证一些重要用户发起的数据访问请求可以被优先处理。用户通过客户端设备发送的数据访问请求在到达存储系统之前,会被调整顺序。这样,一些由重要用户发起的数据访问请求能够优先到达存储系统,能够优先被存储系统处理。At present, in order to ensure that the storage system can still efficiently process data access requests from users, the data access requests initiated by some important users can be prioritized. Before reaching the storage system, the data access requests sent by the user through the client device will be adjusted in order. In this way, some data access requests initiated by important users can reach the storage system first and be processed by the storage system first.
但在实际场景中,存储系统在不同时间所需承担的负载不同,这里的负载可以指示存储设备所需处理的数据访问请求。尤其是在存储系统负载较大,需要处理大量的数据访问请求时,仅是通过调整数据访问请求到达存储系统的顺序,并不能完全保证这些数据访问请求的处理效率。往往由于存储系统负载较大,即便由重要用户发起的数据访问请求优先到达了存储系统,在存储系统内部,由于存储系统内部的无空闲的节点,使得这些数据访问请求也无法及时被处理。However, in actual scenarios, the storage system needs to bear different loads at different times, and the load here can indicate the data access requests that the storage device needs to process. Especially when the storage system has a heavy load and needs to process a large number of data access requests, just adjusting the order in which the data access requests arrive at the storage system cannot fully guarantee the processing efficiency of these data access requests. Often due to the heavy load of the storage system, even if the data access requests initiated by important users reach the storage system first, these data access requests cannot be processed in time because there are no idle nodes inside the storage system.
发明内容Contents of the invention
本申请提供一种数据访问方法、装置以及设备,用以保证准确控制处理数据访问请求的处理顺序。The present application provides a data access method, device and equipment, so as to ensure accurate control of the processing sequence for processing data access requests.
第一方面,本申请实施例提供了一种数据访问方法,所述方法应用于存储系统中的存储设备,在该方法中,存储设备可以接收设置请求,该设置请求用于设置数据访问请求的处理优先级(在本申请实施例中处理优先级可以简称为优先级),处理优先级描述了对数据访问请求的处理次序。该设置请求可以时由存储系统之外的设备发送的。存储设备在接收到设置请求之后,可以基于设置请求配置优先级列表,优先级列表记录了不同数据访问请求的处理优先级。后续,当存储设备接收到数据访问请求时,存储设备可以按照优先级列表处理接收到的数据访问请求。In the first aspect, the embodiment of the present application provides a data access method, the method is applied to a storage device in a storage system, in this method, the storage device can receive a setting request, and the setting request is used to set the data access request Processing priority (the processing priority may be simply referred to as priority in this embodiment of the application), the processing priority describes the processing order of the data access request. The setting request may be sent by a device other than the storage system. After receiving the setting request, the storage device may configure a priority list based on the setting request, and the priority list records processing priorities of different data access requests. Subsequently, when the storage device receives the data access request, the storage device may process the received data access request according to the priority list.
通过上述方法,存储设备内部保存在优先级列表,在处理数据访问请求时,能够严格的按照该优先级列表依次处理各个数据访问请求,相比于仅是依靠存储系统之外的设备调整数据访问请求到达存储设备的次序的方式,该方式的准确程度更好,能够准确的控制数据访问请求的处理顺序。Through the above method, the storage device internally saves in the priority list. When processing data access requests, each data access request can be processed in strict accordance with the priority list in sequence. Compared with only relying on devices other than the storage system to adjust data access The order in which requests arrive at the storage device is more accurate and can accurately control the processing order of data access requests.
在一种可能的实施方式中,处理优先级可以基于一个或多个粒度设置,本申请实施例并不限定处理优先级的设置粒度。该设置粒度包括但不限于:发起数据访问请求的用户、发起 数据访问请求的应用程序、发起数据访问请求的客户端设备。上述设定粒度仅是举例,在实际应用中,可以根据具体场景选择设置粒度,进而设置处理优先级。In a possible implementation manner, the processing priority may be set based on one or more granularities, and this embodiment of the present application does not limit the setting granularity of the processing priority. The setting granularity includes, but is not limited to: the user who initiates the data access request, the application program that initiates the data access request, and the client device that initiates the data access request. The above-mentioned setting granularity is just an example. In practical applications, the setting granularity can be selected according to specific scenarios, and then the processing priority can be set.
通过上述方法,处理优先级的设置粒度较为多样,可以保证处理优先级的设置能够适用于不同的数据访问场景。Through the above method, the granularity of setting the processing priority is more diverse, which can ensure that the setting of the processing priority can be applied to different data access scenarios.
在一种可能的实施方式中,存储设备接收到数据访问请求中携带有标识信息,标识信息包括下列的部分或全部:应用程序的标识信息、用户的标识信息、客户端设备的标识信息。该标识信息中携带的信息与处理优先级的设置粒度有关。In a possible implementation manner, the data access request received by the storage device carries identification information, and the identification information includes part or all of the following: identification information of an application program, identification information of a user, and identification information of a client device. The information carried in the identification information is related to the setting granularity of the processing priority.
通过上述方法,数据访问请求携带有标识信息,能够在一定程度上标识该数据访问请求的优先级。Through the above method, the data access request carries identification information, which can identify the priority of the data access request to a certain extent.
在一种可能的实施方式中,存储设备在按照处理优先级处理接收到的数据访问请求时,可以解析接收到的数据访问请求,提取数据访问请求中的标识信息。存储设备在获取该标识信息后,可以根据该标识信息从优先级列表中确定数据访问请求的处理优先级。存储设备根据该处理优先级调整数据访问请求的处理次序。这样,存储设备可以按照处理次序依次处理数据访问请求。In a possible implementation manner, when the storage device processes the received data access request according to the processing priority, it may parse the received data access request and extract the identification information in the data access request. After the storage device acquires the identification information, it can determine the processing priority of the data access request from the priority list according to the identification information. The storage device adjusts the processing order of the data access requests according to the processing priority. In this way, the storage device can sequentially process data access requests according to the processing order.
通过上述方法,由于数据访问请求中携带了标识信息,使得存储设备能够准确的确定出数据访问请求的处理优先级,进一步保证存储设备可以准确的按照处理优先级来处理数据访问请求。Through the above method, since the identification information is carried in the data access request, the storage device can accurately determine the processing priority of the data access request, further ensuring that the storage device can accurately process the data access request according to the processing priority.
在一种可能的实施方式中,存储设备包括多个硬盘,存储设备按照处理次序依次处理数据访问请求时,存储设备可以监控多个硬盘的状态。存储设备可以实时监控该多个硬盘的状态,根据多个硬盘的状态为数据访问请求选择目标硬盘。存储设备可以向多个硬盘分别发送监控命令,监控命令用于请求硬盘的状态。硬盘在接收到该监控命令后,可以向存储设备反馈硬盘的状态。存储设备在获取多个硬盘反馈的所述多个硬盘的状态后,根据多个硬盘的状态为数据访问请求选择目标硬盘。之后,存储设备将基于数据访问请求产生的命令放置在目标硬盘的提交队列中。In a possible implementation manner, the storage device includes multiple hard disks, and when the storage device sequentially processes the data access requests according to the processing sequence, the storage device may monitor the states of the multiple hard disks. The storage device can monitor the states of the multiple hard disks in real time, and select a target hard disk for the data access request according to the states of the multiple hard disks. The storage device may send monitoring commands to multiple hard disks respectively, and the monitoring commands are used to request the status of the hard disks. After receiving the monitoring command, the hard disk may feed back the state of the hard disk to the storage device. After acquiring the states of the multiple hard disks fed back by the multiple hard disks, the storage device selects a target hard disk for the data access request according to the states of the multiple hard disks. Afterwards, the storage device places the command generated based on the data access request in the submission queue of the target hard disk.
通过上述方法,存储设备可以根据硬盘的状态,对数据访问请求选择目标硬盘,保证该数据访问请求可以被高效处理。Through the above method, the storage device can select a target hard disk for a data access request according to the state of the hard disk, so as to ensure that the data access request can be processed efficiently.
在一种可能的实施方式中,存储设备在根据多个硬盘的状态为数据访问请求选择目标硬盘时,可以根据多个硬盘的状态从中选择满足状态条件的目标硬盘,状态条件包括下列的部分或全部:硬盘的带宽大于带宽阈值、硬盘的时延小于时延阈值、硬盘正常。In a possible implementation manner, when the storage device selects a target hard disk for a data access request according to the states of multiple hard disks, it can select a target hard disk that satisfies the state condition from among the multiple hard disks. The state condition includes the following parts or All: The bandwidth of the hard disk is greater than the bandwidth threshold, the latency of the hard disk is smaller than the latency threshold, and the hard disk is normal.
通过上述方法,基于状态条件选择的目标硬盘的性能更佳,保证了数据访问请求的处理效率。Through the above method, the performance of the target hard disk selected based on the state condition is better, which ensures the processing efficiency of the data access request.
在一种可能的实施方式中,存储设备在将基于数据访问请求产生的命令放置在目标硬盘的提交队列中,可以将基于数据访问请求产生的命令插入到目标硬盘的提交队列靠前的位置,如排序在前N(N为正整数)的位置处或队首的位置。也可以将基于数据访问请求产生的命令放置在目标硬盘的多个提交队列中优先级大于阈值的提交队列中。In a possible implementation manner, after the storage device places the command generated based on the data access request in the submission queue of the target hard disk, it may insert the command generated based on the data access request into the front position of the submission queue of the target hard disk, Such as sorting at the position of the first N (N is a positive integer) or the position of the head of the team. The command generated based on the data access request may also be placed in a submission queue with a priority greater than a threshold among multiple submission queues of the target hard disk.
通过上述方法,存储设备在将基于数据访问请求产生的命令放置在目标硬盘的提交队列时,会尽量保证硬盘能够尽快从提交队列中获取该基于数据访问请求产生的命令,以保证该数据访问请求能够尽快被处理。Through the above method, when the storage device places the command generated based on the data access request in the submission queue of the target hard disk, it will try to ensure that the hard disk can obtain the command generated based on the data access request from the submission queue as soon as possible to ensure that the data access request be processed as quickly as possible.
在一种可能的实施方式中,存储设备还指示目标硬盘暂停目标硬盘中的后台操作。这样硬盘可以集中处理提交队列中的命令,保证数据访问请求的处理效率。In a possible implementation manner, the storage device further instructs the target hard disk to suspend background operations on the target hard disk. In this way, the hard disk can centrally process the commands in the submission queue to ensure the processing efficiency of data access requests.
在一种可能的实施方式中,存储设备将基于数据访问请求产生的命令放置在目标硬盘的提交队列时,若目标硬盘处于忙碌状态,存储设备可以将基于数据访问请求产生的命令放置在目标硬盘的备份盘的提交队列中,目标硬盘的备份盘是指与目标硬盘保存有相同数据的硬盘。In a possible implementation manner, when the storage device places the command generated based on the data access request in the submission queue of the target hard disk, if the target hard disk is busy, the storage device can place the command generated based on the data access request on the target hard disk. In the submission queue of the backup disk, the backup disk of the target hard disk refers to the hard disk that stores the same data as the target hard disk.
通过上述方法,由备份盘代替目标硬盘处理该基于数据访问请求产生的命令,在一定程度上,能够保证该基于数据访问请求产生的命令被及时处理,提高数据访问请求的处理效率。Through the above method, the command generated based on the data access request is processed by the backup disk instead of the target hard disk, to a certain extent, it can ensure that the command generated based on the data access request is processed in time, and the processing efficiency of the data access request is improved.
在一种可能的实施方式中,存储设备基于数据访问请求产生的命令中可以包括优先级标识,优先级标识用于指示命令的优先级。当目标硬盘从提交队列中获取该命令后,可以识别该优先级标识,调整硬盘内部各个命令的处理顺序。硬盘内部也能够进行对命令的处理顺序进行调整,进一步保证了该命令的处理效率。In a possible implementation manner, the command generated by the storage device based on the data access request may include a priority identifier, where the priority identifier is used to indicate the priority of the command. After the target hard disk obtains the command from the submission queue, it can identify the priority identifier and adjust the processing order of each command inside the hard disk. The processing order of the commands can also be adjusted inside the hard disk, which further ensures the processing efficiency of the commands.
第二方面,本申请实施例还提供了一种数据访问权装置,该数据访问权装置具有实现上述第一方面的方法实例中行为的功能,有益效果可以参见第一方面的描述此处不再赘述。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。在一个可能的设计中,所述装置的结构中包括接收模块、处理模块,可选的,还包括发送模块、指示模块,这些模块可以执行上述第一方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In the second aspect, the embodiment of the present application also provides a data access right device, the data access right device has the function of realizing the behavior in the method example of the first aspect above, and the beneficial effects can be referred to the description of the first aspect and will not be repeated here repeat. The functions described above may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions. In a possible design, the structure of the device includes a receiving module, a processing module, and optionally a sending module and an indicating module. These modules can perform the corresponding functions in the method example of the first aspect above. For details, see Method The detailed description in the example is not repeated here.
第三方面,本申请实施例还提供了一种计算设备,该计算设备具有实现上述第一方面的方法实例中行为的功能,有益效果可以参见第一方面的描述此处不再赘述。所述计算设备的结构中包括处理器、网卡和存储器,所述处理器或网卡被配置为支持所述计算设备执行上述第一方面方法中相应的功能。所述存储器与所述处理器耦合,其保存所述计算设备必要的程序指令和数据。所述计算设备的结构中还包括通信接口,用于与其他设备进行通信,如可以接收设置请求、数据访问请求,发送基于数据访问请求产生的命令或向硬盘发送指示等。In the third aspect, the embodiment of the present application also provides a computing device, the computing device has the function of implementing the behavior in the method example of the first aspect above, and the beneficial effects can be referred to the description of the first aspect, which will not be repeated here. The structure of the computing device includes a processor, a network card, and a memory, and the processor or the network card is configured to support the computing device to perform corresponding functions in the method of the first aspect above. The memory, coupled to the processor, holds program instructions and data necessary for the computing device. The structure of the computing device also includes a communication interface for communicating with other devices, such as receiving setting requests and data access requests, sending commands based on data access requests, or sending instructions to the hard disk.
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面以及第一方面的各个可能的实施方式中所述的方法。In a fourth aspect, the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and each possibility of the first aspect. The method described in the implementation of .
第五方面,本申请还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面以及第一方面的各个可能的实施方式中所述的方法。In a fifth aspect, the present application further provides a computer program product including instructions, which, when run on a computer, cause the computer to execute the method described in the above first aspect and each possible implementation manner of the first aspect.
第六方面,本申请还提供一种计算机芯片,所述芯片与存储器相连,所述芯片用于读取并执行所述存储器中存储的软件程序,执行上述第一方面以及第一方面的各个可能的实施方式中所述的方法。In the sixth aspect, the present application also provides a computer chip, the chip is connected to the memory, and the chip is used to read and execute the software program stored in the memory, and implement the above first aspect and each possibility of the first aspect. The method described in the implementation of .
附图说明Description of drawings
图1为本申请提供的一种硬盘的提交队列以及完成队列的结构示意图;Fig. 1 is the structural representation of the submission queue and completion queue of a kind of hard disk provided by the present application;
图2为本申请提供的一种硬盘的多对提交队列以及完成队列系统的结构示意图;Fig. 2 is a schematic structural diagram of a multi-pair submission queue and completion queue system of a hard disk provided by the present application;
图3为本申请提供的一种数据访问系统的结构示意图;FIG. 3 is a schematic structural diagram of a data access system provided by the present application;
图4为本申请提供的一种数据访问方法的示意图;FIG. 4 is a schematic diagram of a data access method provided by the present application;
图5为本申请提供的一种优先级列表的示意图;FIG. 5 is a schematic diagram of a priority list provided by the present application;
图6为本申请提供的一种数据访问装置的结构示意图。FIG. 6 is a schematic structural diagram of a data access device provided by the present application.
具体实施方式Detailed ways
本申请实施例提供了一种数据访问方法、装置以及设备,在对本申请实施例提供的一种数据访问方法、系统以及设备介绍之前,先对本申请实施例所涉及的存储设备与硬盘之间的交互方式进行简单说明。The embodiment of the present application provides a data access method, device and device. Before introducing the data access method, system and device provided in the embodiment of the present application, the connection between the storage device and the hard disk involved in the embodiment of the present application A brief description of the interactive mode.
这里以存储设备中的硬盘为支持NVMe协议的固态硬盘为例对存储设备与硬盘之间的交互方式进行说明。其中,支持NVMe协议的固态硬盘可以简称为NVMe SSD。Here, the interaction mode between the storage device and the hard disk is described by taking the hard disk in the storage device as an example of a solid state disk supporting the NVMe protocol. Among them, solid-state drives that support the NVMe protocol can be referred to as NVMe SSDs for short.
在NVMe协议中,存储设备和SSD之间基于一系列成对的提交队列、完成队列实现交互。这些队列由运行在存储设备的驱动程序创建,这些队列在驱动程序和NVMe SSD之间共享。队列本身既可以位于存储设备的共享内存中,也可以位于NVMe SSD的内存中。驱动程序在配置提交队列和完成队列后,驱动程序和NVMe SSD之间可以进行交互。参见图1,交互步骤如下:In the NVMe protocol, storage devices and SSDs interact based on a series of paired submission queues and completion queues. These queues are created by the driver running on the storage device, and these queues are shared between the driver and the NVMe SSD. The queue itself can be located either in the shared memory of the storage device or in the memory of the NVMe SSD. After the driver configures the submission queue and completion queue, the driver and NVMe SSD can interact. See Figure 1, the interaction steps are as follows:
步骤1,驱动程序将一条新的命令放置在提交队列上。该命令可以为用于请求写入数据的数据写入命令,也可以为用于请求读取数据的数据读取命令。In step 1, the driver places a new command on the submission queue. The command may be a data write command for requesting to write data, or a data read command for requesting to read data.
步骤2,驱动程序通过将指向该提交队列的队尾的尾部指针写入门铃寄存器来通知NVMe SSD中的NVMe控制器有新命令待执行。 Step 2, the driver notifies the NVMe controller in the NVMe SSD that there is a new command to be executed by writing the tail pointer pointing to the end of the submission queue into the doorbell register.
步骤3,NVMe控制器从提交队列中获取该命令。NVMe控制器从提交队列获取命令时一般是从提交队列的队首开始提取。In step 3, the NVMe controller obtains the command from the submission queue. When the NVMe controller obtains commands from the submission queue, it generally starts to extract commands from the head of the submission queue.
步骤4,NVMe控制器处理该命令。如NVMe控制器根据该命令将数据写入到SSD中的闪存中,或根据该命令从SSD内的闪存中读取数据。 Step 4, the NVMe controller processes the command. For example, the NVMe controller writes data into the flash memory in the SSD according to the command, or reads data from the flash memory in the SSD according to the command.
步骤5,NVMe控制器在完成该命令后,将一个条目放入关联的完成队列中。若该命令用于请求写入数据,放入到完成队列的条目会指示数据写入成功或失败。若该命令用于请求读取数据,放入到完成队列的条目会携带读取的数据。Step 5, the NVMe controller puts an entry in the associated completion queue after completing the command. If the command is used to request data to be written, an entry placed into the completion queue will indicate the success or failure of the data write. If the command is used to request to read data, the entry put into the completion queue will carry the read data.
步骤6,NVMe控制器采用中断机制提示驱动程序,已完成该命令。In step 6, the NVMe controller uses an interrupt mechanism to prompt the driver program that the command has been completed.
步骤7,驱动程序从完成队列中提取条目; Step 7, the driver extracts the entry from the completion queue;
步骤8,驱动程序通过将完成队列更新后的头部指针写入门铃寄存器,将其发送给NVMe控制器。Step 8, the driver sends the updated head pointer to the NVMe controller by writing it into the doorbell register.
上述步骤中提及的提交队列以及完成队列是成对存在的,也即提交队列和完成队列是一一关联的。提交队列以及完成队列用于实现数据读取以及写入。除了提交队列以及完成队列,还存在一组管理队列,该组管理队列用于传递控制命令,以完成一些管理操作,如创建队列、删除队列、更新固件等。The submission queue and the completion queue mentioned in the above steps exist in pairs, that is, the submission queue and the completion queue are associated one by one. The submission queue and the completion queue are used to implement data reading and writing. In addition to the submission queue and the completion queue, there is also a group of management queues, which are used to pass control commands to complete some management operations, such as creating queues, deleting queues, and updating firmware.
NVMe协议最多允许65535个单独的队列,每个队列最多可以有65535个条目。实际应用中,队列的数量可以基于存储设备的系统配置和预期负载来决定的。也就是说,允许在存储设备中存在多个队列对,一个队列对中包括一个提交队列和一个完成队列。驱动程序可以为不同的队列对可以设置不同的优先级。这样,NVMe控制器可以按照提交队列的优先级从各个提交队列中提取命令,处理命令。图2是一种队列对机制的示意图,如图2所示,在存储设备中可以创建多个队列对,每个队列对中的提交队列和完成队列之间具有一一对应的关系。The NVMe protocol allows up to 65535 separate queues, each of which can have up to 65535 entries. In practical applications, the number of queues can be determined based on the system configuration and expected load of the storage device. That is to say, multiple queue pairs are allowed to exist in the storage device, and a queue pair includes a submission queue and a completion queue. The driver can set different priorities for different queue pairs. In this way, the NVMe controller can extract commands from each submission queue according to the priority of the submission queues, and process the commands. FIG. 2 is a schematic diagram of a queue pair mechanism. As shown in FIG. 2 , multiple queue pairs can be created in a storage device, and there is a one-to-one correspondence between the submission queue and the completion queue in each queue pair.
如图3所示为本申请实施例提供的一种数据访问系统架构示意图,该数据访问系统包括应用服务器100以及存储设备200。FIG. 3 is a schematic diagram of a data access system architecture provided by an embodiment of the present application. The data access system includes an application server 100 and a storage device 200 .
应用服务器100与存储设备200之间可以进行数据交互。在本申请实施例中,应用服务器100与存储设备200之间的交互可以分为两种。一种是应用服务器100设置存储设备200 数据访问请求的优先级时所进行的交互,另一种为应用服务器100在访问存储设备200中存储的数据时所进行的交互。在本申请实施例中数据访问请求的优先级是指存储设备200处理数据访问请求的先后顺序,优先级高的数据访问请求需要优先处理,优先级低的数据访问请求需要延后处理或按照正常顺序处理。Data interaction can be performed between the application server 100 and the storage device 200 . In the embodiment of the present application, the interaction between the application server 100 and the storage device 200 can be divided into two types. One is the interaction performed when the application server 100 sets the priority of the data access request of the storage device 200 , and the other is the interaction performed when the application server 100 accesses the data stored in the storage device 200 . In this embodiment of the application, the priority of data access requests refers to the order in which the storage device 200 processes data access requests. Data access requests with high priority need to be processed first, and data access requests with low priority need to be delayed or processed according to the normal order. sequential processing.
从功能上,应用服务器100能够通过向存储设备200发送设置请求,以指示存储设备200设置数据访问请求的优先级;还能够在需要访问存储设备200中的数据,向存储设备200的发送数据访问请求。该数据访问请求包括用于请求写入数据的数据写入请求,以及用于请求读取数据的数据读取请求。Functionally, the application server 100 can instruct the storage device 200 to set the priority of the data access request by sending a setting request to the storage device 200; ask. The data access request includes a data write request for requesting to write data, and a data read request for requesting to read data.
存储设备200可以在应用服务器100的指示下设置数据访问请求的优先级,并基于该优先级处理数据访问请求。The storage device 200 may set the priority of the data access request under the instruction of the application server 100, and process the data access request based on the priority.
从部署位置以及硬件结构上,该应用服务器100可以是部署在靠近用户侧的运行有客户端软件等应用程序的设备,在这种情况下,应用服务器100也可以称为客户端设备300。用户可以根据自身需求或当前场景通过应用服务器100上运行的应用程序,触发应用服务器100生成数据访问请求或设置请求。In terms of deployment location and hardware structure, the application server 100 may be a device running applications such as client software and deployed near the user side. In this case, the application server 100 may also be called a client device 300 . The user can trigger the application server 100 to generate a data access request or a setting request through an application program running on the application server 100 according to his own needs or the current scenario.
该应用服务器100也可以为介于客户端设备300以及存储设备200之间的中间设备,该中间设备能够转发来自客户端设备300的用于访问存储设备200中数据的数据访问请求,还可以在用户的触发下生成并发送数据访问请求或设置请求。图3中仅示例性的展示应用服务器100为中间设备的情况。The application server 100 can also be an intermediate device between the client device 300 and the storage device 200, the intermediate device can forward the data access request from the client device 300 for accessing the data in the storage device 200, and can also Generate and send a data access request or setting request triggered by the user. FIG. 3 only exemplarily shows the case where the application server 100 is an intermediate device.
该应用服务器100可以是物理机,也可以是虚拟机。物机包括但不限于桌面电脑、服务器、笔记本电脑以及移动设备。The application server 100 may be a physical machine or a virtual machine. Physical machines include, but are not limited to, desktop computers, servers, laptops, and mobile devices.
在本申请实施例中,存储设备200是一种既具有计算能力又具有存储能力的设备,存储设备200可以为服务器、台式计算机等。本申请实施例并不限定存储设备200部署的位置。该存储设备200可以部署在云端,如部署在边缘数据中心,还可以部署在中心云数据中心。In the embodiment of the present application, the storage device 200 is a device having both computing capability and storage capability, and the storage device 200 may be a server, a desktop computer, or the like. The embodiment of the present application does not limit the location where the storage device 200 is deployed. The storage device 200 may be deployed in the cloud, for example, in an edge data center, or in a central cloud data center.
存储设备200可以接收来自应用服务器100的数据访问请求或设置请求,并处理数据访问请求或设置请求,执行相应的操作。存储设备200可以根据设置请求设置数据访问请求的优先级。并基于所设置的优先级处理数据访问请求。The storage device 200 may receive a data access request or a setting request from the application server 100, process the data access request or a setting request, and perform corresponding operations. The storage device 200 may set the priority of the data access request according to the setting request. And process data access requests based on the set priority.
在硬件上,如图3所示,存储设备200包括至少一个处理器210、内存220、网卡230和硬盘240。处理器210、内存220、网卡230和硬盘240之间通过总线连接。其中,处理器210和内存220用于提供计算资源。具体地,处理器210是一个中央处理器210(central processing unit,CPU)。图3中仅示出了两个CPU,本申请实施例并不限定CPU的数量,可以为一个也可以为多个。In terms of hardware, as shown in FIG. 3 , the storage device 200 includes at least one processor 210 , a memory 220 , a network card 230 and a hard disk 240 . The processor 210, the memory 220, the network card 230 and the hard disk 240 are connected through a bus. Wherein, the processor 210 and the memory 220 are used to provide computing resources. Specifically, the processor 210 is a central processing unit 210 (central processing unit, CPU). FIG. 3 only shows two CPUs, and the embodiment of the present application does not limit the number of CPUs, which may be one or multiple.
内存220是指与处理器210直接交换数据的内部存储器,它可以随时读写数据,而且速度很快,作为存储操作系统或其他正在运行中的程序的程序指令的存储器。内存220包括至少两种存储器,例如内存220既可以是随机存取存储器,如动态随机存取存储器(dynamic random access memory,DRAM)、存储级存储器(storage class memory,SCM),也可以是只读存储器(read only memory,ROM)。内存220还可以包括其他随机存取存储器,例如静态随机存取存储器(static random access memory,SRAM)等。内存220还可以是双列直插式存储器模块或双线存储器模块(dual in-line memory module,DIMM)。The memory 220 refers to an internal memory directly exchanging data with the processor 210. It can read and write data at any time, and the speed is very fast. It serves as a memory for storing program instructions of an operating system or other running programs. The memory 220 includes at least two types of memory, for example, the memory 220 can be a random access memory, such as a dynamic random access memory (DRAM), a storage class memory (storage class memory, SCM), or a read-only memory. Memory (read only memory, ROM). The memory 220 may also include other random access memories, such as static random access memory (static random access memory, SRAM) and the like. The memory 220 can also be a dual in-line memory module or a dual in-line memory module (DIMM).
硬盘240用于提供存储资源,例如存储数据。它可以是磁盘或者其他类型的存储介质,例如固态硬盘240(SSD)或者叠瓦式磁记录硬盘240等。The hard disk 240 is used to provide storage resources, such as storing data. It can be a magnetic disk or other types of storage media, such as a solid state disk 240 (SSD) or a shingled magnetic recording hard disk 240 .
网卡230用于与应用服务器100通信,网卡230可以接收来自应用服务器100的消息,当网卡230具备数据处理功能时,如该网卡230为智能网卡,网卡230也可以代替处理器210执行一些处理操作。The network card 230 is used to communicate with the application server 100. The network card 230 can receive messages from the application server 100. When the network card 230 has data processing functions, such as the network card 230 is an intelligent network card, the network card 230 can also perform some processing operations instead of the processor 210. .
在本申请实施例中对于来自应用服务器100的设置请求以及数据访问请求,存储设备200内部可以由处理器210处理该设置请求以及数据访问请求,网卡230仅是将设置请求以及数据访问请求转发给处理器210。在这种处理方式中,处理器210调用内存220中程序指令对设置请求进行处理。存储设备200内部也可以由网卡230解析并处理设置请求以及数据访问请求。这种处理方式中,设置请求以及数据访问请求不会传输至处理器210,能够减少对处理器210的占用。存储设备200内部也可以由网卡230和处理器210配合处理请求消息。例如,网卡230可以处理数据访问请求,将数据访问请求转发给硬盘240,以实现数据访问,由处理器210处理设置请求。In the embodiment of this application, for the setting request and data access request from the application server 100, the processor 210 can process the setting request and data access request inside the storage device 200, and the network card 230 only forwards the setting request and data access request to Processor 210. In this processing manner, the processor 210 invokes program instructions in the memory 220 to process the setting request. Inside the storage device 200, the network card 230 may also analyze and process the configuration request and the data access request. In this processing manner, the configuration request and the data access request are not transmitted to the processor 210 , which can reduce the occupation of the processor 210 . Inside the storage device 200, the network card 230 and the processor 210 may cooperate to process the request message. For example, the network card 230 may process the data access request, forward the data access request to the hard disk 240 to implement data access, and the processor 210 processes the setting request.
由上述描述可知,对于存储设备200可以按照优先级处理数据访问请求,数据访问请求的处理顺序调整更加规范,更高效,能够较好的保证处理数据访问请求的时延。It can be known from the above description that the storage device 200 can process data access requests according to priority, and the adjustment of the processing sequence of data access requests is more standardized and efficient, and can better guarantee the time delay of processing data access requests.
下面结合图4对本申请实施例提供的数据访问方法进行说明,如图4所示,为本申请实施例提供的一种数据访问方法,该方法包括:The following describes the data access method provided by the embodiment of the present application in conjunction with FIG. 4. As shown in FIG. 4, it is a data access method provided by the embodiment of the present application. The method includes:
步骤401:应用服务器100向存储设备200发送设置请求,该设置请求用于请求设置存储设备200数据访问请求的优先级。Step 401: the application server 100 sends a setting request to the storage device 200, and the setting request is used for requesting to set the priority of the data access request of the storage device 200.
当用户或者运维人员需要调整数据访问请求的优先级时,可以通过操作运行在应用服务器100的应用程序,触发应用服务器100生成设置请求,该设置请求用于设置存储设备200数据访问请求的优先级。应用服务器100可以向存储设备200发送该设置请求。When a user or an operation and maintenance personnel needs to adjust the priority of a data access request, the application program running on the application server 100 can be operated to trigger the application server 100 to generate a setting request, which is used to set the priority of the data access request of the storage device 200. class. The application server 100 may send the setting request to the storage device 200 .
在本申请实施例中,数据访问请求的优先级是指存储设备200处理数据访问请求所需遵循的优先顺序。In the embodiment of the present application, the priority of the data access request refers to the priority order that the storage device 200 needs to follow in processing the data access request.
数据访问请求的优先级配置粒度有很多种,对于任一数据访问请求,该数据访问请求可以是用户通过应用程序触发客户端设备300生成的。There are many kinds of priority configuration granularities for data access requests. For any data access request, the data access request may be generated by the client device 300 triggered by the user through an application program.
以视频播放场景下产生的数据访问请求为例,视频播放的应用程序可以部署在用户的移动终端上、智能家居设备(如电视机)、台式机、笔记本电脑等不同客户端设备300上。部署在不同类型客户端设备300上的应用程序可能不同。部署在移动终端上的应用程序以及部署在笔记本电脑的应用程序不同。用户为了观看视频可以在应用程序中输入账号,登陆到视频播放平台。用户通过点击视频播放平台上视频视图或文字信息观看视频,用户在点击视频播放平台上视频视图或文字信息时,会触发应用程序所在客户端设备300,生成数据访问请求,该数据访问请求所请求的数据为用户需要观看的视频。从不同角度考虑该数据访问请求的来源,该数据访问请求可以认为是由该用户发起的,也可以认为是由该应用程序发起的,还可以是由该客户端设备300发起的。Taking the data access request generated in the video playing scene as an example, the video playing application can be deployed on different client devices 300 such as a user's mobile terminal, a smart home device (such as a TV), a desktop computer, and a notebook computer. Applications deployed on different types of client devices 300 may be different. Applications deployed on mobile terminals are different from applications deployed on laptops. In order to watch the video, the user can enter the account number in the application program and log in to the video playback platform. The user watches the video by clicking on the video view or text information on the video playback platform. When the user clicks on the video view or text information on the video playback platform, the client device 300 where the application is located will be triggered to generate a data access request. The data access request requested The data of is the video that the user needs to watch. Considering the source of the data access request from different perspectives, the data access request may be considered to be initiated by the user, the application program, or the client device 300 .
按照该数据访问请求的发起方,数据访问请求的优先级配置粒度可以是按照用户为粒度配置的,也可以是以应用程序为粒度配置的,还可以是以客户端设备300为粒度配置的。也就是说,数据访问请求的优先级也可以基于用户、应用程序以及客户端设备300中的部分或全部进行设置。According to the originator of the data access request, the priority configuration granularity of the data access request can be configured according to the granularity of the user, application program, or client device 300 . That is to say, the priority of the data access request may also be set based on some or all of the user, the application program, and the client device 300 .
也即在本申请实施例中允许应用服务器100基于不同粒度设置数据访问请求的优先级,例如,应用服务器100可以以应用程序为粒度对发起的数据访问请求设置优先级,应用服务器100也可以以用户为粒度对发起的数据访问请求设置优先级。That is to say, in the embodiment of the present application, the application server 100 is allowed to set the priority of data access requests based on different granularities. Users set priorities for data access requests initiated by granular pairs.
以文件管理场景下产生的数据访问请求为例,文件管理的应用程序可以部署在用户的移动终端上、台式机、笔记本电脑等不同客户端设备300上。部署在不同类型客户端设备300上的应用程序可能不同。应用程序所能登陆的用户类型也不同。举例来说,部署在移动终端的文件管理的应用程序可以为个人级文件管理软件,适用于用户对个人、私有的文件的进行管理,通常通过移动终端登陆到文件管理的应用程序的用户为个人用户。部署在特定区域内的台式机的文件管理的应用程序可以为企业级文件管理软件,适用于企业内部人员对企业内部的文件进行管理。对于企业内部,不同人员的等级不同,级别高的企业人员能够对保密级别更高的文件进行管理,或者所能管理的文件范围更广。Taking a data access request generated in a file management scenario as an example, the file management application program can be deployed on different client devices 300 such as a user's mobile terminal, desktop computer, and notebook computer. Applications deployed on different types of client devices 300 may be different. The types of users that the application can log in to also vary. For example, the file management application deployed on the mobile terminal can be a personal-level file management software, which is suitable for users to manage personal and private files. Usually, users who log in to the file management application through a mobile terminal are personal user. The application program for file management of desktop computers deployed in a specific area may be enterprise-level file management software, which is suitable for internal personnel of the enterprise to manage internal files of the enterprise. For the enterprise, different personnel have different levels, and high-level enterprise personnel can manage files with higher confidentiality levels, or can manage a wider range of files.
无论是企业级用户,还是个人用户,为了管理文件可以在文件管理的应用程序中输入账号,登陆到文件管理系统。用户(企业级用户或是个人用户)通过点击文件管理系统中文件的图标,对文件进行增删查改等操作,这些操作会触发应用程序所在客户端设备300,生成数据访问请求,该数据访问请求所请求的数据为用户所操作的文件。从不同角度考虑该数据访问请求的来源,该数据访问请求可以认为是由该用户(如企业级用户或个人用户)发起的,也可以认为是由该应用程序(企业级文件管理软件或个人级管理软件)发起的,还可以是由该企业中不同等级的用户发起的。Whether it is an enterprise user or an individual user, in order to manage files, you can enter an account in the file management application and log in to the file management system. The user (enterprise user or individual user) clicks the icon of the file in the file management system to perform operations such as adding, deleting, checking, and modifying the file. These operations will trigger the client device 300 where the application program is located to generate a data access request. The data access request The requested data is the file that the user has manipulated. Considering the source of the data access request from different perspectives, the data access request can be considered to be initiated by the user (such as an enterprise-level user or an individual user), or it can be considered to be initiated by the application program (enterprise-level file management software or personal-level management software), and may also be initiated by users of different levels in the enterprise.
从优先级的配置粒度,可以包括用户优先级、应用程序优先级以及服务优先级。用户优先级可以理解为针对不同用户发起的数据访问请求配置的优先级,如重要用户配置高优先级,普通用户配置低优先级。应用程序优先级可以理解为针对不同应用程序发起的数据访问请求配置的优先级,如企业级应用程序配置高优先级,个人级应用程序配置低优先级。服务优先级可以理解为针对不同等级的用户发起的数据访问请求配置的优先级,如高等级用户配置高优先级,低级别用户配置低优先级,付费高的用户配置高优先级,未额外支付费用的配置低优先级。From the configuration granularity of priority, it can include user priority, application priority, and service priority. User priority can be understood as the priority configured for data access requests initiated by different users, such as high priority for important users and low priority for ordinary users. Application priority can be understood as the priority configured for data access requests initiated by different applications, such as high priority for enterprise-level applications and low priority for personal-level applications. Service priority can be understood as the priority configured for data access requests initiated by users of different levels. For example, high-level users are configured with high priority, low-level users are configured with low priority, and high-paying users are configured with high priority without additional payment. The configuration of fees has low priority.
上述优先级的配置粒度仅是举例,本申请实施例并不限定优先级配置粒度的具体表现形式,在不同的场景中,可以采用不同的优先级配置粒度。The above configuration granularity of the priority is just an example, and the embodiment of the present application does not limit the specific expression form of the priority configuration granularity, and different priority configuration granularities may be used in different scenarios.
为了能够实现优先级配置功能,在应用服务器100中部署有用户管理模块110。用户管理模块110可以理解为运行在应用服务器100上的软件模块。本申请实施例并不限定该软件模块的呈现形式的,例如用户管理模块110可以以应用程序接口(application programming interface,API)的形式被调用,也可以是以通信协议的API的形式被调用。In order to realize the priority configuration function, a user management module 110 is deployed in the application server 100 . The user management module 110 can be understood as a software module running on the application server 100 . The embodiment of the present application does not limit the presentation form of the software module. For example, the user management module 110 may be called in the form of an application programming interface (application programming interface, API), or in the form of an API of a communication protocol.
用户管理模块110用于实现优先级的设置。应用服务器100可以通过调用该用户管理模块110生成用于设置优先级的设置请求,并将该设置请求发送给存储设备200。The user management module 110 is used to implement priority setting. The application server 100 may generate a setting request for setting priority by calling the user management module 110 , and send the setting request to the storage device 200 .
应用服务器100生成设置请求的场景有许多种,这里列举其中几种:There are many scenarios for the application server 100 to generate the configuration request, some of which are listed here:
以应用服务器100为介于客户端设备300以及存储设备200之间的中间设备为例,用户可以通过客户端设备300进行优先级的配置,如用户可以通过付费获取高优先级的权限。客户端设备300可以将用户配置的优先级发送给应用服务器100,或者应用服务器100可以收集用户在客户端设备300所配置的优先级。应用服务器100在确定了用户所配置的优先级之后可以调用用户管理模块110,生成设置请求,将该设置请求发送给存储设备200。Taking the application server 100 as an intermediate device between the client device 300 and the storage device 200 as an example, the user can configure the priority through the client device 300 , for example, the user can obtain high-priority permissions by paying. The client device 300 may send the priority configured by the user to the application server 100 , or the application server 100 may collect the priority configured by the user on the client device 300 . After determining the priority configured by the user, the application server 100 may call the user management module 110 to generate a setting request, and send the setting request to the storage device 200 .
运维人员也可以直接对应用服务器100进行操作,进行优先级的配置,如运维人员可以调整不同客户端设备300的优先级,或不同应用程序的优先级。客户端设备300可以根据运维人员的配置调用用户管理模块110,生成设置请求,将该设置请求发送给存储设备200。The operation and maintenance personnel can also directly operate the application server 100 to configure the priority. For example, the operation and maintenance personnel can adjust the priority of different client devices 300 or the priority of different application programs. The client device 300 may call the user management module 110 according to the configuration of the operation and maintenance personnel, generate a setting request, and send the setting request to the storage device 200 .
需要说明的是,在本申请实施例中,应用服务器100可以为客户端设备300,也即应用 服务器100直接部署在用户侧,在用户触发下可以发出数据访问请求。同时,应用服务器100具备优先级设置功能,应用服务器100在实现该优先级设置功能时,可以仅只针对该应用服务器100上部署的应用程序发送数据访问请求设置优先级,针对该应用服务器100发送数据访问请求设置优先级,或针对登陆在该应用服务器100上客户端软件的用户发送数据访问请求设置优先级。当然,该应用服务器100也可以针对多种应用程序发送数据访问请求设置优先级,针对不同客户端设备300发送数据访问请求设置优先级,或针对不同用户发送数据访问请求设置优先级。在这种情况下,应用服务器100可以认为是优先级管理设备,所设置的优先级并非仅局限于自身发送的数据访问请求,还可以针对该应用服务器100之外发起的数据访问权请求设置优先级。在本申请实施例中,以应用服务器100作为优先级管理设备为例进行说明。It should be noted that, in the embodiment of the present application, the application server 100 may be the client device 300, that is, the application server 100 is directly deployed on the user side, and can send a data access request when triggered by the user. At the same time, the application server 100 has a priority setting function. When the application server 100 implements the priority setting function, it can only set the priority for sending data access requests for applications deployed on the application server 100, and send data access requests for the application server 100. The priority is set for the access request, or the priority is set for the data access request sent by the user who logs in the client software on the application server 100 . Certainly, the application server 100 may also set priorities for data access requests sent by various applications, set priorities for data access requests sent by different client devices 300 , or set priorities for data access requests sent by different users. In this case, the application server 100 can be regarded as a priority management device, and the set priority is not limited to the data access request sent by itself, but can also be set for the data access right request initiated outside the application server 100. class. In this embodiment of the present application, the application server 100 is used as a priority management device as an example for description.
应用服务器100设置优先级的方式存在多种。应用服务器100可以只设置部分数据访问请求的优先级。例如,应用服务器100可以设置部分应用程序、部分客户端设备300或部分用户发起的数据访问请求设置优先级。应用服务器100也可以设置全部数据访问请求的优先级。例如,应用服务器100也可以设置全部应用程序、全部客户端设备300或全部用户发起的数据访问请求设置优先级。There are many ways for the application server 100 to set the priority. The application server 100 may only set the priority of some data access requests. For example, the application server 100 may set priorities for data access requests initiated by some applications, some client devices 300 or some users. The application server 100 can also set the priority of all data access requests. For example, the application server 100 may also set priorities for data access requests initiated by all applications, all client devices 300 or all users.
优先级的表征方式有很多种,例如,应用服务器100与存储设备200可以利用数值表征不同针对不同应用程序发起的数据访问请求的优先级,优先级由高至低分别为1、2、3、4……。又例如,应用服务器100与存储设备200可以利用英文表征不同针对不同用户发起的数据访问请求的优先级,优先级由高至低分别为Ex(extreme high priority)、Ui(ultra high priority)、Ge(general priority)……。本申请实施例并不限定优先级的表征方式。There are many ways to represent the priority. For example, the application server 100 and the storage device 200 can use numerical values to represent the priority of different data access requests initiated by different applications. The priorities are 1, 2, 3, 4……. For another example, the application server 100 and the storage device 200 can use English to represent different priorities of data access requests initiated by different users, and the priorities are Ex (extreme high priority), Ui (ultra high priority), Ge (general priority)……. The embodiment of the present application does not limit the representation manner of the priority.
例如,当应用服务器100只设置一个应用程序、一个客户端设备300或一个用户发起的数据访问请求设置优先级时,应用服务器100所发起的设置请求可以携带标识该应用程序、客户端设备300或用户的信息、以及该应用程序、客户端设备300或用户的优先级。标识该应用程序、客户端设备300或用户的信息可以简称为该应用程序、客户端设备300或用户的标识信息。本申请实施例并不限定该标识信息的具体类型,凡是能够唯一标识应用程序、客户端设备300或用户的信息均适用于本申请实施例。For example, when the application server 100 only sets the priority of a data access request initiated by an application program, a client device 300 or a user, the setting request initiated by the application server 100 may carry an identifier for the application program, client device 300 or The user's information, and the priority of the application, client device 300 or user. The information identifying the application, the client device 300 or the user may be simply referred to as identification information of the application, the client device 300 or the user. The embodiment of the present application does not limit the specific type of the identification information, and any information that can uniquely identify the application program, the client device 300 or the user is applicable to the embodiment of the present application.
又例如,当应用服务器100设置多个应用程序、多个客户端设备300或多个用户发起的数据访问请求设置优先级时,应用服务器100所发起的设置请求可以携带标识该多个应用程序、多个客户端设备300或多个用户的信息、以及该多个应用程序、多个客户端设备300或多个用户的优先级。该多个应用程序、多个客户端设备300或多个用户的信息、以及该多个应用程序、多个客户端设备300或多个用户的优先级可以整合为优先级列表(table),以便于存储设备200解析。For another example, when the application server 100 sets priorities for data access requests initiated by multiple applications, multiple client devices 300, or multiple users, the setting request initiated by the application server 100 may carry the identification of the multiple applications, Information of multiple client devices 300 or multiple users, and priorities of the multiple applications, multiple client devices 300 or multiple users. The information of the plurality of applications, the plurality of client devices 300 or the plurality of users, and the priorities of the plurality of applications, the plurality of client devices 300 or the plurality of users can be integrated into a priority list (table), so that It is parsed on the storage device 200.
需要说明的是,应用服务器100所述设置优先级并非固定不变的,在本申请实施例中允许应用服务器100动态的调整部分或全部数据访问请求的优先级。It should be noted that the priority set by the application server 100 is not fixed, and in the embodiment of the present application, the application server 100 is allowed to dynamically adjust the priority of some or all data access requests.
应用服务器100可以生成用于设置优先级的设置请求,设置请求包括但不限于:The application server 100 may generate a setting request for setting priority, and the setting request includes but is not limited to:
用于初始化优先级的设置请求,如Init(priority table[user,app,level]),其中,user用于指示用户,app用于指示应用程序,level用于指示优先级,如用数字或英文标识指示优先级。A setting request for initializing the priority, such as Init(priority table[user,app,level]), where user is used to indicate the user, app is used to indicate the application program, and level is used to indicate the priority, such as in numbers or English The ID indicates priority.
用于更新优先级的设置请求,如update(priority tabe[user,app,level])。A setting request for updating priority, such as update(priority tabe[user,app,level]).
步骤402:存储设备200接收该设置请求,根据该设置请求更新优先级列表。Step 402: the storage device 200 receives the setting request, and updates the priority list according to the setting request.
在存储设备200中可以保存有优先级列表,该优先级列表可以记录数据访问请求的优先 级。基于前述说明可知,以数据访问请求的来源角度,数据访问请求的优先级可以分为不同粒度的优先级,例如不同用户的优先级、不同应用程序的优先级、以及不同客户端设备300的优先级。该优先级列表可以记录该不同粒度的优先级。A priority list may be stored in the storage device 200, and the priority list may record the priority of the data access request. Based on the foregoing description, it can be seen that from the perspective of the source of the data access request, the priority of the data access request can be divided into priorities of different granularities, such as the priority of different users, the priority of different applications, and the priority of different client devices 300 class. The priority list can record the priorities of different granularities.
如图5所示,为存储设备200所保存的优先级列表的抽象示意图,在该优先级列表中,分别从用户、以及应用程度的粒度记录了优先级。存储设备200基于该用户、以及应用程度的优先级,可以采用加权求和的方式获得最终的数据访问请求的整体的优先级。As shown in FIG. 5 , it is an abstract schematic diagram of a priority list stored in the storage device 200 . In the priority list, priorities are recorded at the granularity of user and application level. Based on the priority of the user and the application level, the storage device 200 may obtain the final overall priority of the data access request in a weighted summation manner.
当存储设备200接收到设置请求后,可以根据该设置请求中所携带的信息更新优先级列表。如删除优先级列表中用户、客户端设备300或应用程序的优先级、修改优先级列表中的用户、客户端设备300或应用程序的优先级、或在优先级列表中增加新的用户、客户端设备300或应用程序的优先级。After the storage device 200 receives the setting request, it may update the priority list according to the information carried in the setting request. Such as deleting the user in the priority list, the priority of the client device 300 or the application program, modifying the user in the priority list, the priority of the client device 300 or the application program, or adding a new user or client in the priority list The priority of the end device 300 or application.
具体到存储设备200的内部:Specifically to the interior of the storage device 200:
若数据访问请求以及设置请求均由网卡230处理,该优先级列表可以保存在网卡230中,以便网卡230能够利用优先级列表处理接收到的数据访问请求。当网卡230接收到该设置请求后,可以根据该设置请求更新网卡230内部保存的优先级列表。If both the data access request and the setting request are processed by the network card 230, the priority list can be stored in the network card 230, so that the network card 230 can use the priority list to process the received data access request. After the network card 230 receives the setting request, the priority list stored inside the network card 230 may be updated according to the setting request.
若数据访问请求以及设置请求均由处理器210处理,该优先级列表可以保存内存220中。当处理器210接收到该设置请求后,可以根据该设置请求更新内存220中的优先级列表。If both the data access request and the configuration request are processed by the processor 210 , the priority list can be stored in the memory 220 . After receiving the setting request, the processor 210 may update the priority list in the memory 220 according to the setting request.
若数据访问请求以及设置请求由处理器210和网卡230配合处理,例如,网卡230处理数据访问请求,处理器210来处理设置请求,该优先级列表可以保存在网卡230中,以便网卡230能够利用优先级列表处理接收到的数据访问请求。另外,在存储设备200中也可以在内存220中保存相同的一份优先级列表。这样当网卡230中的优先级列表失效或损坏时,可以利用内存220中保存的优先级列表恢复网卡230中的优先级列表。当处理器210接收到该设置请求后,可以指示网卡230更新网卡230中的优先级列表。若内存220中也保存了一份优先级列表,处理器210也可以根据该设置请求更新内存220中的优先级列表。If the data access request and the setting request are processed by the processor 210 and the network card 230 in cooperation, for example, the network card 230 processes the data access request, and the processor 210 processes the setting request, the priority list can be stored in the network card 230, so that the network card 230 can use The priority list handles incoming data access requests. In addition, the storage device 200 may also store the same priority list in the memory 220 . In this way, when the priority list in the network card 230 becomes invalid or damaged, the priority list stored in the memory 220 can be used to restore the priority list in the network card 230 . After receiving the setting request, the processor 210 may instruct the network card 230 to update the priority list in the network card 230 . If a priority list is also stored in the memory 220, the processor 210 may also request to update the priority list in the memory 220 according to the setting.
在更新优先级列表之后,存储设备200可以基于更新后的优先级列表处理数据访问请求。存储设备200处理数据访问请求的方式可以参见步骤403~步骤404。After updating the priority list, the storage device 200 may process the data access request based on the updated priority list. For the manner in which the storage device 200 processes the data access request, reference may be made to steps 403 to 404 .
步骤403:应用服务器100在用户的触发下生成数据访问请求,该数据访问请求携带标识信息,该标识信息包括下列的部分或全部:应用程序的标识信息、用户的标识信息以及客户端设备300的标识信息。Step 403: The application server 100 generates a data access request triggered by the user, and the data access request carries identification information, and the identification information includes part or all of the following: identification information of the application program, identification information of the user, and the client device 300 Identification information.
当应用服务器100为客户端设备300时,应用服务器100可以检测到用户的操作,识别出用户的信息、以及用户所操作的应用程序的信息,当应用服务器100生成数据访问请求中,可以在数据访问请求中携带标识信息。When the application server 100 is the client device 300, the application server 100 can detect the user's operation, identify the information of the user, and the information of the application program operated by the user. When the application server 100 generates a data access request, it can be in the data Identification information is carried in the access request.
当应用服务器100为间于客户端设备300和存储设备200的中间设备时,应用服务器100在接收到客户端设备300发送的数据访问请求后,可以保留据数据访问请求中携带的标识信息,将该数据访问请求发送给存储设备200,该标识信息包括应用程序的标识信息、用户的标识信息或客户端设备300的标识信息。When the application server 100 is an intermediate device between the client device 300 and the storage device 200, after receiving the data access request sent by the client device 300, the application server 100 may retain the identification information carried in the data access request, and The data access request is sent to the storage device 200 , and the identification information includes application program identification information, user identification information, or client device 300 identification information.
需要说明的是,应用服务器100携带的标识信息与存储设备200数据访问请求的优先级的粒度相关,例如,存储设备200数据访问请求的优先级仅是以用户以及应用程序为粒度设置,应用服务器100可以只需保证数据访问请求中携带用户的标识信息以及应用程序的标识信息。例如,存储设备200数据访问请求的优先级仅是以用户为粒度设置,应用服务器100可以在数据访问请求中携带用户的标识信息。It should be noted that the identification information carried by the application server 100 is related to the granularity of the priority of the data access request of the storage device 200. For example, the priority of the data access request of the storage device 200 is only set at the granularity of the user and the application program. The application server 100 may only need to ensure that the data access request carries the identification information of the user and the identification information of the application program. For example, the priority of the data access request of the storage device 200 is only set at the granularity of the user, and the application server 100 may carry the identification information of the user in the data access request.
数据访问请求包括但不限于:Data access requests include, but are not limited to:
用于读取数据的数据读取请求,如Read IO(info[user,app,address,etc.]),其中,Read IO指示数据访问请求为数据读取请求,info指示该数据读取请求可以携带的信息,数据读取请求所携带的信息可以包括中括号中的信息,user用于指示用户,app用于指示应用程序,address用于标识客户端设备300的地址。A data read request for reading data, such as Read IO(info[user,app,address,etc.]), where Read IO indicates that the data access request is a data read request, and info indicates that the data read request can The information carried, the information carried in the data read request may include the information in square brackets, user is used to indicate the user, app is used to indicate the application program, and address is used to identify the address of the client device 300 .
用于写入数据的数据写入请求,如Write IO(info[user,app,address,etc.]),其中,Read IO指示数据访问请求为数据写入请求。关于info、user、app、address的说明可以参见前述说明,此处不再赘述。A data write request for writing data, such as Write IO(info[user,app,address,etc.]), where Read IO indicates that the data access request is a data write request. For the description of info, user, app, and address, please refer to the previous description, and will not repeat them here.
步骤404:存储设备200接收数据访问请求,解析该数据访问请求,基于优先级列表处理该数据访问请求。Step 404: the storage device 200 receives the data access request, parses the data access request, and processes the data access request based on the priority list.
当存储设备200接收到数据访问请求后,可以根据数据访问请求中携带的标识信息以及存储设备200内部保存的优先级列表确定该数据访问请求的优先级。After the storage device 200 receives the data access request, it may determine the priority of the data access request according to the identification information carried in the data access request and the priority list stored inside the storage device 200 .
存储设备200可以按照优先级依次处理各个数据访问请求。例如,对于优先级较高的数据访问请求,也即数据访问请求的优先级高于第一阈值,存储设备200可以优先处理该数据访问请求,优先选择处理该数据访问请求的硬盘240,指示硬盘240处理该数据访问请求。需要说明的是,硬盘240并非直接处理该数据访问请求,而是处理基于该数据访问请求产生的、放置在该硬盘240的提交队列中的命令。The storage device 200 may sequentially process each data access request according to the priority. For example, for a data access request with a higher priority, that is, the priority of the data access request is higher than the first threshold, the storage device 200 may preferentially process the data access request, preferentially select the hard disk 240 for processing the data access request, and instruct the hard disk 240 processes the data access request. It should be noted that the hard disk 240 does not directly process the data access request, but processes commands generated based on the data access request and placed in the submission queue of the hard disk 240 .
对于优先级较低的数据访问请求,也即数据访问请求的优先级低于第二阈值,第二阈值不大于第一阈值,存储设备200可以延后处理该数据访问请求或者按照数据访问请求的接收顺序正常处理该数据访问请求。For a data access request with a lower priority, that is, the priority of the data access request is lower than the second threshold, and the second threshold is not greater than the first threshold, the storage device 200 may delay processing the data access request or The receive sequence processes the data access request normally.
存储设备200在按照优先级顺序依次处理各个数据访问请求时,针对任一数据访问请求,存储设备200可以为该数据访问请求选择处理该数据访问请求的硬盘240,将基于该数据访问请求产生的命令放置在该硬盘240的提交队列中。存储设备200还可以采用其他方式来保证数据访问请求的优先级。When the storage device 200 processes each data access request sequentially according to the order of priority, for any data access request, the storage device 200 can select the hard disk 240 for processing the data access request for the data access request, and will generate the data based on the data access request. The command is placed in the submission queue of the hard disk 240 . The storage device 200 may also adopt other methods to ensure the priority of data access requests.
下面对存储设备200优先处理该数据访问请求的方式进行说明:The manner in which the storage device 200 preferentially processes the data access request is described below:
存储设备200可以监控存储设备200中各个硬盘240的状态,可以实时获取各个硬盘240的状态(如带宽、时延、是否正常工作等)。例如,存储设备200可以向硬盘240发送监控命令,该监控命令用于请求该硬盘240的状态,硬盘240在接收到该监控命令后,识别该监控命令,向该存储设备200反馈监控响应,该监控响应中携带硬盘240的状态。示例性的,存储设备200当需要获知该硬盘240的带宽时,存储设备200可以向硬盘240发送用于请求该硬盘240带宽的监控命令,硬盘240在接收到该监控命令后,可以将硬盘240的带宽携带在监控响应中反馈给存储设备200。存储设备200可以通过监控命令方便、快捷的获取该硬盘240的状态,保证所获取的硬盘240的状态的实时性。The storage device 200 can monitor the status of each hard disk 240 in the storage device 200, and can obtain the status of each hard disk 240 (such as bandwidth, time delay, whether it works normally, etc.) in real time. For example, the storage device 200 may send a monitoring command to the hard disk 240, and the monitoring command is used to request the status of the hard disk 240. After receiving the monitoring command, the hard disk 240 recognizes the monitoring command and feeds back a monitoring response to the storage device 200. The status of the hard disk 240 is carried in the monitoring response. Exemplarily, when the storage device 200 needs to know the bandwidth of the hard disk 240, the storage device 200 may send a monitoring command for requesting the bandwidth of the hard disk 240 to the hard disk 240, and after receiving the monitoring command, the hard disk 240 may send the hard disk 240 The bandwidth carry is fed back to the storage device 200 in the monitoring response. The storage device 200 can obtain the state of the hard disk 240 conveniently and quickly through the monitoring command, so as to ensure the real-time performance of the obtained state of the hard disk 240 .
存储设备200可以通过如下方式中的部分或全部优先处理该数据访问请求:The storage device 200 may preferentially process the data access request in some or all of the following manners:
方式一:存储设备200根据存储设备200中各个硬盘240的状态从中选择硬盘240的状态满足状态条件的硬盘240,将基于该数据访问请求产生的命令放置在该硬盘240的提交队列中。Method 1: The storage device 200 selects the hard disk 240 whose status meets the status condition according to the status of each hard disk 240 in the storage device 200, and places the command generated based on the data access request in the submission queue of the hard disk 240.
状态条件包括下列的部分或全部:Status conditions include some or all of the following:
硬盘240的带宽大于带宽阈值、硬盘240的时延小于时延阈值、硬盘240正常。The bandwidth of the hard disk 240 is greater than the bandwidth threshold, the delay of the hard disk 240 is less than the delay threshold, and the hard disk 240 is normal.
方式二:存储设备200可以将基于该数据访问请求产生的命令插入到硬盘240的提交队 列靠前的位置。例如,存储设备200可以将该命令插入该提交队列的头部。又例如,存储设备200可以将命令插入到提交队列的尾部,但在该命令中增加标识,该标识用于指示优先处理该命令。Mode 2: the storage device 200 may insert the command generated based on the data access request into the front position of the submission queue of the hard disk 240. For example, storage device 200 may insert the command at the head of the commit queue. For another example, the storage device 200 may insert the command at the end of the submission queue, but add an identifier to the command, where the identifier is used to indicate that the command is processed first.
方式三:存储设备200可以将基于该数据访问请求产生的命令放置在硬盘240的多个提交队列中优先级较高的提交队列中。Mode 3: the storage device 200 may place the command generated based on the data access request in the submission queue with a higher priority among the multiple submission queues of the hard disk 240 .
方式四:存储设备200可以指示硬盘240暂停该硬盘240的部分或全部后台操作。后台操作是指硬盘240中数据读取以及写入之外的操作。后台操作包括但不限于垃圾回收、后台巡检、数据重读、磨损均衡等。Way 4: The storage device 200 may instruct the hard disk 240 to suspend some or all background operations of the hard disk 240 . Background operations refer to operations other than data reading and writing in the hard disk 240 . Background operations include but are not limited to garbage collection, background inspection, data rereading, wear leveling, etc.
方式五:若存储设备200所选择的硬盘240的负载较高,存储设备200可以将该命令放置在该硬盘240的备份盘的提交队列中。硬盘240的备份盘是指与该硬盘240保存有相同数据的硬盘240。Manner 5: If the load of the hard disk 240 selected by the storage device 200 is high, the storage device 200 may place the command in the submission queue of the backup disk of the hard disk 240 . The backup disk of the hard disk 240 refers to the hard disk 240 that stores the same data as the hard disk 240 .
方式六:存储设备200在基于该数据访问请求产生的命令增加优先级标识,该优先级标识用于标识该命令的优先级。该优先级标识可以是基于该数据访问请求的优先级确定的。Manner 6: The storage device 200 adds a priority identifier to the command generated based on the data access request, where the priority identifier is used to identify the priority of the command. The priority identifier may be determined based on the priority of the data access request.
该优先级标识是硬盘240可以识别的,也就是说,硬盘240在从该提交队列中获取各个需要处理的命令时,硬盘240可以识别该命令中携带的优先级标识,按照命令中携带的优先级标识依次处理提交队列中的命令。The priority identification is identifiable by the hard disk 240, that is to say, when the hard disk 240 obtains each command that needs to be processed from the submission queue, the hard disk 240 can identify the priority identification carried in the command, and according to the priority carried in the command Level IDs process the commands in the submission queue sequentially.
需要说明的是,存储设备200可以只在部分命令中增加优先级标识,例如对于优先级最高的或者优先级大于设定值的数据访问请求,存储设备200可以在基于该数据访问请求产生的命令中增加优先级标识。举例来说,对于第一优先级和第二优先级的数据访问请求,存储设备可以在基于第一优先级的该数据访问请求产生的命令中增加优先级标识,以标识该命令的优先级为第一。存储设备可以在基于第二优先级的该数据访问请求产生的命令中增加优先级标识,以标识该命令的优先级为第二。这样,当硬盘240从提交队列中获取该携带有优先级标识的命令中,可以将该命令的处理顺序提前,先处理优先级为第一的命令,之后再处理优先级为第二的命令,之后再处理无优先级标识的命令。It should be noted that the storage device 200 may only add priority identifiers to some commands. For example, for a data access request with the highest priority or a priority greater than a set value, the storage device 200 may add a priority identifier to a command generated based on the data access request. Add the priority mark in . For example, for the data access requests of the first priority and the second priority, the storage device may add a priority identifier to the command generated based on the data access request of the first priority, so as to indicate that the priority of the command is First. The storage device may add a priority identifier to a command generated based on the data access request of the second priority, to identify that the priority of the command is second. In this way, when the hard disk 240 obtains the command carrying the priority identifier from the submission queue, the processing sequence of the command can be advanced, and the command with the first priority is processed first, and then the command with the second priority is processed. Commands without priority flags are processed later.
方式七:存储设备200侧可以预先配置有不同优先级的命令格式,也就说是,优先级不同,命令的格式也不同。存储设备200可以按照数据访问请求的优先级生成相应优先级的命令。存储设备200将不同命令放置在硬盘240的提交队列中,硬盘240从该提交队列中获取命令,根据命令的格式来识别各个命令的优先级,按照优先级来处理各个命令。Mode 7: The storage device 200 side may be pre-configured with command formats of different priorities, that is to say, different priorities have different command formats. The storage device 200 may generate commands with corresponding priorities according to the priorities of the data access requests. The storage device 200 places different commands in the submission queue of the hard disk 240, and the hard disk 240 obtains commands from the submission queue, identifies the priority of each command according to the format of the command, and processes each command according to the priority.
基于与方法实施例同一发明构思,本申请实施例还提供了一种数据访问装置,该数据访问装置用于执行上述如图4所示的方法实施例中所述存储设备执行的方法,相关特征可参见上述方法实施例,此处不再赘述。如图6所示,该数据访问装置600包括接收模块601、处理模块602。Based on the same inventive concept as the method embodiment, the embodiment of the present application also provides a data access device, the data access device is used to execute the method performed by the storage device in the method embodiment as shown in Figure 4 above, and the related features Reference may be made to the foregoing method embodiments, and details are not repeated here. As shown in FIG. 6 , the data access device 600 includes a receiving module 601 and a processing module 602 .
接收模块601,用于接收设置请求,设置请求用于设置数据访问请求的处理优先级,处理优先级描述了对数据访问请求的处理次序。The receiving module 601 is configured to receive a setting request, where the setting request is used to set the processing priority of the data access request, and the processing priority describes the processing order of the data access request.
处理模块602,用于基于设置请求配置优先级列表,优先级列表记录了不同数据访问请求的处理优先级;按照处理优先级处理接收到的数据访问请求。The processing module 602 is configured to configure a priority list based on the setting request, and the priority list records the processing priorities of different data access requests; process the received data access requests according to the processing priorities.
在一种可能的实施方式中,处理优先级是基于下列的部分或全部粒度设置的:发起数据访问请求的用户、发起数据访问请求的应用程序、发起数据访问请求的客户端设备。In a possible implementation manner, the processing priority is set based on some or all of the following granularities: the user initiating the data access request, the application program initiating the data access request, and the client device initiating the data access request.
在一种可能的实施方式中,数据访问请求携带有标识信息,标识信息包括下列的部分或全部:应用程序的标识信息、用户的标识信息、客户端设备的标识信息。In a possible implementation manner, the data access request carries identification information, and the identification information includes part or all of the following: identification information of an application program, identification information of a user, and identification information of a client device.
在一种可能的实施方式中,处理模块602在按照处理优先级处理接收到的数据访问请求时,可以解析接收到的数据访问请求,提取数据访问请求中的标识信息。处理模块602根据该标识信息从优先级列表中确定该数据访问请求的处理优先级。处理模块602根据处理优先级调整数据访问请求的处理次序;按照处理次序依次处理数据访问请求。In a possible implementation manner, when processing the received data access request according to the processing priority, the processing module 602 may parse the received data access request and extract the identification information in the data access request. The processing module 602 determines the processing priority of the data access request from the priority list according to the identification information. The processing module 602 adjusts the processing sequence of the data access requests according to the processing priority; and processes the data access requests sequentially according to the processing sequence.
在一种可能的实施方式中,存储设备包括多个硬盘,装置还包括发送模块603,发送模块603可以向所述多个硬盘分别发送监控命令,监控命令用于请求硬盘的状态。接收模块601可以获取所述多个硬盘反馈的所述多个硬盘的状态。处理模块602在按照处理次序依次处理数据访问请求时,可以根据多个硬盘的状态为数据访问请求选择目标硬盘;之后,再将基于数据访问请求产生的命令放置在目标硬盘的提交队列中。In a possible implementation manner, the storage device includes a plurality of hard disks, and the device further includes a sending module 603, and the sending module 603 can send a monitoring command to the plurality of hard disks respectively, and the monitoring command is used to request the status of the hard disk. The receiving module 601 may acquire the states of the multiple hard disks fed back by the multiple hard disks. When the processing module 602 processes the data access requests sequentially according to the processing order, it can select a target hard disk for the data access request according to the status of multiple hard disks; and then place the command generated based on the data access request in the submission queue of the target hard disk.
在一种可能的实施方式中,处理模块602在根据多个硬盘的状态为数据访问请求选择目标硬盘时,可以根据多个硬盘的状态从中选择满足状态条件的目标硬盘,状态条件包括下列的部分或全部:硬盘的带宽大于带宽阈值、硬盘的时延小于时延阈值、硬盘正常。In a possible implementation manner, when the processing module 602 selects a target hard disk for a data access request according to the states of multiple hard disks, it can select a target hard disk that meets the state conditions according to the states of the multiple hard disks. The state conditions include the following parts Or all: The bandwidth of the hard disk is greater than the bandwidth threshold, the latency of the hard disk is smaller than the latency threshold, and the hard disk is normal.
在一种可能的实施方式中,处理模块602在将基于数据访问请求产生的命令放置在目标硬盘的提交队列中,可以将基于数据访问请求产生的命令插入到目标硬盘的提交队列中靠前的位置,如插入到队首,还可以将基于数据访问请求产生的命令放置在目标硬盘的多个提交队列中优先级大于阈值的提交队列中。In a possible implementation manner, after the processing module 602 places the command generated based on the data access request in the submission queue of the target hard disk, it may insert the command generated based on the data access request into the front row of the submission queue of the target hard disk. Position, such as inserting to the head of the queue, can also place the command generated based on the data access request in the submission queue with a priority greater than the threshold among the multiple submission queues of the target hard disk.
在一种可能的实施方式中,装置还包括指示模块604,该指示模块604可以指示目标硬盘暂停目标硬盘中的后台操作。In a possible implementation manner, the device further includes an instruction module 604, where the instruction module 604 may instruct the target hard disk to suspend background operations on the target hard disk.
在一种可能的实施方式中,处理模块602在将基于数据访问请求产生的命令放置在目标硬盘的提交队列中时,可以将基于数据访问请求产生的命令放置在目标硬盘的备份盘的提交队列中,目标硬盘的备份盘是指与目标硬盘保存有相同数据的硬盘。In a possible implementation manner, when the processing module 602 places the command generated based on the data access request in the submission queue of the target hard disk, it may place the command generated based on the data access request in the submission queue of the backup disk of the target hard disk In , the backup disk of the target hard disk refers to the hard disk that saves the same data as the target hard disk.
在一种可能的实施方式中,基于数据访问请求产生的命令中包括优先级标识,优先级标识用于指示命令的优先级。In a possible implementation manner, the command generated based on the data access request includes a priority identifier, where the priority identifier is used to indicate the priority of the command.
需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请的实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation. Each functional module in the embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘(solid state drive,SSD)。The above-mentioned embodiments may be implemented in whole or in part by software, hardware, firmware or other arbitrary combinations. When implemented using software, the above-described embodiments may be implemented in whole or in part in the form of computer program products. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on the computer, the processes or functions according to the embodiments of the present invention will be generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more sets of available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media. The semiconductor medium may be a solid state drive (SSD).
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。 因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (22)

  1. 一种数据访问方法,其特征在于,所述方法应用于存储系统中的存储设备,所述方法包括:A data access method, wherein the method is applied to a storage device in a storage system, and the method includes:
    所述存储设备接收设置请求,所述设置请求用于设置数据访问请求的处理优先级,所述处理优先级描述了对数据访问请求的处理次序;The storage device receives a setting request, the setting request is used to set the processing priority of the data access request, and the processing priority describes the processing order of the data access request;
    所述存储设备基于所述设置请求配置优先级列表,所述优先级列表记录了不同数据访问请求的处理优先级;The storage device configures a priority list based on the setting request, and the priority list records processing priorities of different data access requests;
    所述存储设备按照所述处理优先级处理接收到的数据访问请求。The storage device processes the received data access request according to the processing priority.
  2. 如权利要求1所述的方法,其特征在于,所述处理优先级是基于下列的部分或全部粒度设置的:The method according to claim 1, wherein the processing priority is set based on some or all of the following granularities:
    发起数据访问请求的用户、发起数据访问请求的应用程序、发起数据访问请求的客户端设备。The user who initiates the data access request, the application program that initiates the data access request, and the client device that initiates the data access request.
  3. 如权利要求2所述的方法,其特征在于,所述数据访问请求携带有标识信息,所述标识信息包括下列的部分或全部:The method according to claim 2, wherein the data access request carries identification information, and the identification information includes part or all of the following:
    应用程序的标识信息、用户的标识信息、客户端设备的标识信息。Identification information of the application, identification information of the user, identification information of the client device.
  4. 如权利要求3所述的方法,其特征在于,所述存储设备按照所述处理优先级处理接收到的数据访问请求,包括:The method according to claim 3, wherein the storage device processes the received data access request according to the processing priority, comprising:
    所述存储设备解析接收到的数据访问请求,提取所述数据访问请求中的标识信息;The storage device parses the received data access request, and extracts the identification information in the data access request;
    所述存储设备根据所述标识信息所确定的处理优先级调整所述数据访问请求的处理次序;The storage device adjusts the processing sequence of the data access request according to the processing priority determined by the identification information;
    所述存储设备按照所述处理次序依次处理所述数据访问请求。The storage device sequentially processes the data access requests according to the processing order.
  5. 如权利要求1或4所述的方法,其特征在于,所述存储设备包括多个硬盘,所述存储设备按照所述处理次序依次处理所述数据访问请求,包括:The method according to claim 1 or 4, wherein the storage device includes a plurality of hard disks, and the storage device sequentially processes the data access requests according to the processing order, including:
    所述存储设备向所述多个硬盘分别发送监控命令,所述监控命令用于请求硬盘的状态;The storage device sends monitoring commands to the plurality of hard disks respectively, and the monitoring commands are used to request the status of the hard disks;
    所述存储设备获取所述多个硬盘反馈的所述多个硬盘的状态,根据所述多个硬盘的状态为所述数据访问请求选择目标硬盘;The storage device acquires the states of the plurality of hard disks fed back by the plurality of hard disks, and selects a target hard disk for the data access request according to the states of the plurality of hard disks;
    所述存储设备将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中。The storage device places the command generated based on the data access request in the submission queue of the target hard disk.
  6. 如权利要求5所述的方法,其特征在于,所述存储设备根据所述多个硬盘的状态为所述数据访问请求选择目标硬盘,包括:The method according to claim 5, wherein the storage device selects a target hard disk for the data access request according to the states of the plurality of hard disks, comprising:
    所述存储设备根据所述多个硬盘的状态从中选择满足状态条件的目标硬盘,所述状态条件包括下列的部分或全部:硬盘的带宽大于带宽阈值、硬盘的时延小于时延阈值、硬盘正常。The storage device selects a target hard disk that satisfies the state condition according to the states of the plurality of hard disks, and the state condition includes some or all of the following: the bandwidth of the hard disk is greater than the bandwidth threshold, the time delay of the hard disk is less than the time delay threshold, and the hard disk is normal. .
  7. 如权利要求5或6所述的方法,其特征在于,所述存储设备将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中,包括:The method according to claim 5 or 6, wherein the storage device places the command generated based on the data access request in the submission queue of the target hard disk, comprising:
    所述存储设备将基于所述数据访问请求产生的命令插入到所述目标硬盘的提交队列队首;或The storage device inserts the command generated based on the data access request into the head of the submission queue of the target hard disk; or
    所述存储设备将基于所述数据访问请求产生的命令放置在所述目标硬盘的多个提交队列中优先级大于阈值的提交队列中。The storage device places the command generated based on the data access request in a submission queue with a priority greater than a threshold among multiple submission queues of the target hard disk.
  8. 如权利要求5~7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 5-7, wherein the method further comprises:
    所述存储设备指示所述目标硬盘暂停所述目标硬盘中的后台操作。The storage device instructs the target hard disk to suspend background operations in the target hard disk.
  9. 如权利要求5或6所述的方法,其特征在于,所述存储设备将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中,包括:The method according to claim 5 or 6, wherein the storage device places the command generated based on the data access request in the submission queue of the target hard disk, comprising:
    所述存储设备将基于所述数据访问请求产生的命令放置在所述目标硬盘的备份盘的提交队列中,所述目标硬盘的备份盘是指与所述目标硬盘保存有相同数据的硬盘。The storage device places the command generated based on the data access request in the submission queue of the backup disk of the target hard disk, where the backup disk of the target hard disk refers to a hard disk that stores the same data as the target hard disk.
  10. 如权利要求5~9任一项所述的方法,其特征在于,基于所述数据访问请求产生的命令中包括优先级标识,所述优先级标识用于指示所述命令的优先级。The method according to any one of claims 5-9, wherein the command generated based on the data access request includes a priority identifier, and the priority identifier is used to indicate the priority of the command.
  11. 一种数据访问装置,其特征在于,所述装置应用于存储系统中的存储设备,所述装置包括接收模块、处理模块;A data access device, characterized in that the device is applied to a storage device in a storage system, and the device includes a receiving module and a processing module;
    所述接收模块,用于接收设置请求,所述设置请求用于设置数据访问请求的处理优先级,所述处理优先级描述了对数据访问请求的处理次序;The receiving module is configured to receive a setting request, the setting request is used to set the processing priority of the data access request, and the processing priority describes the processing order of the data access request;
    所述处理模块,用于基于所述设置请求配置优先级列表,所述优先级列表记录了不同数据访问请求的处理优先级;按照所述处理优先级处理接收到的数据访问请求。The processing module is configured to configure a priority list based on the setting request, the priority list records the processing priorities of different data access requests; and process the received data access requests according to the processing priorities.
  12. 如权利要求11所述的装置,其特征在于,所述处理优先级是基于下列的部分或全部粒度设置的:The apparatus according to claim 11, wherein the processing priority is set based on some or all of the following granularities:
    发起数据访问请求的用户、发起数据访问请求的应用程序、发起数据访问请求的客户端设备。The user who initiates the data access request, the application program that initiates the data access request, and the client device that initiates the data access request.
  13. 如权利要求12所述的装置,其特征在于,所述数据访问请求携带有标识信息,所述标识信息包括下列的部分或全部:The device according to claim 12, wherein the data access request carries identification information, and the identification information includes part or all of the following:
    应用程序的标识信息、用户的标识信息、客户端设备的标识信息。Identification information of the application, identification information of the user, identification information of the client device.
  14. 如权利要求13所述的装置,其特征在于,所述处理模块在按照所述处理优先级处理接收到的数据访问请求,用于:The device according to claim 13, wherein the processing module processes the received data access request according to the processing priority for:
    解析接收到的数据访问请求,提取所述数据访问请求中的标识信息;Parse the received data access request, and extract the identification information in the data access request;
    根据所述标识信息所确定的处理优先级调整所述数据访问请求的处理次序;adjusting the processing order of the data access requests according to the processing priority determined by the identification information;
    按照所述处理次序依次处理所述数据访问请求。The data access requests are sequentially processed according to the processing sequence.
  15. 如权利要求11或14所述的装置,其特征在于,所述存储设备包括多个硬盘,所述装置还包括发送模块;The device according to claim 11 or 14, wherein the storage device includes a plurality of hard disks, and the device also includes a sending module;
    所述发送模块,用于向所述多个硬盘分别发送监控命令,所述监控命令用于请求硬盘的状态;The sending module is configured to send monitoring commands to the plurality of hard disks respectively, and the monitoring commands are used to request the status of the hard disks;
    所述接收模块,用于获取所述多个硬盘反馈的所述多个硬盘的状态;The receiving module is configured to acquire the states of the plurality of hard disks fed back by the plurality of hard disks;
    所述处理模块根据所述多个硬盘的状态为所述数据访问请求选择目标硬盘;The processing module selects a target hard disk for the data access request according to the states of the plurality of hard disks;
    将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中。and placing the command generated based on the data access request in the submission queue of the target hard disk.
  16. 如权利要求15所述的装置,其特征在于,所述处理模块在根据所述多个硬盘的状态为所述数据访问请求选择目标硬盘,用于:The device according to claim 15, wherein the processing module selects a target hard disk for the data access request according to the states of the plurality of hard disks, for:
    根据所述多个硬盘的状态从中选择满足状态条件的目标硬盘,所述状态条件包括下列的部分或全部:硬盘的带宽大于带宽阈值、硬盘的时延小于时延阈值、硬盘正常。According to the status of the plurality of hard disks, a target hard disk that meets the status condition is selected, and the status condition includes part or all of the following: the bandwidth of the hard disk is greater than the bandwidth threshold, the delay of the hard disk is less than the delay threshold, and the hard disk is normal.
  17. 如权利要求15或16所述的装置,其特征在于,所述处理模块在将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中,用于:The device according to claim 15 or 16, wherein the processing module places the command generated based on the data access request in the submission queue of the target hard disk for:
    将基于所述数据访问请求产生的命令插入到所述目标硬盘的提交队列队首;或inserting the command generated based on the data access request into the head of the submission queue of the target hard disk; or
    将基于所述数据访问请求产生的命令放置在所述目标硬盘的多个提交队列中优先级大于阈值的提交队列中。The command generated based on the data access request is placed in a submission queue with a priority greater than a threshold among the plurality of submission queues of the target hard disk.
  18. 如权利要求15~17任一项所述的装置,其特征在于,所述装置还包括指示模块;所述指示模块,用于指示所述目标硬盘暂停所述目标硬盘中的后台操作。The device according to any one of claims 15-17, further comprising an instruction module; the instruction module is configured to instruct the target hard disk to suspend background operations in the target hard disk.
  19. 如权利要求15或16所述的装置,其特征在于,所述处理模块在将基于所述数据访问请求产生的命令放置在所述目标硬盘的提交队列中,用于:The device according to claim 15 or 16, wherein the processing module places the command generated based on the data access request in the submission queue of the target hard disk for:
    将基于所述数据访问请求产生的命令放置在所述目标硬盘的备份盘的提交队列中,所述目标硬盘的备份盘是指与所述目标硬盘保存有相同数据的硬盘。placing the command generated based on the data access request in the submission queue of the backup disk of the target hard disk, where the backup disk of the target hard disk refers to a hard disk storing the same data as the target hard disk.
  20. 如权利要求15~19任一项所述的装置,其特征在于,基于所述数据访问请求产生的命令中包括优先级标识,所述优先级标识用于指示所述命令的优先级。The device according to any one of claims 15-19, wherein the command generated based on the data access request includes a priority identifier, and the priority identifier is used to indicate the priority of the command.
  21. 一种计算设备,其特征在于,包括存储器和处理器;所述存储器存储有程序指令,所述处理器运行所述程序指令以执行权利要求1~10任一所述的方法。A computing device, characterized by comprising a memory and a processor; the memory stores program instructions, and the processor executes the program instructions to execute the method according to any one of claims 1-10.
  22. 一种计算机存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行权利要求1至10任一项所述的方法。A computer storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the method according to any one of claims 1 to 10.
PCT/CN2022/137163 2021-12-21 2022-12-07 Data access method and apparatus, and device WO2023116438A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202111574333 2021-12-21
CN202111574333.1 2021-12-21
CN202210151597.4A CN116301568A (en) 2021-12-21 2022-02-18 Data access method, device and equipment
CN202210151597.4 2022-02-18

Publications (1)

Publication Number Publication Date
WO2023116438A1 true WO2023116438A1 (en) 2023-06-29

Family

ID=86782029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137163 WO2023116438A1 (en) 2021-12-21 2022-12-07 Data access method and apparatus, and device

Country Status (2)

Country Link
CN (1) CN116301568A (en)
WO (1) WO2023116438A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215871A1 (en) * 2004-05-22 2008-09-04 Chan Kam-Fu Swapping "Fixed System" Hard Disk
CN103995674A (en) * 2014-04-17 2014-08-20 华为技术有限公司 Method, device and equipment for processing access requests
CN109343862A (en) * 2018-08-31 2019-02-15 北京三快在线科技有限公司 The dispatching method and device of the resource data of application
CN110532133A (en) * 2019-07-16 2019-12-03 中国科学院国家天文台 A kind of extendible date storage method of low-power consumption large capacity
CN112003915A (en) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 File access method, device, equipment and readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080215871A1 (en) * 2004-05-22 2008-09-04 Chan Kam-Fu Swapping "Fixed System" Hard Disk
CN103995674A (en) * 2014-04-17 2014-08-20 华为技术有限公司 Method, device and equipment for processing access requests
CN109343862A (en) * 2018-08-31 2019-02-15 北京三快在线科技有限公司 The dispatching method and device of the resource data of application
CN110532133A (en) * 2019-07-16 2019-12-03 中国科学院国家天文台 A kind of extendible date storage method of low-power consumption large capacity
CN112003915A (en) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 File access method, device, equipment and readable medium

Also Published As

Publication number Publication date
CN116301568A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN109725829B (en) System and method for end-to-end QoS solution for data storage system
US9692846B2 (en) System, device and method for providing push service using feedback message
EP2284725A1 (en) Client, brokerage server and method for providing cloud storage
CN112130748B (en) Data access method, network card and server
CN110046026B (en) Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform
US20090019223A1 (en) Method and systems for providing remote strage via a removable memory device
US10552089B2 (en) Data processing for managing local and distributed storage systems by scheduling information corresponding to data write requests
US11262916B2 (en) Distributed storage system, data processing method, and storage node
WO2017088572A1 (en) Data processing method, device, and system
US20170153909A1 (en) Methods and Devices for Acquiring Data Using Virtual Machine and Host Machine
CN111782318A (en) Sharing access system and method for remotely mounting local disk to cloud desktop virtual machine
US20210263676A1 (en) Queue management in multi-site storage systems
CN113032099B (en) Cloud computing node, file management method and device
US11010094B2 (en) Task management method and host for electronic storage device
US10970236B2 (en) System and method for optimized input/output to an object storage system
EP4369171A1 (en) Method and apparatus for processing access request, and storage device and storage medium
CN113411363A (en) Uploading method of image file, related equipment and computer storage medium
CN112148206A (en) Data reading and writing method and device, electronic equipment and medium
US10776173B1 (en) Local placement of resource instances in a distributed system
US10545667B1 (en) Dynamic data partitioning for stateless request routing
US8938420B1 (en) Systems and methods for natural batching of I/O operations on a replication log
WO2023116438A1 (en) Data access method and apparatus, and device
CN110798366B (en) Task logic processing method, device and equipment
EP4357949A1 (en) Authentication method and apparatus, and storage system
US20100241817A1 (en) Storage apparatus and method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22909753

Country of ref document: EP

Kind code of ref document: A1