Access scheduling method, controller, tape machine device, and storage system
By constructing a multi-dimensional seek feature profile and using a spatiotemporal augmented sorting method to optimize the tape access sequence, the wear problem caused by the back-and-forth friction of the magnetic head is solved, thereby improving the access efficiency and tape life of the tape drive.
Patent Information
- Application Number
- PCT/CN2025/074434
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-14
- Filing Date
- 2025-01-23
- Publication Date
- 2026-02-19
AI Technical Summary
The greedy strategy employed by the magnetic head during magnetic tape access leads to constant back-and-forth friction, resulting in severe tape wear and shortening its lifespan.
By employing a spatiotemporal augmented sorting method and a directory bucket-based spatiotemporal augmented sorting method, and combining the inherent characteristics and seek characteristics of magnetic tape, a multi-dimensional seek characteristic profile is constructed to determine the optimal access order. This allows the motor to drive the magnetic tape for winding, avoiding wear caused by greedy strategies.
It reduces the latency of motor scheduling in tape drive equipment, improves access efficiency, extends the life of tapes, and enhances the reliability of tape drive equipment.
Smart Images

Figure CN2025074434_19022026_PF_FP_ABST
Abstract
Description
Method, controller, tape drive device and storage system for accessing
[0001] The present application claims priority from the Chinese patent application No. 202411118373.9 filed on August 14, 2024, and entitled "Method, controller, tape drive device and storage system for accessing", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of magnetic tape, and in particular to a method, controller, tape drive device and storage system for accessing. BACKGROUND
[0003] Magnetic tape is the main storage medium in backup and archiving scenarios, with the advantages of low cost, large capacity and long service life. In storage technology, magnetic tape is the best choice for backup, archiving and other scenarios due to its low cost, high reliability and safety. In the process of accessing the magnetic tape by the magnetic head, the motor drives the magnetic tape to wind, so that the magnetic head aligns with the target area in the magnetic tape and reads and writes data in the target area. In the batch data access scenario, after the motor drives the magnetic tape to reach the target area, the magnetic tape is driven to the nearest other area from the target area by using the greedy strategy, so that the magnetic head accesses the other area. Since the purpose of the greedy strategy is to find and read the next area with the nearest distance in the batch data on the magnetic tape, the motor needs to control the magnetic tape to turn around or change lanes constantly, and the magnetic head and the magnetic tape constantly rub back and forth, which causes serious wear of the magnetic tape and reduces the service life of the magnetic tape. SUMMARY
[0004] The present application provides a method, controller, tape drive device and storage system for accessing, which solves the problem of serious wear of the magnetic tape and reduction of the service life of the magnetic tape caused by the constant back-and-forth friction between the magnetic head and the magnetic tape due to the use of the greedy strategy for each IO request in the process of accessing the magnetic tape by the magnetic head, improves the access scheduling performance in the tape drive device, and is beneficial to prolonging the service life of the magnetic tape.
[0005] The present application adopts the following technical solution.
[0006] In a first aspect, the present application provides an access scheduling method. The access scheduling method is applied to a tape drive device, the tape drive device comprising a magnetic head, a magnetic tape and a motor, and the access scheduling method comprising: obtaining an IO stream, and obtaining a plurality of predicted time delays of a plurality of scheduling algorithms according to the IO stream and an initial address of the magnetic head alignment in the magnetic tape. The IO stream comprises a plurality of IO requests, and each IO request comprises an access address. Each of the plurality of scheduling algorithms corresponds to one of the predicted time delays, and each of the plurality of scheduling algorithms comprises one or a combination of the following: a full permutation method, a time-space domain augmented ordering method, a directory bucket-based time-space domain augmented ordering method, and an access address linear ordering method. The time-space domain augmented ordering method is used to determine a first access order of a plurality of access addresses closest to the initial address, and the directory bucket-based time-space domain augmented ordering method is used to determine a second access order of the plurality of access addresses closest to the initial address. Further, the access scheduling method comprises: selecting a target predicted time delay from the plurality of predicted time delays that is less than or equal to a time delay threshold, and controlling the motor to drive the magnetic tape according to a target scheduling algorithm corresponding to the target predicted time delay, so that the magnetic head accesses the magnetic tape according to the access addresses of different IO requests in the plurality of IO requests.
[0007] In an optional implementation, the tape drive device further comprises a processor, and the access scheduling method provided in the first aspect of the present application is executed by the processor in the tape drive device.
[0008] In an optional implementation, the tape drive device is connected with a controller, and the access scheduling method provided in the first aspect of the present application is executed by the controller outside the tape drive device.
[0009] In an optional implementation, in the access orders determined by the time-space domain augmented ordering method and the directory bucket-based time-space domain augmented ordering method, the plurality of access addresses are part or all of the access addresses included in the plurality of IO requests.
[0010] In the first aspect of the present application, the execution time delays of different scheduling algorithms are predicted based on the IO stream, and the target scheduling algorithm corresponding to the target predicted time delay is selected to control the motor, so that the motor drives the magnetic tape to wind the tape, and the magnetic head accesses the region in the magnetic tape. This is beneficial to reduce the time delay required for scheduling the motor in the tape drive device, and improve the access efficiency of the tape drive device. Moreover, since the scheduling algorithms comprise the time-space domain augmented ordering method and the directory bucket-based time-space domain augmented ordering method, the access order of the plurality of access addresses closest to the initial address can be confirmed in the process of time delay prediction, which avoids the problem of serious tape wear caused by the greedy strategy of accessing only one access address closest to the initial address. This is beneficial to determine an optimal access order of the access scheduling in the range of the magnetic tape corresponding to the plurality of access addresses closest to the initial address, improve the access scheduling performance of the tape drive device, and improve the service life of the magnetic tape.
[0011] In an optional implementation of the access scheduling method provided in the first aspect, the target scheduling algorithm is: among the scheduling algorithms corresponding to all the predicted time delays that are less than or equal to the time delay threshold in the plurality of predicted time delays, a scheduling algorithm determined according to the data characteristics of the IO stream. The data characteristics of the IO stream include one or a combination of the following: the number of IO requests in the IO stream, the probability that the access addresses included in different IO requests overlap in the length direction of the magnetic tape, and the distribution characteristics of the access addresses included in different IO requests in the magnetic tape. In the first aspect of the present application, since the target predicted time delay not only satisfies the time delay constraint condition (less than or equal to the time delay threshold), but also the target scheduling algorithm corresponding to the target predicted time delay can be adapted to the data characteristics of the IO stream, the target scheduling algorithm corresponding to the target predicted time delay can determine the optimal access sequence under the time delay constraint condition, so that the target scheduling algorithm has better adaptability to the access addresses corresponding to the IO requests in the magnetic tape, and the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor are guaranteed, which is beneficial to improving the time delay performance and service life of the magnetic tape in the life cycle.
[0012] In an optional implementation of the access scheduling method provided in the first aspect, the target scheduling algorithm is: among the scheduling algorithms corresponding to all the predicted time delays that are less than or equal to the time delay threshold in the plurality of predicted time delays, the scheduling algorithm with the highest priority. The priority of the scheduling algorithm satisfies the following formula: the priority of the full permutation method > the priority of the space-time domain augmented sorting method > the priority of the catalog bucket-based space-time domain augmented sorting method > the priority of the access address linear sorting method. In the first aspect of the present application, since the target predicted time delay not only satisfies the time delay constraint condition (less than or equal to the time delay threshold), but also the target scheduling algorithm corresponding to the target predicted time delay has a higher priority, the target scheduling algorithm corresponding to the target predicted time delay can determine the optimal access sequence under the time delay constraint condition, so that the target scheduling algorithm has better adaptability to the access addresses corresponding to the IO requests in the magnetic tape, and the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor are further guaranteed, which is beneficial to further improving the time delay performance and service life of the magnetic tape in the life cycle.
[0013] In an optional implementation of the access scheduling method provided in the first aspect, if the target scheduling algorithm is the time-space domain augmented ordering method, the controlling the motor to drive the magnetic tape according to the selected target scheduling algorithm includes: obtaining inherent characteristics of the magnetic tape and seek characteristics of the tape drive device, and constructing a multi-dimensional seek characteristic image according to the number of IO requests in the IO stream, the inherent characteristics of the magnetic tape and the seek characteristics. The inherent characteristics of the magnetic tape include one or a combination of the following: length, storage capacity and service life of the magnetic tape; the seek characteristics include one or a combination of the following: maximum speed, cruising speed, read-write speed, acceleration acceleration, deceleration acceleration, lane switching delay, reverse tape delay of the motor, and wear degree of the magnetic tape; the multi-dimensional seek characteristic image is used to determine the seek cost of the tape drive device in multiple dimensions, which includes two or three of the following: seek delay, wear degree of the magnetic tape and wear degree of the motor. And a plurality of seek costs corresponding to the IO stream are obtained according to the multi-dimensional seek characteristic image and the search breadth of the time-space domain augmented ordering method, and the access order corresponding to the minimum seek cost in the plurality of seek costs is used to control the motor to drive the magnetic tape. The search breadth is the number of access addresses of a single seek, and one seek cost corresponds to an access order of a plurality of IO requests.
[0014] In an optional example, the access order corresponding to the minimum seek cost is continuous reading.
[0015] In another optional example, the access order corresponding to the minimum seek cost is interval reading.
[0016] Optionally, the lane switching delay includes the time for the motor to drive the magnetic tape to align one track to another track. The reverse tape delay includes the time for the motor to drive the magnetic tape to switch from a first direction to a second direction, the first direction and the second direction being consistent with the length direction of the magnetic tape and opposite to each other. The wear degree of the magnetic tape includes the number of contacts between the magnetic tape and the magnetic head.
[0017] In an optional implementation of the access scheduling method provided in the first aspect, the time-space domain augmented ordering method includes: a time-space proximity ordering method and an MPSCAN method, the time-space proximity ordering method is used to determine a first sub-access order of a plurality of access addresses closest to the initial address and having the shortest seek distance, and the MPSCAN method is used to determine a second sub-access order of a plurality of access addresses closest to the initial address and having the minimum reverse tape delay and lane switching delay of the motor. The access order corresponding to the minimum seek cost is the first sub-access order or the second sub-access order.
[0018] In an optional implementation of the access scheduling method provided in the first aspect, the multi-dimensional seek characteristic image satisfies the following formula (1). C = ω1 * c seek + ω2 * cabrasion + ω3*c motor ω1+ ω2+ ω3=1 Equation (1)
[0019] Wherein, C is a seek cost, c seek is a cost corresponding to a seek latency, c abrasion is a cost corresponding to a wear degree of the magnetic tape, c motor is a cost corresponding to a wear degree of the motor, ω1 is a cost weight of c seek , ω2 is a cost weight of c abrasion , and ω3 is a cost weight of c motor .
[0020] In combination with the access scheduling method provided in the first aspect, in an optional implementation manner, c seek is determined according to the following information: a seek speed of the magnetic tape, a seek latency, a reverse play latency, a moving distance of the magnetic tape between the first address and the second address, and a time of the magnetic tape between the first address and the second address. abrasion is determined according to the following information: a seek distance between the first address and the second address, a magnetic tape length of an access region corresponding to the second address, a reverse play number of the magnetic tape, and a number of tracks between a track where the first address is located and a track where the second address is located. motor is determined according to the following information: a start number of the motor and a motion time of the motor.
[0021] In the first aspect of the present application, different dimensions are used to evaluate the seek cost, and in the process of access scheduling, the access order determined by the minimum seek cost is used to access the magnetic tape, which is beneficial to reduce the wear between the magnetic tape and the magnetic head or reduce the wear of the motor as much as possible under the condition of meeting the latency constraint, thereby prolonging the service life of the magnetic tape and the service life of the motor, and improving the reliability of the tape drive device.
[0022] In combination with the access scheduling method provided in the first aspect, in an optional implementation manner, the predicted latency of different scheduling algorithms is determined by a latency prediction model, and the access scheduling method provided in the present application further includes: acquiring an execution latency of the target scheduling algorithm, and updating the latency prediction model according to the execution latency and the target predicted latency to obtain an updated latency prediction model.
[0023] In an optional implementation of the method for access scheduling provided in the first aspect, the updating the time delay prediction model according to the execution time delay and the target prediction time delay comprises: obtaining a time delay difference between the execution time delay and the target prediction time delay, taking the time delay difference as an input of a heuristic strategy, and updating the time delay prediction model to obtain the updated time delay prediction model. The heuristic strategy comprises one or a combination of the following: a genetic algorithm, an ant colony algorithm, and a simulated annealing algorithm.
[0024] In the first aspect of the present application, the execution time delay of the target scheduling algorithm in the access scheduling process of the tape drive device is obtained, and the time delay prediction model is updated according to the execution time delay and the prediction time delay of the scheduling algorithm in the access scheduling process. The updated time delay prediction model has better adaptability to different tape motors and tape motors in different degradation states in the life cycle, ensures the time delay prediction accuracy and scheduling performance, and improves the time delay performance in the life cycle of the tape.
[0025] In the second aspect, the present application provides a controller. The controller is applied to a tape drive device, the tape drive device comprising a magnetic head, a magnetic tape, and a motor, the magnetic tape being used to store data, and the controller comprising a transceiver and a processor. The transceiver is used to obtain an IO stream, the IO stream comprising a plurality of IO requests, and the IO request comprising an access address. The processor is used to obtain a plurality of prediction time delays of a plurality of scheduling algorithms according to the IO stream and an initial address of the magnetic head alignment in the magnetic tape. One scheduling algorithm corresponds to one prediction time delay, and one scheduling algorithm comprises one or a combination of the following: a full permutation method, a space-time domain augmented ordering method, a directory bucket-based space-time domain augmented ordering method, and an access address linear ordering method. The space-time domain augmented ordering method is used to determine a first access order of a plurality of access addresses closest to the initial address, and the directory bucket-based space-time domain augmented ordering method is used to determine a second access order of a plurality of access addresses closest to the initial address. The processor is further used to take a prediction time delay less than or equal to a time delay threshold value in the plurality of prediction time delays as a target prediction time delay, and control the motor to drive the magnetic tape according to a target scheduling algorithm corresponding to the target prediction time delay, so that the magnetic head accesses the magnetic tape according to the access address of different IO requests in the plurality of IO requests.
[0026] In the third aspect, the present application provides a tape drive device. The tape drive device comprises a magnetic tape, a magnetic head, a magnetic tape driver, and a controller. The magnetic tape is used to store data. The magnetic head is used to access the magnetic tape. The magnetic tape driver comprises a motor, and is used to drive the magnetic tape. The controller is used to obtain an IO stream, and implement the operation steps of the method provided in the first aspect or any optional implementation of the first aspect. The controller is the controller provided in the second aspect.
[0027] In a fourth aspect, the present application provides a storage system. The storage system comprises a controller and one or more tape drive devices. The controller is configured to manage a target tape drive device in the one or more tape drive devices, and the controller is configured to obtain an IO stream and perform the operation steps of the method according to the first aspect or any possible implementation of the first aspect. The controller is the same as the controller according to the second aspect.
[0028] In a fifth aspect, the present application provides a computer readable storage medium. The computer readable storage medium comprises computer instructions. When the computer instructions are run in an electronic device, the electronic device performs the operation steps of the method according to the first aspect or any possible implementation of the first aspect. The electronic device is the same as the controller according to the second aspect, the tape drive device according to the third aspect, or the storage system according to the fourth aspect.
[0029] In a sixth aspect, the present application provides a computer program product. When the computer program product is run in an electronic device, the electronic device performs the operation steps of the method according to the first aspect or any possible implementation of the first aspect. The electronic device is the same as the controller according to the second aspect, the tape drive device according to the third aspect, or the storage system according to the fourth aspect.
[0030] The beneficial effects of the second aspect to the sixth aspect can refer to the description of the first aspect or any possible implementation of the first aspect, and will not be repeated here. Based on the implementation manners of the above aspects, the present application can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0031] FIG. 1 is a structural schematic diagram of a data access system according to the present application.
[0032] FIG. 2 is a structural schematic diagram of a tape drive device according to the present application.
[0033] FIG. 3 is a structural schematic diagram of a reel 201 and a magnetic tape 210 according to the present application.
[0034] FIG. 4 is a structural schematic diagram of a magnetic tape 210 according to the present application.
[0035] FIG. 5 is a software structure diagram of an access scheduling according to the present application.
[0036] FIG. 6 is a flow schematic diagram of an access scheduling method according to the present application.
[0037] FIG. 7A is a schematic diagram of data characteristics according to the present application.
[0038] FIG. 7B is a flow schematic diagram of an access scheduling method according to the present application.
[0039] FIG. 8 is a flowchart illustrating a method of scheduling access according to an embodiment of the present application.
[0040] FIG. 9 is a schematic diagram illustrating a comparison between continuous reading and interval reading according to an embodiment of the present application.
[0041] FIG. 10 is a flowchart illustrating a method of scheduling access according to an embodiment of the present application.
[0042] FIG. 11 is a flowchart illustrating a method of scheduling access according to an embodiment of the present application.
[0043] FIG. 12 is a flowchart illustrating a method of scheduling access according to an embodiment of the present application.
[0044] FIG. 13 is a schematic diagram illustrating a structure of a controller according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] The present application provides a method of scheduling access, a tape drive device and a storage system. The trained time delay prediction model is used to predict the execution time delay of the IO stream under different scheduling algorithms, and the scheduling algorithm corresponding to the minimum predicted time delay is selected to control the motor, so that the motor drives the tape to be wound, and the area in the tape is accessed by the magnetic head. This is conducive to reducing the time delay required for scheduling the motor in the tape drive device and improving the access efficiency of the tape drive device. The time delay prediction model can be determined according to the seek characteristics of the motor, such as the maximum speed, cruising speed, read / write speed, acceleration acceleration, deceleration acceleration, lane change time delay and reverse tape time delay of the motor, but not limited to these.
[0046] The technical solutions involved in the present application can not only be applied to the current tape technology or storage device, but also can be applied to the future tape technology or storage device, or a storage system including a tape drive device or a storage device, such as a tape system or a tape library. The terms used in the embodiment part of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. First, some concepts that can be involved in the present application are briefly introduced.
[0047] Storage medium: a storage material for recording sound, image, digital or other signals. The storage material can include but is not limited to magnetic tape, such as magnetic tape refers to a tape-shaped material with a magnetic layer for recording sound, image, digital or other signals. The magnetic tape is attached with a magnetic medium, such as magnetic powder, for storing data. For example, the magnetic field change in the magnetic medium is usually formed by coating a layer of granular magnetic material on a plastic film tape base (support or support) or evaporating and depositing a layer of magnetic oxide or alloy thin film. The tape base of the magnetic tape can include but is not limited to paper, cellophane or polyester film, etc.
[0048] Header: A component that reads and writes magnetic media on a magnetic tape by magnetic principle, divided into write head and read head. Write head records data by magnetizing to change the magnetic field of magnetic media (such as magnetic powder), and read head reads data on the magnetic media by inducting the magnetic field of the magnetic media.
[0049] The neural network can be composed of neurons, and the neuron can refer to an x s An operation unit with intercept 1 as input. The output of the operation unit satisfies the following formula (2).
[0050] Where h W,b is the output of the operation unit, x is the input of the operation unit, s = 1, 2, … n, n is a natural number greater than 1, W s is the weight of x s , and b is the bias of the operation unit. f is the activation function of the neuron, which is used to introduce non-linear characteristics into the neural network to convert the input signal in the neuron into the output signal. The output signal of the activation function can be used as the input of the next layer, and the activation function can be a sigmoid function. The neural network is a network formed by connecting a plurality of the above single neurons, that is, the output of one neuron can be the input of another neuron. The input of each neuron can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, and the local receptive field can be a region composed of a plurality of neurons. The weight represents the strength of the connection between different neurons. The weight determines the influence of the input on the output. A weight close to 0 means that changing the input does not change the output. A negative weight means that increasing the input reduces the output. In some possible embodiments, the input signal of the neural network can be a video signal, an image signal, matrix data, graph structure data (graph data), and various forms of signals. The input signal of the neural network also includes other various computer processable engineering signals, which are not listed one by one here. If the neural network is used for deep learning of base station character recognition, the accuracy of the neural network base station character recognition can be improved.
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the drawings.
[0052] Hereinafter, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", and the like can explicitly or implicitly include one or more features. In the description of the present application, unless otherwise stated, the meaning of "a plurality of" is two or more.
[0053] In addition, in the present application, the orientation terms such as "upper", "lower" and the like are defined relative to the orientation in which the components in the drawings are shown, and it should be understood that these directional terms are relative concepts, which are used for relative description and clarification, and can change accordingly according to the change of the orientation in which the components in the drawings are placed.
[0054] First, the application scenario to which the embodiments of the present application are applied will be introduced below with reference to the drawings. Fig. 1 is a schematic structural diagram of a data access system provided by the present application. The data access system comprises a data access device 100 and a storage device 120. In the application scenario shown in Fig. 1, a user accesses data through an application program. The computer running these application programs can be referred to as a "computing device".
[0055] The data access device 100 can be a physical machine, or a virtual machine or a container. The physical machine can include, but is not limited to, one or both of a user terminal and a smart NIC. For example, the data access device 100 includes a user terminal. The user terminal can refer to a client, such as a host, a desktop computer, a server, a notebook computer, a mobile device, and the like. For another example, the data access device 100 includes a smart NIC. The smart NIC, also known as a smart network adapter, in addition to being able to complete the network transmission function possessed by a standard network card, also provides a built-in programmable and configurable hardware acceleration engine, which improves the performance of the application and greatly reduces the consumption of the CPU in the host connected to the smart NIC in communication, and provides more CPU resources for the application. For example, in a highly virtualized environment, the CPU in the host needs to run open virtual switch (OVS) related tasks, and at the same time, the CPU in the host also needs to process storage, online or offline encryption and decryption of data packets, deep packet inspection, firewall, complex routing and other operations, which not only consume a large amount of CPU resources, but also cause the performance of the service to be unable to be brought to the best due to the contention of CPU resources between different services. The smart NIC serves as a hub connecting various services, and accelerates the above services on the smart NIC.
[0056] In one possible example, the data access device 100 accesses the storage device 120 through a network to access data, for example, the network can include a switch 110.
[0057] In another possible example, the data access device 100 can also communicate with the storage device 120 through a wired connection, for example, a universal serial bus (USB) or a peripheral component interconnect express (PCIe) bus, and the like.
[0058] The storage device 120 shown in FIG. 1 can be a centralized storage system. The centralized storage system is characterized by having a unified entry through which all data from external devices pass, and the entry is the engine 121 of the centralized storage system. The engine 121 has a management function, and many advanced functions of the storage system are implemented therein.
[0059] As shown in FIG. 1, the engine 121 can have one or more controllers, and FIG. 1 illustrates an example in which the engine 121 includes one controller. In a possible example, if the engine 121 has multiple controllers, any two controllers can have a mirror channel therebetween to implement a function of backing up each other, thereby avoiding a hardware failure to cause the entire storage device 120 to be unavailable. It should be understood that if the engine 121 includes multiple controllers, the engine 121 can also be referred to as an array controller of the storage device 120.
[0060] The engine 121 also includes a front-end interface 1211 and a back-end interface 1214, where the front-end interface 1211 is used to communicate with the data access device 100, thereby providing data access services for the data access device 100. The back-end interface 1214 is used to communicate with hard disks to expand the capacity of the storage device 120. Through the back-end interface 1214, the engine 121 can connect more hard disks, thereby forming a very large storage resource pool.
[0061] In hardware, as shown in FIG. 1, the controller includes at least a processor 1212 and a memory 1213. The processor 1212 is a central processing unit (CPU) for processing data access requests from outside the storage device 120 (servers or other storage systems) and for processing requests generated inside the storage device 120. For example, when the processor 1212 receives a write data request sent by the data access device 100 through the front-end interface 1211, the processor 1212 temporarily saves the data in the write data request in the memory 1213. When the total amount of data in the memory 1213 reaches a certain threshold, the processor 1212 sends the data stored in the memory 1213 to at least one of the mechanical hard disk 1221, the solid state drive (SSD) 1222, the tape device 200, or other hard disks 1224 through the back-end port for persistent storage.
[0062] The memory 1213 refers to an internal memory that exchanges data directly with the processor. It can read and write data at any time and has a very fast speed, and is used as a temporary data storage for the operating system or other programs running at the moment. The memory includes at least two types of memories, for example, the memory can be a random access memory or a read only memory (ROM). For example, the random access memory is a DRAM or an SCM. The DRAM is a semiconductor memory, and like most random access memories (RAMs), it is a volatile memory device. However, the DRAM and the SCM are only exemplary in this embodiment, and the memory can also include other random access memories, such as static random access memories (SRAM) and the like. As for the read only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), and the like. In addition, the memory 1213 can also be a dual in-line memory module (DIMM), that is, a module composed of dynamic random access memories (DRAM), and can also be an SSD. In practical applications, multiple memories 1213 can be configured in the controller, and different types of memories 1213 can be configured. This embodiment does not limit the number and type of the memory 1213. In addition, the memory 1213 can be configured to have a power retention function. The power retention function refers to that when the system is powered off and then powered on again, the data stored in the memory 1213 will not be lost. The memory with the power retention function is called a non-volatile memory. The memory 1213 stores software programs, and the processor 1212 runs the software programs in the memory 1213 to achieve the management of the hard disk. For example, the hard disk is abstracted as a storage resource pool, and the storage resource pool is provided to the server in the form of a logical unit number (LUN). The LUN is actually the hard disk seen on the server. Of course, some centralized storage systems themselves are file servers, which can provide shared file services for servers.
[0063] As shown in FIG. 1, in the system, the engine 121 can not have a hard disk slot, and the hard disk needs to be placed in the disk frame 122, and the back-end interface 1214 communicates with the disk frame 122. The back-end interface 1214 exists in the engine 121 in the form of an adapter card, and two or more back-end interfaces 1214 can be used simultaneously on one engine 121 to connect multiple disk frames. Alternatively, the adapter card can also be integrated on the mainboard, at which time the adapter card can communicate with the processor 1212 through the PCIe bus.
[0064] It should be noted that only one engine 121 is shown in FIG. 1, but in actual application, two or more engines 121 can be included in the storage system, and redundancy or load balancing is performed between the multiple engines 121.
[0065] The disk frame 122 includes a control unit 1225 and several hard disks. The control unit 1225 can have various forms. In one case, the disk frame 122 belongs to a smart disk frame, as shown in FIG. 1, and the control unit 1225 includes a CPU and a memory. The CPU is used to perform address conversion and read and write data operations. The memory is used to temporarily store data to be written to the hard disk or data read from the hard disk to be sent to the controller. In another case, the control unit 1225 is a programmable electronic component, such as a data processing unit (DPU). The DPU has the versatility and programmability of the CPU, but is more specialized and can efficiently operate on network packets, storage requests, or analysis requests. The DPU is distinguished from the CPU by a greater degree of parallelism (a large number of requests need to be processed). Optionally, the DPU here can also be replaced by a graphics processing unit (GPU), an embedded neural-network processing unit (NPU), etc. In general, the number of control units 1225 can be one, two, or more. The functions of the control unit 1225 can be offloaded to the network card 1226. In other words, in this embodiment, the disk frame 122 does not have a control unit 1225 inside, but the network card 1226 is used to complete data read and write, address conversion, and other computing functions. At this time, the network card 1226 is a smart network card. It can contain a CPU and a memory. The CPU is used to perform address conversion and read and write data operations. The memory is used to temporarily store data to be written to the hard disk or data read from the hard disk to be sent to the controller. It can also be a programmable electronic component, such as a DPU. The network card 1226 in the disk frame 122 has no ownership relationship with the hard disks, and the network card 1226 can access any hard disk in the disk frame 122 (such as the mechanical hard disk 1221, the solid state disk 1222, the tape drive device 200, and other hard disks 1224 shown in FIG. 1), so it is more convenient to expand the hard disk when the storage space is insufficient.
[0066] In the embodiments of the present application, the tape drive device 200 refers to a storage device including a magnetic tape medium. In terms of hardware implementation, the tape drive device can include but is not limited to a magnetic head, a magnetic tape, and a tape drive. The tape drive can be used to drive the magnetic tape to be wound, and the magnetic head can access the magnetic tape during winding, such as writing data to the magnetic tape or reading data from the magnetic tape. The specific implementation of the tape drive device can refer to the embodiments shown in FIGS. 2 to 5 below, which will not be described here.
[0067] According to the type of the communication protocol between the engine 121 and the disk frame 122, the disk frame 122 can be a serial attached small computer system interface (SAS) disk frame connected in series, or an NVMe (Non-Volatile Memory express) disk frame, or other types of disk frames. The SAS disk frame adopts the SAS3.0 protocol, and each frame supports 25 SAS hard disks. The engine 121 is connected with the disk frame 122 through a built-in SAS interface or a SAS interface module. The NVMe disk frame is more like a complete computer system, and the NVMe hard disk is inserted into the NVMe disk frame. The NVMe disk frame is connected with the engine 121 through an RDMA port. In some cases, the engine 121 can also be referred to as a hard disk management device or a storage controller.
[0068] In terms of hardware implementation, the disk frame 122 can be installed in a storage system, or the disk frame 122 can be packaged and independently arranged. When the disk frame 122 exists independently, the disk frame 122 can also be referred to as a storage device or a storage system, which is not limited in the present application.
[0069] In an optional implementation, the storage device 120 is a centralized storage system with a disk control unit, and the storage device 120 does not have the disk frame 122 described above. The engine 121 is used to manage a plurality of hard disks connected through hard disk slots. The function of the hard disk slot can be implemented by the back-end interface 1214.
[0070] In other optional implementations, the storage device 120 is a distributed storage system. The distributed storage system includes a computing node cluster and a storage node cluster. The computing node cluster includes one or more computing nodes, and the computing nodes can communicate with each other. The computing node can be a server, a desktop computer, or a controller of a storage array, etc. In terms of hardware, the computing node can include a processor, a memory, a network card, etc. The processor is a CPU, which is used to process data access requests from outside the computing node, or requests generated inside the computing node. For example, when the processor receives a write data request sent by a user, the processor temporarily saves the data in the write data request in the memory. When the total amount of data in the memory reaches a certain threshold, the processor sends the data stored in the memory to the storage node for persistent storage. In addition, the processor is also used for data computing or processing, such as metadata management, data deduplication, data compression, virtualization of storage space, address translation, etc. In the embodiments provided in the present application, the storage node can be a tape drive device or other types of hard disks, etc. It can be understood that the storage system described in the embodiments of the present application can be a distributed storage system with storage and computing integrated, or a distributed storage system with storage and computing separated, which is not limited in the present application.
[0071] For example, the distributed storage system can be implemented by network attached storage (NAS) technology. NAS refers to a network storage architecture that provides storage resources through file-level data access and sharing based on an Internet Protocol (IP) network. In a NAS scenario, the NAS is an external device for a server / host, and the NAS is used to provide file-level storage space for the server / host in the distributed storage system.
[0072] It should be noted that the above examples only provide possible implementations of the data access system of the present embodiment, and should not be construed as a limitation of the present application. For example, in the storage device 120 shown in FIG. 1, data is stored in the form of files on each hard disk. The files stored in each hard disk constitute a file storage system, for example, a distributed file system. For example, a network file system (NFS) is a distributed file system and also a network protocol for accessing and sharing files between devices on the same local area network. For example, a NAS system can be implemented by an NFS protocol. The network file system is a low-cost network file sharing option that enables users and applications to access, store, and update files on remote computers, just like using direct-attached storage. The network file system uses a remote procedure call protocol to route requests between clients and servers. Although the devices involved need to support the network file system, they do not need to understand the details of the network. It should be noted that remote procedure calls can not be secure, so the network file system should only be deployed on trusted networks behind a firewall. Although Windows supports the protocol, the protocol is mainly used in a Linux environment.
[0073] For the above-mentioned tape device 200, an optional example is provided in the present embodiment, as shown in FIG. 2, which is a structural schematic diagram of a tape device provided by the present application. The tape device 200 can be used to implement the functions of the above-mentioned tape device 200. In this document, the tape device can also be referred to as a tape medium storage, a tape device, a tape all-in-one, an all-in-one tape disk, an all-in-one tape device, or a magnetoelectric disk, etc., which is not limited in the present application.
[0074] Next, the tape device will be described by way of example in conjunction with FIG. 2. The tape device 200 includes a tape 210, a tape drive 220, a head 230, a reel 201, a roller 202, a base 203, and a processor 240.
[0075] The reel 201 and the base 203 are rotationally connected, and the tape 210 is wound around (disposed around) the reel 201.
[0076] For the structural relationship between the reel 201 and the magnetic tape 210, an exemplary illustration is provided in conjunction with FIG. 3, which is a structural diagram of a reel 201 and a magnetic tape 210 provided in the present application. Referring to FIG. 3, the reel 201 includes a reel shaft 2013, a first cover plate 2011, and a second cover plate 2012. The reel shaft 2013 is rotationally connected to the base 203 shown in the aforementioned FIG. 2. The magnetic tape 210 is located between the first cover plate 2011 and the second cover plate 2012. The first cover plate 2011 and the second cover plate 2012 can constrain the magnetic tape 210 to avoid the magnetic tape 210 from disengaging from the reel shaft 2013. During the rotation of the reel shaft 2013, the first cover plate 2011 and the second cover plate 2012 rotate synchronously.
[0077] The first cover plate 2011 can be a circular plate structure as shown in FIG. 3, and the second cover plate 2012 can be a circular plate structure as shown in FIG. 3.
[0078] The embodiments of the present application do not limit the shapes of the first cover plate 2011 and the second cover plate 2012. For example, the first cover plate 2011 can be a circular, square, elliptical, or irregularly shaped plate body. Similarly, the second cover plate 2012 can be a circular, square, elliptical, or irregularly shaped plate body. The shape of the first cover plate 2011 can be the same as or different from the shape of the second cover plate 2012.
[0079] Exemplarily, the connection manner between the first cover plate 2011 and the reel shaft 2013 can be, for example, welding, clamping, or bonding, etc. Similarly, the connection manner between the second cover plate 2012 and the reel shaft 2013 can be, for example, welding, clamping, or bonding, etc.
[0080] Referring back to FIG. 2, the tape drive device 200 includes two reels 201. The head end of the magnetic tape 210 is wound on one reel 201, and the tail end of the magnetic tape 210 is wound on the other reel 201.
[0081] During the winding of the magnetic tape 210, to avoid the magnetic head scratching the magnetic tape 210, the rollers 202 in the tape drive device 200 can be used to support the tape body of the magnetic tape 210, so as to reduce the friction between the magnetic tape 210 and the magnetic head during the winding of the magnetic tape 210, and to facilitate the improvement of the service life of the magnetic tape 210.
[0082] According to the embodiments provided in conjunction with FIG. 2 and FIG. 3, the magnetic tape 210 is used to store data, and the magnetic tape drive 220 is used to drive the magnetic tape 210 to wind. The magnetic head in the tape drive device 200 accesses the magnetic tape 210 during the winding of the magnetic tape 210. The processor 240 is used to control the speed of the magnetic tape drive 220 driving the magnetic tape 210 and to control the sliding of the magnetic head 230 to access the magnetic tape region in the magnetic tape 210 according to the IO flow.
[0083] The processor 240 includes, for example, a processor, a memory, and the like. The processor is a CPU for processing data access requests (e.g., IO requests) from outside the tape device 200 (a server or other storage system) and for processing requests generated inside the tape device 200. For example, when the processor receives a write data request from a data access device or host through a front-end interface, the processor temporarily stores data in the write data request in the memory. When the total amount of data in the memory reaches a certain threshold, the processor stores the data stored in the memory to the tape 210 through a back-end port for persistent storage.
[0084] As shown in FIG. 2, as an optional implementation, the tape drive 220 includes a capstan motor and a voice coil motor (VCM) motor.
[0085] The capstan motor is configured to drive the tape 210 to move in the length direction of the tape 210. For example, the capstan motor can be configured to drive a spool to move the tape wound on the spool to rewind in a first direction, rewind in a second direction, or stop rewinding, the first direction and the second direction being two opposite directions in the length direction of the tape.
[0086] The VCM motor is configured to drive the tape 210 to move in the width direction of the tape 210, so that the head 230 accesses different tracks in the tape 210. The VCM is a direct drive motor, and the working principle of the VCM includes that a coil placed in a magnetic field generates a force, the size of the force being proportional to the current applied to the coil. The VCM based on this principle works in a linear or circular arc form.
[0087] Optionally, the tape drive 220 can further include a stepping motor configured to finely control the position or speed of the tape 210 in the length direction of the tape 210. The stepping motor is an electric motor that converts an electrical pulse signal into a corresponding angular displacement or linear displacement. For each input pulse signal, the rotor rotates an angle or moves forward by a step, and the output angular displacement or linear displacement is proportional to the number of input pulses, and the rotation speed is proportional to the pulse frequency. Therefore, the stepping motor is also called a pulse motor.
[0088] It is worth noting that the above capstan motor, VCM motor, and stepping motor are only examples provided by the embodiments of the present application, and should not be construed as a limitation of the present application. The tape drive 220 can further include a linear motor, a hydraulic cylinder, or a cylinder, and the like, which are not limited by the present application.
[0089] As an optional implementation, the magnetic head 230 can include one or both of a write data head and a read data head. The write data head records data by magnetizing a magnetic medium (such as a magnetic powder), and the read data head reads data on the magnetic medium by sensing a magnetic field of the magnetic medium.
[0090] In some optional manners, the magnetic head 230 can further include a servo head, which can be divided into a write servo head and a read servo head. Taking the read servo head as an example, the read servo head can determine position information of the magnetic tape 210 according to an address in an IO request, and the magnetic tape 210 is wound from a current position of the magnetic tape 210 to a target magnetic tape area indicated by the position information by the magnetic tape drive 220, so that the data stored in the target magnetic tape area is read by the read data head.
[0091] It can be understood that the magnetic tape device 200 can also be deployed with an application (APP) and a driver. The application can be used to obtain a data access request (such as a read request or a write request), or send an access response to the host, such as a write response or a read response. For example, after the application triggers a read-write operation, the IO data stream is issued to the firmware corresponding to the magnetic tape 210 through the driver, and the firmware issues instructions to control the motor to drive the tape body of the magnetic tape 210 to do linear addressing. After reaching the desired magnetic tape position, the magnetic head encodes and decodes through the ADC / DAC channel to realize the read-write operation.
[0092] In view of the structure of the magnetic tape 210, an exemplary illustration is made in combination with FIG. 4, which is a structural schematic diagram of a magnetic tape 210 provided by the present application. In hardware implementation, the magnetic tape 210 can include one or more data bands, such as data band 1 to data band 4. The data band is a data track on the magnetic tape 210, and different data bands are separated and positioned by servo bands, and multiple data bands are arranged side by side along the length direction of the magnetic tape 210. Each data band contains multiple wraps, that is, data transmission from one end of the magnetic tape 210 to the other end. Each wrap includes one or more tracks, and each track is accessed by one read / write head. The number and size of the data bands in the magnetic tape 210 depend on the generation and capacity of the magnetic tape. The wrap is a term in the magnetic tape, and the wrap refers to the movement of the magnetic head on a data band.
[0093] Taking the data band 1 in the magnetic tape 210 as an example, the data band 1 includes multiple tracks, such as track 1 and track 2. In the magnetic tape 210, different tracks are arranged side by side along the width direction of the magnetic tape 210. The track is a magnetic area in the magnetic tape for recording data. In the magnetic tape technology, the storage of data on the magnetic tape 210 is realized by magnetization of the magnetic head 230 on the track.
[0094] The magnetic tape 210 shown in FIG. 4 is only an optional mode provided by the embodiment of the present application. According to the capacity of the magnetic tape 210 and the user demand, more or less data bands can be arranged in the magnetic tape 210, or the magnetic tape 210 can also have more or less number of tracks, which is not limited in the present application.
[0095] The in-disk IO scheduling framework provided by the embodiment of the present application will be exemplarily described below in combination with FIG. 5, which is a software structure diagram of access scheduling provided by the present application. Please refer to FIG. 5, the software structure includes a time-space domain augmented ordering module 200a and a learning-type planning module 200b. In some optional cases, the software architecture of access scheduling shown in FIG. 5 is also referred to as an in-disk IO scheduling framework, and the disk can refer to the disk frame 122 described above, or can refer to the tape drive device 200, which is not limited in the present application.
[0096] The time-space domain augmented ordering module 200a is configured to order the default request sequence, and the learning-type planning module 200b is configured to optimize the scheduling algorithm corresponding to the recommended request sequence according to the access latency of the recommended request sequence, and update the optimization result to the time-space domain augmented ordering module 200a. In addition, the learning-type planning module 200b is also configured to optimize the latency prediction model according to the execution latency of the recommended request sequence generated by the scheduling algorithm, and update the optimization result to the time-space domain augmented ordering module 200a.
[0097] In an optional example, the time-space domain augmented ordering module 200a and the learning-type planning module 200b are two processing chips with different functions, which can be integrated on the processor 240 of the tape drive device 200, or can be independently arranged on other circuit boards outside the processor 240. In addition, the two processing chips can also be connected with the processor 240 through electrical connection or communication connection, and are arranged outside the tape drive device 200, rather than inside the tape drive device 200.
[0098] In another optional example, the time-space domain augmented ordering module 200a and the learning-type planning module 200b are two components with different functions. The component can be arranged on the processor 240 of the tape drive device 200 in the form of a software module or a software unit, or can be arranged on other processing chips or processing devices electrically connected or communicatively connected with the tape drive device 200, such as the control unit 1225 in the disk frame 122, the controller included in the engine 121, or the engine 122.
[0099] The above two optional examples are only feasible modes of the time-space domain augmented ordering module 200a and the learning-type planning module 200b provided by the embodiment of the present application, and should not be understood as a limitation of the present application.
[0100] The functions of the spatiotemporal augmented sequencing module 200a and the learning planning module 200b are exemplarily described below in connection with (1) to (4) shown in FIG. 5.
[0101] (1) The spatiotemporal augmented sequencing module 200a determines a multi-dimensional seek feature image corresponding to a default request sequence according to the head position, the tape seek characteristics, and the number of IO requests, and the like.
[0102] The default request sequence includes a plurality of IO requests, such as the IO request 1 to the IO request 4 in FIG. 5. In FIG. 5, the circle graphics are different IO requests. In the default request sequence, the access paths of the plurality of IO requests are long, the access time delays are large, and the contact distances between the head and the tape are long, and the tape wear is large. The multi-dimensional seek feature image is used to determine the seek cost of the plurality of IO requests under different access sequences. The specific implementation of the multi-dimensional seek feature image can be referred to the description of FIG. 8 below, and is not described herein.
[0103] (2) Output: After the spatiotemporal augmented sequencing module 200a determines the recommended request sequence with the minimum seek cost in different dimensions such as seek time delay, tape wear, and motor wear, the recommended request sequence is output.
[0104] The recommended request sequence also includes the plurality of IO requests described above, such as the IO request 1 to the IO request 4 in FIG. 5. The recommended request sequence is different from the default request sequence in that the access paths of the plurality of IO requests are short, the access time delays are small, the contact distances between the head and the tape are short, and the tape wear is small.
[0105] (3) Dynamic feedback: The learning planning module 200b acquires the execution time delay of the recommended request sequence. The execution process not only satisfies the time delay constraint condition, but also achieves the expected wear target. The time delay constraint condition can be a set time delay threshold, and the wear target can include but is not limited to the tape wear or the motor wear in the tape drive device.
[0106] (4) Update: The learning planning module 200b optimizes the scheduling algorithm used to generate the recommended request sequence and the time delay prediction model including the scheduling algorithm according to the execution time delay of the recommended request sequence, and updates the optimization result to the spatiotemporal augmented sequencing module 200a.
[0107] Exemplarily, the scheduling algorithm includes one or a combination of the following: a full permutation method, a space-time domain augmented ordering method, a catalog bucket based space-time domain augmented ordering method, an access address linear ordering method, a first come first service (FCFS) method. For specific implementation of each scheduling algorithm, refer to the description related to S620 below, which is not repeated here.
[0108] It is worth noting that the software framework shown in FIG. 5 is only an optional way provided by the embodiments of the present application, and should not be understood as a limitation of the present application. In some optional implementations, the space-time domain augmented ordering module 200a and the learning planning module 200b can also be pushed to the tape drive device 200 or the storage system containing the tape drive device 200 through firmware upgrade, application version update or subscription service,
[0109] The access scheduling method provided by the embodiments of the present application will be exemplarily described below based on FIGS. 1-5. FIG. 6 is a flowchart of an access scheduling method provided by the present application. The access scheduling method is applied to a tape drive device, such as the tape drive device 200 described above.
[0110] The access scheduling method provided by the embodiments of the present application can be executed by a processor in the tape drive device, or by other computing devices in communication with the tape drive device. Exemplarily, the other computing devices refer to a controller in a storage system (such as a tape system) to which the tape drive device belongs. The controller can be, for example, the aforementioned control unit 1225, a controller included in the engine 121, or the engine 121, etc.
[0111] The access scheduling method provided by the embodiments of the present application is exemplarily described by taking the controller as an example. The controller can be deployed with a time delay prediction model, or the controller can call the time delay prediction model through an application programming interface (API). The time delay prediction model is used to predict the predicted time delay of the IO stream.
[0112] Exemplarily, the time delay prediction model includes one or a combination of the following: an artificial neural network (ANN), a convolutional neural network (CNN), and a deep neural network (DNN). The ANN is also called a neural network.
[0113] A deep neural network (DNN) is also called a multi-layer neural network, which can be understood as a neural network with many hidden layers, where "many" is not particularly measured. From the position of different layers, the neural network inside the DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally, the first layer is the input layer, the last layer is the output layer, and the number of layers in between is the hidden layer. The layers are fully connected, that is, any neuron in the i-th layer is connected to any neuron in the i+1-th layer.
[0114] A convolutional neural network (CNN) is a deep neural network with a convolutional structure. The convolutional neural network includes a feature extractor composed of a convolutional layer and a subsampling layer. The feature extractor can be regarded as a filter, and the convolution process can be regarded as using a trainable filter to convolve with an input image or a convolution feature plane. The convolutional layer refers to the neuron layer in the convolutional neural network that performs convolution processing on the input signal. In the convolutional layer of the convolutional neural network, a neuron can be connected only to part of the adjacent layer neurons. A convolutional layer usually includes several feature planes, and each feature plane can be composed of some rectangularly arranged neural units. The neural units in the same feature plane share weights, where the shared weights are convolution kernels. The shared weights can be understood as the way of extracting image information regardless of the position. The implicit principle is that the statistical information of a part of the image is the same as that of other parts. That is, the image information learned in a part can also be used in another part. Therefore, the same learned image information can be used for all positions on the image. In the same convolutional layer, multiple convolution kernels can be used to extract different image information. Generally, the more the number of convolution kernels, the more the image information reflected by the convolution operation.
[0115] It is worth noting that more information about ANN, CNN and DNN can be referred to the description of the general technology, and the specific type of neural network used by the time delay prediction model is not limited in the application.
[0116] As an optional implementation, the time delay prediction model can be determined according to the current position of the magnetic head, the inherent characteristics and the seek characteristics of the tape drive device, and the specific content of the inherent characteristics and the seek characteristics of the tape drive device can be referred to the description related to FIG. 8 in the following embodiments, which will not be repeated here.
[0117] Referring to FIG. 6, the access scheduling method provided by the embodiments of the application includes the following S610-S630.
[0118] S610, the controller acquires the IO stream.
[0119] For example, the IO stream can also be referred to as an IO data stream, which includes a plurality of IO requests, also referred to as access requests, such as IO request 1 to IO request 4. Each IO request includes an access address.
[0120] In a first possible example, the IO stream includes a plurality of IO requests from a same data access device, which can be a host, a user device, a server, or another type of device, etc.
[0121] In a second possible example, the IO stream includes a plurality of IO requests from a same application.
[0122] For example, the application can be deployed on a single device, such as the device being the host or the data access device described above.
[0123] For another example, the application can be deployed on a distributed system, which includes a plurality of devices, each device deploying a complete application program, or each device deploying a part of the program code of the application program. For example, the application can include, but is not limited to, an artificial intelligence application, a distributed application, etc., such as the distributed application being an application program distributed on different computers to jointly complete a task through a network.
[0124] In a third possible example, the IO stream includes a plurality of IO requests belonging to a same task. For example, the task can be a read task or another data access task, etc. The task can be a data access task issued by a single application, or a data access task of a plurality of applications managed by a data access interface, which is not limited in the present application.
[0125] The above three possible examples are only optional modes of the IO stream provided by the embodiments of the present application. The data indicated by the plurality of IO requests belonging to the same IO stream flows from one storage location to another storage location, and the direction of the IO stream can be input (reading data from a target storage device) or output (writing data to a target storage device). In some optional cases, the IO stream can also be referred to as a request sequence, a data request stream, or other names, which is not limited in the present application.
[0126] S620, obtaining a plurality of predicted time delays of a plurality of scheduling algorithms according to the IO stream and the initial address of the head alignment in the magnetic tape.
[0127] The initial address of the head alignment in the magnetic tape is the address of the magnetic tape region corresponding to the head alignment, i.e., the current position of the head alignment in the magnetic tape. For example, before the controller receives the IO stream, the current magnetic tape region of the head alignment is the initial address of the head. In some optional cases, the initial address is also referred to as the current address, the start address, or the starting address of the head alignment in the magnetic tape, which is not limited in the present application. It is worth noting that in some optional manners, the initial address of the head can also refer to the fixed magnetic tape region to which the head resets after the head performs one or more accesses to the magnetic tape, and the fixed magnetic tape region is the initial address of the head.
[0128] In S620, a scheduling algorithm corresponds to a predicted latency. As shown in FIG. 6, the scheduling algorithm 1 corresponds to the predicted latency 1, and the scheduling algorithm 2 corresponds to the predicted latency 2. In the embodiment of the present application, the predicted latency corresponding to the scheduling algorithm refers to the predicted value of the execution latency of the scheduling algorithm. That is, the predicted latency includes the predicted value of the time required for sorting the IO requests in the IO stream according to the scheduling algorithm.
[0129] In the embodiment of the present application, the scheduling algorithm includes one or a combination of the following: a full permutation method, a time-space domain augmented sorting method, a directory bucket-based time-space domain augmented sorting method, an access address linear sorting method, and a first come first served (FCFS) method.
[0130] The full permutation method refers to analyzing and arranging the access modes of all IO requests in the IO stream in different dimensions after receiving the IO stream to determine the optimal access order. It should be noted that in the case of a large number of IO requests in the IO stream, the full permutation method takes a long time.
[0131] The access address linear sorting refers to sorting the access addresses of the IO requests after the tape device receives the IO stream, and then accessing the IO requests according to the sorting result. The sorting can be in ascending order or descending order.
[0132] The time-space domain augmented sorting method is used to determine the first access order of a plurality of access addresses closest to the initial address. For specific implementation of the time-space domain augmented sorting method, refer to the description related to FIG. 8 and FIG. 9 below, which is not repeated here.
[0133] The catalog bucket-based time-space domain augmented ordering method is used to determine a second access order of a plurality of access addresses closest to the initial address. The catalog bucket-based time-space domain augmented ordering method differs from the time-space domain augmented ordering method in that when the number of IO requests in the IO stream is large, the controller processes the IO requests in the IO stream in batches to avoid the problem of long time consumption caused by a large number of IO requests in a single ordering, which is beneficial to improve the access efficiency of batch IO. The specific implementation of the catalog bucket-based time-space domain augmented ordering method can be referred to the description related to S632 below, and will not be described here.
[0134] The first come first service (FCFS) method, also known as natural ordering method, refers to that the tape device orders the IO requests in the received IO stream according to the time sequence of the IO requests, and sequentially accesses the IO requests. For example, the tape device accesses the received IO stream according to the natural ordering scheduling algorithm, and the actual access time delay of the IO stream is from the time when the tape device receives the first IO request in the IO stream to the end time of the access of the last IO request in the IO stream.
[0135] S630, the controller takes the predicted time delay less than or equal to the time delay threshold value as the target predicted time delay, and controls the motor to drive the tape according to the target scheduling algorithm corresponding to the target predicted time delay, so that the head accesses the tape according to the access addresses of different IO requests in the plurality of IO requests.
[0136] In the first feasible example, the time delay threshold value is a value set by the user. For example, the time delay threshold value is 1 second (s), 2s, 5s, 100s or other values.
[0137] In the second feasible example, the time delay threshold value is a value pre-configured in the controller. For example, the time delay threshold value is 1s, 2s, 10s, 200s or other values.
[0138] The above two feasible examples are only optional implementation manners of the time delay threshold value provided by the embodiments of the application, and should not be understood as a limitation of the application. According to the number of IO requests in the IO stream, the time delay threshold value can also change: for example, if the number of IO requests is large, the time delay threshold value increases; if the number of IO requests is small, the time delay threshold value decreases. Alternatively, according to the difference in hardware performance of each device in the tape device, the time delay threshold value can also change, which will not be described here.
[0139] In the first optional implementation manner, there is only one predicted time delay less than or equal to the time delay threshold value in the plurality of predicted time delays, for example, the predicted time delay 1, and the controller takes the predicted time delay 1 as the target predicted time delay, and controls the motor to drive the tape according to the target scheduling algorithm corresponding to the target predicted time delay.
[0140] In one possible example, in the tape device as provided in FIG. 6, one black pattern corresponds to the position of the access address of one IO request in the magnetic tape, such as the access address 1 in IO request 1 is located in track 1 in the magnetic tape, the access address 2 in IO request 2 is located in track 2 in the magnetic tape, the access address 3 in IO request 3 is located in track 4 in the magnetic tape, and the access address 4 in IO request 4 is located in track 5 in the magnetic tape. In FIG. 6, the scheduling track of the magnetic head relative to the magnetic tape includes: access address 4→access address 2→access address 3→access address 1, which is consistent with the recommended request sequence as shown in the foregoing FIG. 5. The motor is controlled based on the scheduling track, so that the access path of the plurality of IO requests in the IO stream is short, the access latency is small, and the contact distance between the magnetic head and the magnetic tape is short, and the wear of the magnetic tape is small.
[0141] In the second possible implementation, there are a plurality of predicted latencies less than or equal to the latency threshold in the plurality of predicted latencies, and the controller selects the scheduling algorithm determined according to the data characteristics of the IO stream from the scheduling algorithms corresponding to all the predicted latencies less than or equal to the latency threshold in the plurality of predicted latencies. For example, the predicted latencies less than or equal to the latency threshold in the plurality of predicted latencies include predicted latency 1 and predicted latency 2, the controller takes the predicted latency 1 and the predicted latency 2 as candidates of the target predicted latency, and selects the scheduling algorithm corresponding to the predicted latency 1 and the predicted latency 2 to select the scheduling algorithm matching the data characteristics of the IO stream as the target scheduling algorithm.
[0142] The data characteristics include one or a combination of the following: the number of IO requests in the IO stream, the probability that any two IO requests in the plurality of IO requests include access addresses overlapping in the length direction of the magnetic tape, and the distribution characteristics of the access addresses included in different IO requests in the magnetic tape. The number of IO requests, the probability of overlapping, and the distribution characteristics are described below.
[0143] The number of IO requests in the IO stream refers to the number of IO requests included in the IO stream.
[0144] The probability that any two IO requests in the plurality of IO requests include access addresses that overlap in the length direction of the magnetic tape 210 includes: each IO request includes an access address indicating a length of the magnetic tape region in the length direction of the magnetic tape, the access addresses of the two IO requests are located in different tracks or wraps in the width direction of the magnetic tape, but the access addresses of the two IO requests can have a certain region of overlap (the overlap length of the access addresses) in the length direction of the magnetic tape. The probability that the access addresses of the two IO requests overlap in the length direction of the magnetic tape is the ratio of the overlap length to the length of the magnetic tape indicated by the access address included in one of the IO requests. The probability that the access addresses of different IO requests overlap in the length direction of the magnetic tape will be described below with reference to FIG. 7A and the content of Table 1.
[0145] Table 1
[0146] In the table, IO request 1 includes access address 1, IO request 2 includes access address 2, IO request 3 includes access address 3, and IO request 4 includes access address 4. The magnetic tape region indicated by access address 1 is the magnetic tape region (A1) in track 1, the magnetic tape region indicated by access address 2 is the magnetic tape region (A2) in track 2, the magnetic tape region indicated by access address 3 is the magnetic tape region (A3) in track 3, and the magnetic tape region indicated by access address 4 is the magnetic tape region (A4) in track 4. In the length direction of the magnetic tape 210, different access addresses can have partially overlapping regions. For example, A1 and A2 have an overlap region 1 (indicated by ① in FIG. 7A) in the length direction of the magnetic tape 210, A1 and A3 have an overlap region 2 (indicated by ② in FIG. 7A) in the length direction of the magnetic tape 210, A2 and A3 have an overlap region 3 (indicated by ③ in FIG. 7A) in the length direction of the magnetic tape 210, and A4 does not have an overlap region with the magnetic tape regions indicated by the other access addresses. In some optional cases, the overlap region between the magnetic tape regions indicated by different access addresses in the length direction of the magnetic tape 210 is also referred to as the longitudinal position (LPOS) overlap of the different access addresses on the magnetic tape.
[0147] The distribution characteristics of the access addresses included in different IO requests in the magnetic tape include the distribution density of the access addresses in different regions of the magnetic tape, which can be obtained from the length of the magnetic tape and the positions of the access addresses of the IO requests on the magnetic tape. For example, the access addresses of the IO requests are clustered on the magnetic tape, and one or more target positions in the magnetic tape are determined by clustering, and the magnetic tape regions indicated by the access addresses are concentratedly distributed near the target positions. Concentratedly distributed means that the magnetic tape regions indicated by the access addresses are greater than or equal to a certain threshold within a certain distance range of the target position.
[0148] The data features above are only optional manners provided by the embodiments of the present application, and should not be understood as a limitation on the present application. In the case where the controller matches the target scheduling algorithm by collecting the data features of the IO stream, since the target prediction time delay not only satisfies the time delay constraint condition (less than or equal to the time delay threshold), but also the target scheduling algorithm corresponding to the target prediction time delay can be adapted to the data features of the IO stream, the target scheduling algorithm corresponding to the target prediction time delay can determine the optimal access sequence under the time delay constraint condition, so that the target scheduling algorithm has better adaptability to the access addresses corresponding to the IO requests in the magnetic tape, ensures the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor, and is beneficial to improving the time delay performance and service life of the magnetic tape in the life cycle.
[0149] In a third optional implementation, there are multiple prediction time delays less than or equal to the time delay threshold, such as prediction time delay 1 and prediction time delay 2. The controller takes both the prediction time delay 1 and the prediction time delay 2 as candidates of the target prediction time delay, and selects the prediction time delay with higher priority of the corresponding scheduling algorithm as the target prediction time delay from the prediction time delay 1 and the prediction time delay 2, and controls the motor to drive the magnetic tape according to the target scheduling algorithm corresponding to the target prediction time delay. A feasible implementation is provided below in combination with FIG. 7B, which is a flow diagram of another access scheduling method provided by the present application. The hardware structure in FIG. 7B can be referred to the description of the foregoing FIG. 6 and related embodiments, which will not be described here. In the access scheduling method provided by the embodiments of the present application, the S630 described above can include the following S631 to S633.
[0150] S631, the controller compares the multiple prediction time delays with the time delay threshold, and determines at least one prediction time delay less than or equal to the time delay threshold.
[0151] For example, the at least one prediction time delay determined in the S631 includes the prediction time delay 1 and the prediction time delay 2.
[0152] S632, the controller takes the scheduling algorithm with the highest priority among all the scheduling algorithms corresponding to the at least one prediction time delay determined in the S631 as the target scheduling algorithm.
[0153] The prediction time delay corresponding to the target scheduling algorithm is the target prediction time delay.
[0154] In the embodiments of the present application, the target scheduling algorithm is the scheduling algorithm with the highest priority among the scheduling algorithms corresponding to all the prediction time delays less than or equal to the time delay threshold in the multiple prediction time delays.
[0155] For example, the priority of the scheduling algorithms includes: the priority of the full permutation method > the priority of the time-space domain augmented ordering method > the priority of the directory bucket based time-space domain augmented ordering method > the priority of the access address linear ordering method. In an alternative case, the predicted time delay 1 is the time-space domain augmented ordering method, and the predicted time delay 2 is the directory bucket based time-space domain augmented ordering method. The controller selects the time-space domain augmented ordering method as the target scheduling algorithm.
[0156] It is worth noting that the priority of the scheduling algorithms can be predefined. For example, the user pre-configures the priority of the different scheduling algorithms in the controller. For another example, the priority of the different scheduling algorithms is configured in the controller during the factory setting process of the controller. In addition, the priority of the scheduling algorithms can be adjusted according to the hardware performance of the tape drive device and the controller, and the specific implementation of the predefinition is not limited in the present application.
[0157] For example, for the IO stream, the predicted time delay of each method includes: the full permutation method > 10000s, the time-space domain augmented ordering method = 1s, the directory bucket based time-space domain augmented ordering method = 0.5s, the access address linear ordering method = 0.1s, the FCFS method = 10s, the time delay threshold is 5s, and the method satisfying the time delay constraint condition determined by the controller includes: the time-space domain augmented ordering method, the directory bucket based time-space domain augmented ordering method, and the access address linear ordering method. Therefore, according to the priority of the different methods predefined in the above embodiment, the controller selects the time-space domain augmented ordering method with the highest priority as the target scheduling algorithm from the methods satisfying the time delay constraint condition, and determines that the range of the search domain includes: {h = 2, k = 2}, k is the search breadth, and h is the search depth. The search breadth is the number of access addresses in a single seek, and the search depth is the number of access sequences of different IO requests in the IO stream. The access sequence is used to determine the scheduling trajectory of the head relative to the magnetic tape.
[0158] S633, the controller controls the motor to drive the magnetic tape according to the target scheduling algorithm determined in S632.
[0159] For example, the controller sends a control instruction to the motor, which is used to instruct the motor to drive the magnetic tape to be wound relative to the head. The direction of the winding can include: forward winding along the length direction of the magnetic tape, or backward winding along the length direction of the magnetic tape; winding along the width direction of the magnetic tape. The length direction and the width direction of the magnetic tape can be referred to the description of the foregoing FIG. 4, and will not be described here.
[0160] In the embodiments of the present application, the execution time delay of different scheduling algorithms is predicted based on the IO stream, and a target scheduling algorithm corresponding to a target predicted time delay is selected to control the motor, so that the motor drives the magnetic tape to be wound, and the region in the magnetic tape is accessed by the magnetic head, which is beneficial to reduce the time delay required for scheduling the motor in the tape drive device and improve the access efficiency of the tape drive device. Since the scheduling algorithm includes the time-space domain augmented ordering method and the directory bucket-based time-space domain augmented ordering method, in the process of time delay prediction, the access order of the plurality of access addresses closest to the initial address can be confirmed, which avoids the problem of serious tape wear caused by the greedy strategy of accessing only one access address closest to the initial address, and is beneficial to determining the optimal access order of the access scheduling in the tape range corresponding to the plurality of access addresses closest to the initial address, improving the access scheduling performance of the tape drive device, and improving the service life of the magnetic tape.
[0161] Further, in order to adapt to the processing capability of the tape drive device and the controller, the controller can first perform time delay constraint on the plurality of predicted time delays, determine one or more predicted time delays less than or equal to the time delay threshold, and select the target scheduling algorithm with the highest priority from the scheduling algorithms corresponding to the one or more predicted time delays.
[0162] That is, since the target predicted time delay not only satisfies the time delay constraint condition (less than or equal to the time delay threshold), but also the target scheduling algorithm corresponding to the target predicted time delay has a high priority, the target scheduling algorithm corresponding to the target predicted time delay can determine the optimal access order under the time delay constraint condition, so that the target scheduling algorithm has good adaptability to the access addresses corresponding to the IO requests in the magnetic tape, ensures the prediction accuracy of the target scheduling algorithm and the scheduling performance of the motor, and is beneficial to improving the time delay performance and service life of the magnetic tape in the life cycle.
[0163] It is worth noting that the above second and third optional implementation manners can also be combined with each other, that is, the target scheduling algorithm is determined from the matched scheduling algorithms by the priority sorting manner according to the data characteristics of the IO stream, or the target scheduling algorithm most suitable for the data characteristics of the IO stream is determined after the scheduling algorithms are screened by the priority sorting manner, and the combination manner of the second and third optional implementation manners is not limited in the present application.
[0164] As a feasible implementation manner, the S630 is exemplarily described below by taking the target scheduling algorithm as the time-space domain augmented ordering method, as shown in FIG. 8, which is a flowchart of an access scheduling method provided by the present application.
[0165] Referring to FIG. 8, the controller controls the motor to drive the magnetic tape according to the target scheduling algorithm, including the following steps S810-S840.
[0166] S810, the controller acquires the inherent characteristics of the magnetic tape and the seek characteristics of the tape drive device.
[0167] The inherent characteristics of the magnetic tape include one or a combination of the following: the length of the magnetic tape, the storage capacity of the magnetic tape, and the service life of the magnetic tape. The length of the magnetic tape is the length between the head end and the tail end of the magnetic tape. The storage capacity of the magnetic tape is the maximum amount of data that the magnetic tape can support, such as 10 GB, 1 terabyte (TB), or other capacities. The service life of the magnetic tape refers to the maximum number of times the magnetic tape is allowed to be in contact with the magnetic head or other magnetic devices, or the effective use time of the magnetic tape (such as the time from the manufacture of the magnetic tape to the time when the magnetic tape cannot be used).
[0168] The seek characteristics of the tape drive device include one or a combination of the following: the maximum speed of the motor, the cruise speed of the motor, the read-write speed of the motor, the acceleration acceleration of the motor, the deceleration acceleration of the motor, the switching delay of the motor, the rewinding delay of the motor, and the wear degree of the magnetic tape. The parameters in the seek characteristics will be described below.
[0169] The maximum speed of the motor refers to the maximum value of the speed of the motor during operation, i.e., the maximum length of the magnetic tape that the motor can drive in a unit of time. For example, 10 meters per second (m / s), 20 m / s, or other values.
[0170] The cruise speed of the motor refers to the speed at which the motor consumes the least power per unit distance. For example, 4 m / s, 5 m / s, or other values.
[0171] The read-write speed of the motor refers to the length of the magnetic tape that the motor drives in a unit of time to enable the magnetic head to effectively read and write the magnetic tape. For example, 1 m / s, 0.5 m / s, 4 m / s, 5 m / s, or other values.
[0172] The acceleration acceleration is used to indicate the ratio between the change in speed and the change in time when the motor accelerates from a lower speed. For example, 1 m / s 2 , 2 m / s 2 , 3 m / s 2 , 5 m / s 2 , or other values.
[0173] The deceleration acceleration is used to indicate the ratio between the change in speed and the change in time when the motor decelerates from a higher speed. For example, 1 m / s 2 , 2 m / s 2 , 3 m / s 2 , 5 m / s 2 , or other values.
[0174] The track switching delay includes a time for a motor to drive a track of the tape to align a head from one track to another. For example, 1s, 2s, 4s, or other. In combination with FIG. 4, the track switching delay refers to a time for the motor to drive a track 1 in the tape 210 to align a head to a track 2.
[0175] The rewind delay includes a time for a motor to drive the tape to switch from a first direction to a second direction, the first direction and the second direction being consistent with a length direction of the tape and opposite to each other. For example, 1s, 2s, 4s, or other. In some optional cases, the rewind delay is also referred to as a turnaround delay of the tape, which is not limited in the present application.
[0176] The wear degree of the tape includes a number of times of contact between the tape and the head.
[0177] The different parameters in the above track seeking features are only examples provided by the embodiments of the present application, and should not be understood as a limitation of the present application. In some optional implementations, the track seeking features described above can include more or less parameters, which are not limited in the present application.
[0178] S820, the controller constructs a multi-dimensional track seeking feature image according to the number of IO requests in the IO stream, the inherent features of the tape, and the track seeking features.
[0179] The multi-dimensional track seeking feature image is used to determine a track seeking cost of the tape drive device in multiple dimensions. The track seeking cost refers to a wear of hardware in the tape drive device and related information of accessing data in different dimensions, for example, the related information can include but is not limited to the track seeking delay or other parameters.
[0180] The multiple dimensions include two or three of the following: the track seeking delay, the wear degree of the tape, and the wear degree of the motor. The track seeking delay is a time for the tape to move from a current position aligned by the head to a target position. The wear degree of the tape includes a number of times of contact between the tape and the head. The wear degree of the motor includes a time (or a service life) of the motor already used, or an expected remaining time (or a remaining service life) of the motor, and the like.
[0181] In an optional implementation, the multi-dimensional track seeking feature image satisfies the following formula (3). C = ω1*c seek + ω2*c abrasion + ω3*c motor , ω1 + ω2 + ω3 = 1 Formula (3)
[0182] In the formula (3), the descriptions of the parameters are shown in the following Table 2.
[0183] Table 2
[0184] Please refer to Table 2, C is the cost of the seek penalty, c seek is the cost corresponding to the seek latency, c abrasion is the cost corresponding to the wear degree of the tape, c motor is the cost corresponding to the wear degree of the motor, ω1is c seek is the cost weight of the first factor, ω2is c abrasion is the cost weight of the second factor, ω3is c motor is the cost weight of the third factor.
[0185] The determination manners of c seek , c abrasion and c motor will be exemplarily explained below in combination with Table 3 to Table 5 respectively.
[0186] In the first feasible example, c seek is determined according to the following information: the tape seek speed, the seek latency, the rewind latency, the moving distance of the tape between the first address and the second address, and the time of the tape between the first address and the second address; the tape seek speed refers to the moving speed of the tape in the process of winding the tape, the first address is the access address in the ith IO request, and the second address is the access address in the jth IO request. seek satisfies the following formula (4).
[0187] In formula (4), the descriptions of the parameters are shown in Table 3 as follows.
[0188] Table 3
[0189] Please refer to Table 3, the key point refers to the position node in the tape that can be recognized by the head in the process of seeking, therefore, the distance between two adjacent key points is the minimum seek precision of the head in the tape for seeking the tape area corresponding to the access address.
[0190] In the second feasible example, c abrasion is determined according to the following information: the seek distance between the first address and the second address, the tape length of the access area corresponding to the second address, the rewind times of the tape, and the number of tracks between the track where the first address is located and the track where the second address is located. In which, the first address is the access address in the ith IO request, and the second address is the access address in the jth IO request. abrasion satisfies the following formula (5). c abrasion = θ * (β1* l seek + β2* l read + β3* l write + β4* cnt rewind + β5 * abs(wrapi -wrap j )) Equation (5)
[0191] In Equation (5), the parameters are described as shown in Table 4.
[0192] Table 4
[0193] Referring to Table 4, abs(wrap i -wrap j represents the number of wraps between the ith wrap and the jth wrap. In Equation (5), wrap i represents the wrap number corresponding to the access address in the ith IO request, and wrap j represents the wrap number corresponding to the access address in the jth IO request.
[0194] In a third possible example, c motor is determined according to the number of motor start-ups and the motor running time. c motor satisfies Equation (6). c motor = max (cmotorStartup, cmotorRuntime) = max (α1*startup count , α2*move) Equation (6)
[0195] In Equation (5), the parameters are described as shown in Table 5.
[0196] Table 5
[0197] The determination of the seek cost shown in Tables 2 to 5 is only a possible example provided by the embodiments of the present application, and should not be construed as a limitation of the present application. According to the degree of degradation of the hardware performance in the tape drive device, different parameters or weights can be adjusted or other parameters can be added to determine the seek cost, which will not be described herein.
[0198] Referring to FIG. 8, the process of controlling the motor to drive the tape according to the target scheduling algorithm by the controller further includes S830 and S840.
[0199] S830, the controller obtains a plurality of seek costs corresponding to the IO stream according to the multi-dimensional seek characteristic image and the search domain.
[0200] In Equation (5), the search width (k) is the number of access addresses in a single seek.
[0201] For multiple seek costs, one seek cost corresponds to an access sequence of multiple IO requests, and the access sequence corresponds to a scheduling / moving track of the head relative to the magnetic tape. In the embodiment of the present application, the number of seek costs of the IO stream obtained by the time-space domain augmented ordering method is the search depth (h).
[0202] In the embodiment of the present application, the search breadth (k) and the search depth (h) above determine the search domain size of the seek process. The search domain is also referred to as the initial address of the head alignment or the time-space domain corresponding to the current position of the head, the adjacent domain or other names, which are not limited in the present application.
[0203] The following takes an access address in an IO request corresponding to a data segment in the magnetic tape as an example for description: for the IO request r i (i.e., the i th IO request), the k data segments N k ={f′1,f′2,…,f′ k} with the minimum tape moving cost are selected under the search breadth k, and the seek costs corresponding to the k data segments are C′={c′1,c′2,…,c′ k}. At this time, the search depth is h=1, and the k*k costs are obtained by searching with the breadth k based on N k , and the cost function C′ can be updated. The costs are iterated and updated in turn until the search depth is h, and the IO request corresponding to the minimum cost function is taken as the next access IO request, such as the IO request r j (i.e., the j th IO request) containing the access address of the j th data segment. In an optional implementation manner, the head can access other IO requests between the i th data segment and the j th data segment.
[0204] S840, the controller controls the motor to drive the magnetic tape according to the access sequence corresponding to the minimum seek cost in the multiple seek costs.
[0205] For example, the determination process of the minimum seek cost required for the i th data segment to the j th data segment can refer to the formula (7) below.
[0206] wherein r i j is the minimum seek cost required for the i th data segment to the j th data segment, C′ is the seek cost function, S is the search range (the search range is determined according to the search breadth k and the search depth h), and R rest is the range of the data segments not searched in the magnetic tape.
[0207] In some optional cases, the access scheduling in the magnetic tape takes the data segment corresponding to a single access address as the scheduling unit, but the interval reading of the adjacent data segments closer to each other causes the motor to frequently accelerate and decelerate, thereby affecting the track seeking and the head reading strategy. Therefore, in the process of determining the seeking cost, the continuous reading or the interval reading can also be considered as a factor to be added to the process of determining the seeking cost. The seeking cost comparison process for the continuous reading and the interval reading can refer to the following formula (8).
[0208] wherein c' ij is the seeking cost benefit of the continuous reading, c ij is the seeking cost of the interval reading, is the seeking cost of the continuous reading between the ith data segment and the jth data segment, wrap i = wrap j indicates that the ith data segment and the jth data segment are located in the same wrap in the magnetic tape.
[0209] In the embodiment of the present application, when the seeking cost of the continuous reading is smaller, the continuous reading is preferentially used to access different IO requests in the IO stream, which is beneficial to reduce the seeking cost of the tape drive device and improve the access performance of the tape drive device.
[0210] The difference between the continuous reading and the interval reading will be compared below with reference to the accompanying drawings. FIG. 9 is a comparison diagram of the continuous reading and the interval reading provided by the present application. In the interval reading scenario of FIG. 9, the motor needs to accelerate and then decelerate between the ith data segment and the jth data segment, which causes greater wear of the motor and increases the seeking cost.
[0211] In the continuous reading scenario of FIG. 9, the motor drives the magnetic tape to perform the winding process at the reading and writing speed of the motor between the ith data segment and the jth data segment, and the seeking speed between the ith data segment and the jth data segment is consistent with the reading and writing speed of the motor, that is, the motor runs at a uniform speed of the reading and writing speed from the beginning of the ith data segment to the end of the jth data segment. This causes less wear of the motor and lower seeking cost.
[0212] In an alternative implementation, the spatio-temporal domain extended ordering method includes a spatio-temporal proximity ordering method and an MPSCAN method. The spatio-temporal proximity ordering method is used to determine a first sub-access order of the access addresses closest to the initial address and having the shortest seek distance. The MPSCAN method is used to determine a second sub-access order of the access addresses closest to the initial address and having the minimum motor rewinding time delay and lane switching time delay. The access order corresponding to the minimum seek cost is the first sub-access order or the second sub-access order. The spatio-temporal domain extended ordering method is exemplarily described below in combination with FIG. 10, which is a flowchart of an access scheduling method four provided by the present application. Please refer to FIG. 10. The access scheduling method provided by the present application includes the following S1001 to S1022.
[0213] S1001, the controller receives the batch IO request, i.e., the IO stream, of the magnetic tape.
[0214] S1002, the controller calculates the predicted time delay of the IO stream under different scheduling algorithms.
[0215] The specific implementation of S1001 and S1002 can refer to the description of the foregoing S610 and S620, which will not be described here.
[0216] S1003, the controller determines whether the predicted time delay of the full permutation method is less than or equal to the time delay threshold.
[0217] If the predicted time delay of the full permutation method is less than or equal to the time delay threshold, S1004 is performed; if the predicted time delay of the full permutation method is greater than the time delay threshold, S1008 is performed.
[0218] S1004, the controller determines the permutation order of all IO requests according to the full permutation method.
[0219] S1005, the controller calculates the seek cost function of each permutation order determined in S1004.
[0220] S1006, the controller selects the permutation order having the minimum seek cost.
[0221] S1007, the controller estimates the seek cost function 1 according to the permutation order having the minimum seek cost selected in S1006.
[0222] S1008, the controller determines whether the predicted time delay of the spatio-temporal domain extended ordering method is less than or equal to the time delay threshold.
[0223] If the predicted time delay of the spatio-temporal domain extended ordering method is less than or equal to the time delay threshold, S1009 is performed; if the predicted time delay of the spatio-temporal domain extended ordering method is greater than the time delay threshold, S1014 is performed.
[0224] S1009, the controller executes the time-space domain adjacent ordering method.
[0225] S1010, the controller estimates the track cost function 2 according to the arrangement order determined by the time-space domain adjacent ordering method.
[0226] In the embodiment of the present application, the arrangement order determined by the time-space domain adjacent ordering method includes a first sub-access order of a plurality of access addresses closest to the initial address of the magnetic head and having the shortest track distance. The time-space domain adjacent ordering method and the greedy strategy are the same in that both can find an access address having the shortest track distance from the initial address. The time-space domain adjacent ordering method and the greedy strategy are different in that the greedy strategy can only find one access address having the shortest track distance from the initial address, while the time-space domain adjacent ordering method can find a plurality of access addresses adjacent to the initial address.
[0227] S1011, the controller executes the MPSCAN method.
[0228] S1012, the controller estimates the track cost function 3 according to the arrangement order determined by the MPSCAN method.
[0229] In the embodiment of the present application, the arrangement order determined by the MPSCAN method includes a second sub-access order of a plurality of access addresses closest to the initial address of the magnetic head and having the smallest motor rewinding time delay and track switching time delay. The MPSCAN method and the elevator scheduling algorithm are the same in that both can find an access address having the smallest motor rewinding time delay and track switching time delay. The MPSCAN method and the elevator scheduling algorithm are different in that the elevator scheduling algorithm can only find one access address having the smallest motor rewinding time delay and track switching time delay, while the MPSCAN method can find a plurality of access addresses having the smallest motor rewinding time delay and track switching time delay and adjacent to the initial address.
[0230] S1013, the controller compares the track cost function 2 and the track cost function 3 and selects the arrangement order having the smaller track cost.
[0231] S1014, the controller determines whether the predicted time delay of the time-space domain augmented ordering method based on the directory bucket is smaller than or equal to the time delay threshold value.
[0232] If the predicted time delay of the time-space domain augmented ordering method based on the directory bucket is smaller than or equal to the time delay threshold value, S1015 is executed; if the predicted time delay of the time-space domain augmented ordering method based on the directory bucket is greater than the time delay threshold value, S1017 is executed.
[0233] S1015, the controller performs granular bucketing according to the file name directory corresponding to the batch IO request.
[0234] The granularity bucket refers to that the controller performs bucket division according to the file name directory of different IO requests. One bucket includes multiple IO requests with the same file name directory, and the data of IO requests included in different buckets can be the same or different. For example, multiple IO requests in an IO stream are sorted by using a neighbor recommendation method, and the time delay threshold of the access scheduling method is 0.5 s. The controller calculates the time consumption of sorting the IO stream. Only the directory bucket based spatiotemporal augmentation sorting method and the access address linear sorting method meet the time delay constraint condition (predicted time delay ≤ 0.5 s), so the directory bucket based spatiotemporal augmentation sorting method is preferentially selected. The controller clusters the file name directories of the data corresponding to the multiple IO requests, and similar or identical directories are classified into one category to form multiple batches of data with a fixed size (such as 2000 or other values). The spatiotemporal augmentation sorting method is performed on each batch of data, and the sorted results are spliced to form a final result, that is, the access order of the head in accessing the data on the magnetic tape.
[0235] In S1016, after performing the granularity bucket operation on the file name in S1015, the controller determines the arrangement order of the IO requests corresponding to different buckets, and estimates the seek cost function 4.
[0236] In S1017, the controller performs the access address linear sorting method.
[0237] Three optional examples of the process of performing the access address linear sorting method by the controller are provided as follows.
[0238] In the first optional example, if the access address in the IO request is a physical address, the controller sorts the access addresses in the IO request (in ascending order or descending order), and determines the arrangement order of the IO requests according to the sorting result.
[0239] In the second optional example, if the access address in the IO request is a virtual address, the controller sorts the virtual addresses in the IO request (in ascending order or descending order), and determines the arrangement order of the IO requests according to the sorting result. In the actual access process of the tape device, the processor in the tape device needs to convert the virtual address in the IO request into a physical address, and control the motor and the head to access the magnetic tape based on the physical address.
[0240] In the third optional example, if the access address in the IO request is a virtual address, the controller performs address conversion on the access addresses in the IO request, determines the physical address corresponding to each IO request, and sorts the physical addresses of the IO requests (in ascending order or descending order) based on the physical addresses, and determines the arrangement order of the IO requests according to the sorting result.
[0241] The above three optional examples are only feasible ways of the access address linear ordering method provided by the embodiments of the present application, and should not be understood as a limitation to the present application.
[0242] S1018, the controller estimates the seek cost function 5 according to the arrangement order determined by the access address linear ordering method.
[0243] As an optional implementation, after S1003, S1008 or S1014, the access scheduling method provided by the embodiments of the present application further includes the following S1019 and S1020.
[0244] S1019, the controller determines the target scheduling algorithm according to the data characteristics of the IO stream from the scheduling algorithms corresponding to all the predicted time delays less than or equal to the time delay threshold.
[0245] The determination method of the data characteristics of the IO stream can refer to the second optional implementation provided by the foregoing S630, which will not be described here.
[0246] S1020, the controller estimates the seek cost function 6 according to the target scheduling algorithm determined by S1019.
[0247] The determination methods of the seek cost function 1 estimated by S1007, the seek cost function 2 estimated by S1010, the seek cost function 3 estimated by S1013, the seek cost function 4 estimated by S1016, the seek cost function 5 estimated by S1018 and the seek cost function 6 estimated by S1020 can be obtained according to the foregoing formulas (1), (3) to (8), which will not be described here.
[0248] After the foregoing S1007, S1013, S1016, S1018 or S1020, the access scheduling method provided by the embodiments of the present application further includes the following S1021 and S1022.
[0249] S1021, the controller feeds back the determined arrangement order to the host for processing, and receives the result returned by the host after sorting, such as the result after selecting the seek costs corresponding to a plurality of arrangement orders.
[0250] S1022, the controller controls the motor according to the sorted result, so that the motor drives the magnetic tape, and the magnetic head accesses the magnetic tape.
[0251] It is worth noting that in FIG. 10, S1019 and S1020 are performed after comparing the predicted time delays of different scheduling algorithms with the time delay threshold, but in some feasible cases, S1019 and S1020 can also be performed before S1003, which is not limited by the present application.
[0252] In the access scheduling method provided in the embodiments of the present application, the controller can also update and optimize the time delay prediction model according to the access scheduling situation of the IO stream. Please refer to FIG. 11, which is a flowchart of an access scheduling method provided in the present application. Based on the above-mentioned FIG. 6 to FIG. 10, the access scheduling method provided in the embodiments of the present application further includes the following S1110 and S1120.
[0253] S1110, the controller acquires the execution time delay of the target scheduling algorithm in the tape drive device.
[0254] For example, the tape drive device accesses the plurality of IO requests in the IO stream according to the access order corresponding to the target scheduling algorithm, and takes the time when the tape drive device receives the IO stream and the time when the access order of the IO stream is fed back as the execution time delay of the target scheduling algorithm. In some optional cases, the execution time delay of the target scheduling algorithm is also called execution time of the target scheduling algorithm, real execution time, actual execution time, real execution time delay, actual execution time delay, access scheduling time delay, calculation time delay or other names.
[0255] S1120, the controller updates the time delay prediction model according to the execution time delay and the target prediction time delay, to obtain an updated time delay prediction model.
[0256] For example, the controller acquires the time delay difference between the execution time delay and the target prediction time delay, takes the time delay difference as the input of the heuristic strategy, and updates the time delay prediction model to obtain an updated time delay prediction model. The heuristic strategy includes one or a combination of the following: genetic algorithm, ant colony algorithm and simulated annealing algorithm.
[0257] Genetic algorithm: for an optimization problem, a certain number of candidate solutions (called individuals) can be abstractly represented as chromosomes, so that the population containing all individuals evolves to better solutions. The solution of genetic algorithm is represented by binary (i.e. string of 0 and 1), but other representation methods can also be used. Evolution starts from a population (data set) of completely random individuals (single data), and then occurs generation by generation. In each generation, the fitness of the entire population is evaluated, and a number of individuals are randomly selected from the current population (based on their fitness), and new life population is generated through natural selection and mutation, which becomes the current population in the next iteration of genetic algorithm.
[0258] Ant colony algorithm: it is a probabilistic algorithm used to find the optimal path in a graph. Its inspiration comes from the behavior of ants in finding food paths. This ant colony algorithm has the characteristics of distributed computing, information positive feedback and heuristic search, and is essentially a heuristic global optimization algorithm in evolutionary algorithms.
[0259] Simulated annealing algorithm: a general probabilistic algorithm for approximating the global optimum of a given function. Specifically, it is a meta-heuristic algorithm commonly used to find an approximate global optimum solution in a large search space within a certain time. When there are a large number of local optimal solutions, the simulated annealing algorithm can find the global optimal solution.
[0260] For more information about the genetic algorithm, ant colony algorithm and simulated annealing algorithm described above, please refer to the description of the prior art, which will not be repeated here. In some feasible implementations, the training or optimization of the time delay prediction model can also use other types of heuristic optimization strategies, which are not limited by the present application.
[0261] In the embodiments of the present application, the controller updates the time delay prediction model according to the execution time delay of the target scheduling algorithm in the execution of the access scheduling process by the tape drive device and the predicted time delay of the access scheduling process, so that the updated time delay prediction model has better adaptability to different tape motors and tape motors in different degradation states in the life cycle, ensures the time delay prediction accuracy and scheduling performance, and improves the time delay performance in the life cycle of the tape.
[0262] The access scheduling method provided in the above Figs. 6 to 11 is only a feasible way provided by the embodiments of the present application. Next, an example of the access scheduling process of a set of disk IO requests R={r1, r2, r3, r4, …, r n} is illustrated by combining the software framework shown in Fig. 5, and Fig. 12 is a flowchart of an access scheduling method provided by the present application. It is assumed that there is a batch of disk IO requests R={r1, r2, r3, r4, …, r n}, the starting positions of the data segments corresponding to the access addresses in each IO request are S={1, 6, 9, 10, …, s n}, the ending positions of the data segments corresponding to the access addresses in each IO request are E={2, 7, 10, 11, …, e n}, and the batch of IO scheduling requests are sorted using the neighbor recommendation method. The execution time (predicted time delay) of the access scheduling method is required to be no more than 5s (the time delay threshold is 5s).
[0263] Please refer to Fig. 12, the access scheduling method provided by the embodiments of the present application includes the following S1210 to S1260.
[0264] S1210, the controller calculates the predicted time delay of different scheduling algorithms according to the computing power resources, method complexity, number of requests, and scene complexity.
[0265] For example, the prediction time delay corresponding to the full permutation method is >10000s, the prediction time delay corresponding to the spatiotemporal domain augmented sorting method is 1s, the prediction time delay corresponding to the catalog bucket-based spatiotemporal domain augmented sorting method is 0.5s, and the prediction time delay corresponding to the access address linear sorting method is 0.1s. The spatiotemporal domain augmented sorting method meets the time constraint requirement, and the search domain (or spatiotemporal domain) range {h=2, k=2} is obtained, where h is the search depth and k is the search breadth.
[0266] S1220, search in the search domain of the head position.
[0267] For example, assuming that the position aligned with the current head r0 is s0=7, the feature of the head position (s0=7) and the feature of the data segment position corresponding to the access address in the unsorted IO request are brought into the multi-dimensional seek feature image in the spatiotemporal domain augmented sorting module 200a, the cost C={6, 1, 2, 3,...} of moving the head to different data segments is obtained, and the Top k data segments {r2, r3} with the minimum cost are searched in all access addresses corresponding to the unsorted IO requests.
[0268] S1230, determine multiple candidate paths of the head position in the search domain.
[0269] For example, taking the r2 and r3 requests as the starting positions, the spatiotemporal domain augmented sorting module 200a sequentially calculates the Top k data segments {r3, r4}, {r4, r2} in the remaining unsorted data segments, and a total of four candidate paths {r0→r2→r3, r0→r2→r4, r0→r3→r4, r0→r3→r2} are formed.
[0270] S1240, determine the path with the minimum seek cost from the multiple candidate paths.
[0271] For example, the spatiotemporal domain augmented sorting module 200a calculates, based on the multi-dimensional seek feature image, that the path with the minimum cost in the four paths determined in S1130 is {r0→r3→r4} with a cost c′=3, and thus the next data segment r3 of r0 is selected (the path {r0→r2→r3} is selected by using the nearest neighbor algorithm, and the cost c′=4 is higher than the time delay of the spatiotemporal domain augmented sorting method).
[0272] S1250, update the time delay prediction model.
[0273] For example, the execution time delay (or execution time) of the spatiotemporal domain augmented sorting method is recorded as 2s by iterating steps S1220 to S1240, and the execution time delay is used to update the time delay prediction model. The update process of the time delay prediction model can refer to the description of FIG. 11, and will not be described here.
[0274] S1260, send the access sequence corresponding to the path with the minimum seek cost.
[0275] The multi-dimensional seek feature image module is used to calculate the overall access latency and send the access sequence corresponding to the path with the minimum seek cost {r0→r3→r4→r2→r1→…} to the tape drive device.
[0276] In summary, the embodiments of the present application comprehensively consider factors such as computing resource overhead, scene complexity (number of IO requests, inherent characteristics of the tape drive device, and seek characteristics), and can ensure the availability and landing conditions of the embodiments of the present application under limited resources. The embodiments of the present application use a dynamic adaptive scene adaptation method, which can dynamically adapt to different complex scenes, so that the embodiments of the present application have generality for different scenes. Using the access scheduling method provided by the embodiments of the present application, the tape read latency is reduced by 40% and the tape wear is reduced by 30% in actual application scenarios. Moreover, the access scheduling method provided by the embodiments of the present application is superior to the scheduling method provided by the conventional technology in effect, and can adaptively select the optimal algorithm, thereby effectively reducing the latency and tape wear in the tape read / write process.
[0277] It can be understood that, in order to realize the functions in the above embodiments, the tape drive device, the processor or the controller includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in the present application, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0278] The access scheduling method provided by the embodiments of the present application is described in detail above in combination with FIGS. 1 to 12, and the controller provided by the embodiments of the present application is exemplarily described below in combination with FIG. 13.
[0279] FIG. 13 is a structural diagram of a controller provided by the present application. The controller 1300 includes a memory 1310 and at least one processor 1320, which can implement the access scheduling method provided by the above embodiments. The memory 1310 is configured to store software instructions corresponding to the access scheduling method. As an optional implementation manner, in terms of hardware implementation, the controller 1300 can be a chip or a chip system encapsulating one or more processors 1320. For example, when the controller 1300 is used to implement the method steps in the above embodiments, the processor 1320 included in the controller 1300 performs the steps of the controller in the above method and possible sub-steps thereof. In an optional case, the controller 1300 can further include a communication interface 1330, which can be configured to receive and transmit data. For example, the communication interface 1330 is configured to receive an IO request, or transmit an IO response, etc. The communication interface 1330 can be implemented by an interface circuit included in the controller 1300. Therefore, in some examples, the communication interface 1330 can also be referred to as a transceiver of the controller. In the embodiments of the present application, the communication interface 1330, the processor 1320 and the memory 1310 can be connected through a bus 1340, which can be divided into an address bus, a data bus, a control bus, etc. The bus 1340 can be a PCIe bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), or other types of buses, etc.
[0280] The controller 1300 provided by the embodiments of the present application can be the above processor 240 or the control unit 1225, or other devices having an access scheduling function, which are not limited in the present application. For example, when other processing devices in the tape drive device also have an access scheduling function, the controller 1300 can refer to the above disk frame or other processing devices in the tape drive device.
[0281] The embodiments of the present application further provide a storage system. The storage system includes a communication interface, a controller, and the tape drive device provided by any of the above embodiments. The tape drive device is configured to store data, the communication interface is configured to receive a data access request (such as an IO request), and the controller is configured to manage a target tape drive device in the storage system according to the data access request (such as an IO read request or an IO write request, etc.). The storage system can be a tape library, a tape system, or a computer / server including the tape drive device as a persistent storage medium.
[0282] The storage controller includes one or more processors, which can be a very large scale integrated circuit. The processors are installed with operating systems and other software programs, so that the processors can realize access to the tape drive device and various PCIe devices. The processors include one or more processor cores. The processor cores in the processors are, for example, CPUs or other ASICs. The processors can also be other general purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In practical applications, the storage system can also include multiple controllers.
[0283] Optionally, the storage system can also include, but is not limited to, other storage media such as dynamic random access memory (DRAM) and static random access memory (SRAM) for caching data of the tape drive device for processing by the processors. In addition, the other storage media can also be read only memory (ROM). For the read only memory, for example, it can be programmable read only memory (PROM), erasable programmable read only memory (EPROM), etc. The present embodiment does not limit the number and type of other storage media. In addition, the other storage media can be configured to have a power retention function. The power retention function refers to that when the system is powered off and then powered on again, the data stored in the storage media will not be lost. The storage media with the power retention function is called non-volatile memory.
[0284] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are performed. The computer can be a general purpose computer, a special purpose computer, a computer network, a network device, a user equipment or other programmable apparatus. The computer programs or instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer programs or instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through wired or wireless manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center and the like integrated with one or more available media. The available media can be a magnetic medium, for example, a floppy disk, a hard disk, a magnetic tape; or an optical medium, for example, a digital video disc (digital video disc, DVD); or a semiconductor medium, for example, a solid state disk (solid state drive, SSD).
[0285] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Various equivalent modifications or replacements within the technical scope disclosed in the present application are contemplated, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An access scheduling method characterized by, The method is applied to a tape drive device including a magnetic head, a magnetic tape and a motor, and the method comprises: obtaining an IO stream, the IO stream comprising a plurality of IO requests, the IO request comprising an access address; obtaining a plurality of predicted time delays of a plurality of scheduling algorithms according to the IO stream and an initial address to which the magnetic head is aligned in the magnetic tape; wherein one scheduling algorithm corresponds to one predicted time delay, and the one scheduling algorithm comprises one or a combination of the following: a full permutation method, a time-space domain augmented ordering method, a directory bucket-based time-space domain augmented ordering method, and an access address linear ordering method; the time-space domain augmented ordering method is used to determine a first access order of a plurality of access addresses closest to the initial address, and the directory bucket-based time-space domain augmented ordering method is used to determine a second access order of a plurality of access addresses closest to the initial address; taking a predicted time delay less than or equal to a time delay threshold value in the plurality of predicted time delays as a target predicted time delay, and controlling the motor to drive the magnetic tape according to a target scheduling algorithm corresponding to the target predicted time delay, so that the magnetic head accesses the magnetic tape according to the access address of different IO requests in the plurality of IO requests.
2. The method of claim 1, wherein, The target scheduling algorithm is a scheduling algorithm determined according to the data characteristics of the IO stream among the scheduling algorithms corresponding to all predicted time delays less than or equal to the time delay threshold value in the plurality of predicted time delays. The data characteristics comprise one or a combination of the following: the number of IO requests in the IO stream, the probability that the access addresses included in any two IO requests in the plurality of IO requests overlap in the length direction of the magnetic tape, and the distribution characteristics of the access addresses included in different IO requests in the magnetic tape.
3. The method according to claim 1 or 2, characterized in that, The target scheduling algorithm is a scheduling algorithm with the highest priority among the scheduling algorithms corresponding to all predicted time delays less than or equal to the time delay threshold value in the plurality of predicted time delays. The priority of the scheduling algorithm satisfies the following formula: The priority of the full permutation method > the priority of the time-space domain augmented ordering method > the priority of the directory bucket-based time-space domain augmented ordering method > the priority of the access address linear ordering method.
4. The method according to any one of claims 1-3, characterized in that, If the target scheduling algorithm is the time-space domain augmented ordering method, the controlling of the motor to drive the magnetic tape according to the selected target scheduling algorithm comprises: obtaining inherent characteristics of the magnetic tape and seek characteristics of the tape drive device; wherein the inherent characteristics of the magnetic tape comprise one or a combination of the following: the length, storage capacity and service life of the magnetic tape; and the seek characteristics comprise one or a combination of the following: the maximum speed, cruising speed, read-write speed, acceleration acceleration, deceleration acceleration, lane changing time delay, reverse play time delay of the motor, and the wear degree of the magnetic tape; constructing a multi-dimensional seek characteristic image according to the number of IO requests in the IO stream, the inherent characteristics of the magnetic tape and the seek characteristics, the multi-dimensional seek characteristic image being used to determine the seek cost of the tape drive device in a plurality of dimensions, the plurality of dimensions comprising two or three of the following: seek time delay, wear degree of the magnetic tape and wear degree of the motor; According to the multi-dimensional seek feature image, the search breadth of the time-space domain augmented ordering method, a plurality of seek costs corresponding to the IO stream are obtained; the search breadth is the number of access addresses of a single seek, and one seek cost corresponds to an access sequence of the plurality of IO requests; According to an access sequence corresponding to a minimum seek cost in the plurality of seek costs, the motor is controlled to drive the magnetic tape.
5. The method of claim 4, wherein, The access sequence corresponding to the minimum seek cost is continuous reading or interval reading.
6. The method of claim 4, wherein, The time-space domain augmented ordering method includes a time-space proximity ordering method and an MPSCAN method, the time-space proximity ordering method is used to determine a first sub-access sequence of a plurality of access addresses closest to the initial address and having the shortest seek distance, and the MPSCAN method is used to determine a second sub-access sequence of a plurality of access addresses closest to the initial address and having the minimum motor rewinding time delay and lane switching time delay; The access sequence corresponding to the minimum seek cost is the first sub-access sequence or the second sub-access sequence.
7. The method according to any one of claims 4-6, characterized in that, The multi-dimensional seek signature satisfies the following equation: C = ω1*c seek + ω2*c abrasion + ω3*c motor , ω1 + ω2 + ω3 = 1 wherein C is a seek cost, c seek is a cost corresponding to a seek latency, c abrasion is a cost corresponding to a wear level of the tape, c motor is a cost corresponding to a wear level of the motor, ω1 is c seek is a cost weight of the seek latency, ω2 is c abrasion is a cost weight of the seek latency, ω3 is c motor is a cost weight of the seek latency.
8. The method of claim 7, wherein, The c seek is determined from the following information: tape seek speed, seek latency, rewind latency, distance of tape movement between a first address and a second address, and time of tape movement between the first address and the second address. The c abrasion is determined according to the following information: the track distance between the first address and the second address, the tape length of the access area corresponding to the second address, the number of times of rewinding the tape, and the number of tracks between the track where the first address is located and the track where the second address is located. The c motor is determined according to the number of starts and the motion time of the electric machine.
9. The method according to any one of claims 1-8, characterized in that, The predicted time delay of different scheduling algorithms is determined by a time delay prediction model, and the method further comprises: obtaining an execution time delay of the target scheduling algorithm; updating the time delay prediction model according to the execution time delay and the target predicted time delay to obtain an updated time delay prediction model.
10. The method of claim 9, wherein, The updating of the time delay prediction model according to the execution time delay and the target predicted time delay to obtain an updated time delay prediction model comprises: obtaining a time delay difference value between the execution time delay and the target predicted time delay; updating the time delay prediction model to obtain an updated time delay prediction model by taking the time delay difference value as an input of a heuristic strategy, the heuristic strategy including one or a combination of the following: genetic algorithm, ant colony algorithm, and simulated annealing algorithm.
11. The method of any one of claims 1-10, wherein: the tape drive device further comprises a processor, and the method is executed by the processor; or the tape drive device is connected with a controller, and the method is executed by the controller.
12. A controller characterized by comprising: The controller is applied to a tape drive device, and the tape drive device comprises a magnetic head, a magnetic tape, and a motor, and the magnetic tape is used to store data, and the controller comprises: a transceiver configured to obtain an IO stream, the IO stream comprising a plurality of IO requests, and each IO request comprising an access address; a processor configured to obtain a plurality of predicted time delays of a plurality of scheduling algorithms according to the IO stream and an initial address aligned with the magnetic head in the magnetic tape; wherein one scheduling algorithm corresponds to one predicted time delay, and the one scheduling algorithm includes one or a combination of the following: full permutation method, time-space domain augmented ordering method, directory bucket-based time-space domain augmented ordering method, and access address linear ordering method; the time-space domain augmented ordering method is used to determine a first access sequence of a plurality of access addresses closest to the initial address, and the directory bucket-based time-space domain augmented ordering method is used to determine a second access sequence of a plurality of access addresses closest to the initial address. The processor is further configured to: select a predicted time delay less than or equal to a time delay threshold from the plurality of predicted time delays as a target predicted time delay, and control the motor to drive the magnetic tape according to a target scheduling algorithm corresponding to the target predicted time delay, so that the magnetic head accesses the magnetic tape according to an access address of a different IO request from the plurality of IO requests.
13. A tape drive apparatus, characterized by The magnetic tape drive comprises: a magnetic tape configured to store data; a magnetic head configured to access the magnetic tape; a motor configured to drive the magnetic tape; and a controller configured to obtain an IO stream and perform the method of any one of claims 1-11 based on the IO stream.
14. A storage system, characterized by The storage system comprises a controller and one or more tape drive devices; the controller is configured to manage a target tape drive device from the one or more tape drive devices, and the controller is configured to obtain an IO stream and perform the method of any one of claims 1-11 based on the IO stream.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer instructions; when the computer instructions are executed in an electronic device, the electronic device performs the method of any one of claims 1-11.
16. A computer program product, characterised in that, When the computer program product is executed on an electronic device, the electronic device performs the method of any one of claims 1-11.
Citation Information
Patent Citations
Method and device for reducing HDD write delay and medium
CN115098042A
Data processing method and related equipment
CN117666931A
Driver, tape device, and tape storage system
CN117976007A
Data storage device using predefined data segments for logical address mapping
US20220365715A1
Recording / reproducing method and apparatus for storing data in a memory after detecting errors in reproduced data from a magnetic tape
US6128147A