WO2019223445A1 - Hard disk read-write control method and apparatus, electronic device and storage medium - Google Patents
Hard disk read-write control method and apparatus, electronic device and storage medium Download PDFInfo
- Publication number
- WO2019223445A1 WO2019223445A1 PCT/CN2019/082262 CN2019082262W WO2019223445A1 WO 2019223445 A1 WO2019223445 A1 WO 2019223445A1 CN 2019082262 W CN2019082262 W CN 2019082262W WO 2019223445 A1 WO2019223445 A1 WO 2019223445A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- hard disk
- target hard
- depth
- computing node
- token
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
Definitions
- the present application relates to the technical field of data reading and writing, and in particular, to a hard disk reading and writing control method, device, electronic device, and storage medium.
- SAN Storage Area Network
- SCSI Serial Computer System Interface
- SAS Serial Attached SCSI, Serial Attached SCSI
- SCSI Serial Attached SCSI
- each hard disk allows only one I / O (Input / Output) operation of a computing node at the same time.
- I / O Input / Output
- the hard disk allows only one computing node's IO operations at the same time, causing a large number of computing nodes to queue up, which seriously affects the computing node's working efficiency and the overall network operation efficiency is low.
- the present application provides a hard disk read-write control method, device, electronic device, and storage medium, so as to achieve low overall operating efficiency.
- the specific technical solutions are as follows:
- an embodiment of the present application provides a hard disk read-write control method.
- the method includes:
- the method further includes:
- the hard disk read-write control method in the embodiment of the present application further includes:
- the operation state of the computing node for the target hard disk is changed to a non-permitted state, and the preset depth reduction rule is used to reduce the token depth of the target hard disk.
- the steps of determining whether the computing node satisfies a preset token release rule are as follows:
- the method further includes:
- the computing node is prohibited from performing read and write operations on the target hard disk.
- the method further includes:
- the read and write resources to be used are removed from the total read and write resources of the target hard disk to obtain the depth threshold.
- an embodiment of the present application provides a hard disk read-write control device, where the device includes:
- a hard disk determining module for determining a target hard disk where the data to be operated is located
- a state determination module configured to determine an operation state of a computing node requesting operation of the data to be operated on the target hard disk
- a depth acquisition module configured to obtain a token depth of the target hard disk if the operation status of the computing node for the target hard disk is not allowed, wherein the token depth of the target hard disk is used to characterize the target; Read and write resources occupied on the hard disk;
- a threshold determination module configured to determine a magnitude relationship between a token depth of the target hard disk and a depth threshold
- a state calibration module configured to change the operation state of the computing node for the target hard disk to an allowed state if the token depth of the target hard disk is less than the depth threshold, and add the preset depth increase rule to increase the The token depth of the target hard disk.
- the hard disk read-write control device in the embodiment of the present application further includes:
- An operation permission module is configured to complete the reading and writing of data to be operated on the target hard disk by the computing node if the operation status of the computing node for the target hard disk is allowed.
- the hard disk read-write control device in the embodiment of the present application further includes:
- a deep release module is configured to change an operation state of the computing node for the target hard disk to a non-permitted state when the computing node meets a preset token release rule, and reduce the rule according to a preset depth reduction rule to reduce the The token depth of the target hard disk.
- the deep release module is specifically configured to:
- the computing node After the computing node completes the read and write operations on the target hard disk, or when the time when the operation status of the computing node for the target hard disk is allowed to reach a preset time threshold, the computing node is The operating state of the target hard disk is changed to a non-permitted state, and the token depth of the target hard disk is reduced according to a preset depth reduction rule.
- the hard disk read-write control device in the embodiment of the present application further includes:
- An operation prohibition module is configured to prohibit the computing node from performing read and write operations on the target hard disk if the token depth of the target hard disk is not less than the depth threshold.
- the hard disk read-write control device in the embodiment of the present application further includes:
- a resource determining module configured to determine the read and write resources of the target hard disk occupied by the computing node when performing read and write operations on the data to be operated, as the read and write resources to be used;
- a threshold determination module is configured to remove the read-write resources to be used from the total read-write resources of the target hard disk to obtain the depth threshold.
- an embodiment of the present application provides an electronic device, including a processor and a memory;
- the memory is used to store a computer program
- the processor is configured to implement the hard disk read-write control method according to any one of the first aspects when executing a program stored in the memory.
- an embodiment of the present application provides a storage medium.
- the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the hard disk read or write according to any one of the first aspects is implemented. Control Method.
- the hard disk read-write control method, device, electronic device and storage medium determine the target hard disk where the data to be operated is located; determine the operation status of the computing node requesting the operation of the data to be operated against the target hard disk; The operating status of the hard disk is non-permitted, and the token depth of the target hard disk is obtained.
- the token depth of the target hard disk is used to represent the read and write resources occupied by the target hard disk.
- the token depth and the depth threshold of the target hard disk are determined. Relationship; if the token depth of the target hard disk is less than the depth threshold, the operation state of the computing node for the target hard disk is changed to an allowed state, and the token depth of the target hard disk is increased according to a preset depth increase rule.
- the token depth of the target hard disk determine whether the target hard disk can still allow access to the computing node.
- the token depth of the target hard disk is less than the depth threshold, allow the computing node to perform corresponding read and write operations on the target hard disk, which can implement multiple computing nodes. Accessing a hard disk at the same time can improve the working efficiency of the computing node, thereby improving the overall operating efficiency of the network.
- the implementation of any product or method of this application does not necessarily need to achieve all the above advantages at the same time.
- FIG. 1 is a schematic flowchart of a hard disk read-write control method according to an embodiment of the present application
- FIG. 2a is a schematic diagram of a data storage system according to an embodiment of the present application.
- FIG. 2b is another schematic diagram of a data storage system according to an embodiment of the present application.
- FIG. 3 is another schematic flowchart of a hard disk read-write control method according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of a hard disk read-write control device according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of an electronic device according to an embodiment of the present application.
- each hard disk allows only one computing node's IO operations at the same time, and other computing nodes that need to read and write the hard disk need to wait in line.
- the bandwidth of hard disks has increased greatly.
- the number of computing nodes in the SAN network has also increased significantly.
- a hard disk allows only one compute node to perform IO operations at the same time, which reduces the utilization efficiency of hard disks and seriously affects SAN The overall speed of the network.
- an embodiment of the present application provides a hard disk read-write control method. Referring to FIG. 1, the method includes:
- the hard disk read-write control method in the embodiment of the present application can be implemented by a control system, and the control system is any system capable of realizing the hard disk read-write control method in the embodiment of the present application.
- the control system is any system capable of realizing the hard disk read-write control method in the embodiment of the present application.
- the control system may be a kind of equipment, including: a processor, a memory, a communication interface, and a bus; the processor, the memory, and the communication interface are connected through a bus and complete communication with each other; the memory stores executable program code; and the processor reads the memory by The executable program code stored in the program is used to run a program corresponding to the executable program code, and is used to execute the hard disk read-write control method in the embodiment of the present application.
- the control system may also be an application program for executing the hard disk read-write control method in the embodiment of the present application at runtime.
- the control system may also be a storage medium for storing executable code, and the executable code is used to execute the hard disk read-write control method in the embodiment of the present application.
- the control system may determine the target hard disk where the data to be operated is located according to the acquired data request instruction, wherein the data request instruction includes an identifier of the data to be operated.
- the data request instruction may further include an identification of a computing node requesting operation of the data to be operated.
- the control system determines the operating state of the computing node with respect to the target hard disk, and the operating state of the computing node with respect to the target hard disk is an allowed state or an unallowed state. For example, the control system establishes an operation status table of the hard disk and the computing node, and for each hard disk in the operating status table, records each computing node whose operating status is allowed for the hard disk; or for each computing node in the operating status table To record which hard disks' operation status is allowed for this compute node.
- the control system is a computing node, and the operation state table of the control system includes an identification of each hard disk targeted by the computing node for an operating state that is allowed.
- the control system can also determine whether the computing node is in the allowed operating state of the target hard disk by judging whether the computing node holds the token of the target hard disk. If the computing node holds the token of the target hard disk, determine the operating status of the computing node for the target hard disk. It is an allowed state; if the computing node does not hold the token of the target hard disk, it is determined that the operating state of the computing node for the target hard disk is a non-permitted state.
- the token depth of the target hard disk may also be stored in the local storage of the control system, for example, the control system obtains the token depth of the target hard disk in the local storage.
- the token depth of the target hard disk can also be saved on the storage management node of the target hard disk.
- the control system can obtain the token depth of the target hard disk through the storage management node of the target hard disk.
- the control system sends an access request to the storage management node of the target hard disk, and the storage management node of the target hard disk returns to the target after receiving the access request.
- the token depth of the hard disk is used to characterize the read and write resources occupied in the hard disk.
- the token depth of the target hard disk can be the bandwidth occupied by the target hard disk, or the token depth of the target hard disk can also be the number of computing nodes that are performing read and write operations on the target hard disk.
- the depth threshold can be set in advance.
- the depth threshold must be set to ensure that at least two computing nodes can simultaneously access a hard disk.
- the depth threshold can be set to 2, 3, 4, or 5 and so on.
- the depth threshold can also be calculated based on resources such as the bandwidth of the target hard disk.
- the hard disk read-write control method in the embodiment of the present application further includes:
- Step 1 Determine the read and write resources of the target hard disk occupied by the computing node when performing read and write operations on the to-be-operated data, as the read and write resources to be used.
- the control system determines that when the computing node performs read and write operations of the data to be operated on the target hard disk, it needs to use the read and write resources of the target hard disk, that is, the read and write resources to be used.
- Step 2 Remove the to-be-used read and write resources from the total read and write resources of the target hard disk to obtain the depth threshold.
- the depth threshold is determined according to the data to be operated, and the read and write resources of the hard disk can be fully utilized.
- the operation status of the computing node for the target hard disk is changed from a non-permitted state to an allowed state, for example, the computing node holds the target hard disk token; at the same time, a rule is added according to a preset depth To increase the token depth of the target hard disk.
- the computing node whose operation status is allowed for the target hard disk can perform read and write operations on the target hard disk.
- the preset depth increase rule may be: In a computing node whose operation status for the target hard disk is in a non-permitted state, each computing node changes the operation status of the target hard disk for the target hard disk to the allowed status, and the current token depth of the target hard disk
- the token depth occupied by the compute node is increased on the basis of. For example, when the token depth of the target hard disk is the number of compute nodes that are performing read and write operations on the target hard disk, it can be set as follows: for each compute node whose operation status for the target hard disk is not allowed, each When the node changes the permitted state of the operation status of the target hard disk, the node adds 1 to the current token depth of the target hard disk.
- the token depth when the token depth is the bandwidth occupied by the target hard disk, it can be set: in a computing node whose operating status for the target hard disk is not allowed, each computing node changes the permitted status for the operating status of the target hard disk.
- the bandwidth occupied by the computing node is increased based on the current token depth of the target hard disk.
- the target hard disk it is determined whether the target hard disk can still allow access to the computing node according to the token depth of the target hard disk.
- the token depth of the target hard disk is less than the depth threshold, the computing node is allowed to perform corresponding read and write operations on the target hard disk. It can realize that multiple computing nodes access one hard disk at the same time, which can improve the working efficiency of the computing nodes, thereby improving the overall operating efficiency of the network.
- the method further includes:
- the operation state of the computing node with respect to the target hard disk is an allowable state
- the read and write operations of the data to be operated on the target hard disk are completed by the computing node.
- the computing node If the operation status of the computing node for the target hard disk is allowed, for example, the computing node holds the token of the target hard disk, the computing node is allowed to perform read and write operations on the target hard disk.
- the computing node when the computing node is in the allowed operating state of the target hard disk, the computing node performs read and write operations on the target hard disk according to the data request instruction, so that multiple computing nodes can simultaneously access one hard disk, which can improve the computing node's performance. Work efficiency, thereby improving the overall operating efficiency of the network.
- the hard disk read-write control method in the embodiment of the present application further includes:
- the operating state of the computing node for the target hard disk is changed to a non-permitted state, and the token depth of the target hard disk is reduced according to a preset depth reduction rule.
- the preset token release rules can be set according to actual needs.
- the steps to determine whether the computing nodes meet the preset token release rules are as follows:
- the computing node After the computing node completes the read and write operations on the target hard disk, or when the time when the computing node's operating state for the target hard disk is allowed to reach a preset time threshold, it is determined that the computing node satisfies a preset token release rule.
- the preset time threshold can be set according to the actual situation, for example, it is set to 1 second, 5 seconds, or 10 seconds.
- the preset depth reduction rule is a rule that arbitrarily reduces the token depth of the target hard disk. It can be set as follows: In a computing node whose operation status is allowed for the target hard disk, each computing node's operation status for the target hard disk is changed to In the non-permitted state, the token depth released by the compute node is subtracted from the current token depth of the target hard disk. For example, when the token depth of the target hard disk is the number of compute nodes that are performing read and write operations on the target hard disk, it can be set that: each of the compute nodes is When the operating status of the target hard disk is changed to a non-permitted state, it is reduced by 1 based on the current token depth of the target hard disk.
- the token depth is the bandwidth occupied by the target hard disk
- the control system can directly modify the token depth of the target hard disk in the local storage, thereby reducing the token depth of the target hard disk.
- the control system sends a token depth reduction instruction of the target hard disk to the storage management node of the target hard disk, so that the storage management node of the target hard disk follows the token depth. Reduce instructions to reduce the token depth of the target hard disk.
- the operation state of the computing node for the target hard disk is changed to a non-permitted state, and the preset depth reduction rule is used to reduce the token depth of the target hard disk.
- the release of the hard disk token is guaranteed, thereby ensuring that new computing nodes have the opportunity to read and write to the target hard disk.
- the method further includes:
- the computing node is prohibited from performing read and write operations on the target hard disk.
- the read / write operation of the target hard disk by the computing node is prohibited, thereby ensuring the bandwidth of the computing node which is performing read / write operations on the target hard disk.
- the hard disk read-write control method in the embodiment of the present application can be implemented by a data storage system.
- the data storage system is a cluster distributed storage system, each computing resource of the computing nodes is distributed, and the data storage resources of the storage nodes are hard disks. It is also distributed. Through a single or multiple SAS switch network routes, each computing node can see each other, and each computing node can see each hard disk.
- Compute nodes include: software-business application layer, software-IO flow management layer, software-SAS-HBA driver layer, hardware motherboard, and SAS-HBA card.
- Software-business application layer used to implement various computer application software, initiate data storage read and write requests, and initiate or respond to data communication requests.
- Software-IO flow management layer It is used to aggregate or split data from the software-business application layer, and send it to the software-SAS-HBA (Host Bus Adapter) driver layer after grouping, and the software- The data packet returned by the SAS-HBA driver is passed back to the software-business application layer.
- SAS-HBA Hyper Bus Adapter
- Software-SAS-HBA driver layer used as the initiator to send IO streams to the hard disk, or send the IO streams to the computing node of the destination; when acting as the destination, respond to the IO stream request sent by the computing node of the initiator, via The software-IO flow management layer of this computing node is passed to the software-business application layer of this computing node.
- Hardware motherboard and SAS-HBA card Specific hardware resources used to carry computing nodes, including hardware motherboard, processor, and SAS-HBA card.
- SAS switch It is a hardware device responsible for SASIO routing. Its software program records the SAS address routing table of all SAS devices in the data storage system of the embodiment of this application, which can implement SASIO switching.
- SAS expander It is a hardware device of a storage node and can be connected to multiple hard disks.
- the software program of the SAS expander records the SAS address routing table of all SAS devices in the data storage system in the embodiment of this application, and can control SASIO exchange.
- the data storage system in the embodiment of the present application can not only realize data transmission between a computing node and a hard disk, but also data transmission between computing nodes, thereby realizing cluster communication.
- Distributed management is adopted for computing nodes. When some computing nodes are lost due to crashes and other reasons, other computing nodes do not need to switch data storage. They only need to take over the hard disk data storage resources managed by the lost nodes on average and use it to trigger the average. The amount of information that is taken over is small. Distributed management of hard disks.
- redundancy For example, computing nodes based on RAID (Redundant Arrays of Independent Disks) data redundancy backup Principle, reconstruct lost hard disk data to other hard disks, and enhance disaster recovery capabilities.
- RAID Redundant Arrays of Independent Disks
- a plurality of computing nodes form a ring network. Adjacent computing nodes in the ring network communicate through a SAS switching unit, and the SAS switching unit of the computing node is connected to a SAS expander. Each computing node can see each other, and each computing node can see each hard disk.
- Compute nodes include software-business application layer, software-IO flow management layer, software-SAS-HBA driver layer, hardware motherboard and SAS-HBA card, SAS switching unit; storage nodes include SAS expanders and hard disks.
- Software-business application layer used to implement various computer application software, initiate data storage read and write requests, and initiate or respond to data communication requests.
- Software-IO flow management layer It is used to aggregate or split data from the software-business application layer, send it to the software-SAS-HBA driver layer after grouping, and send the data packets returned by the software-SAS-HBA driver. Back to the software-business application layer.
- Software-SAS-HBA driver layer used as the initiator to send IO streams to the hard disk, or send the IO streams to the computing node of the destination; when acting as the destination, respond to the IO stream request sent by the computing node of the initiator, via The software-IO flow management layer of this computing node is passed to the software-business application layer of this computing node.
- Hardware motherboard and SAS-HBA card Specific hardware resources used to carry computing nodes, including hardware motherboard, processor, and SAS-HBA card.
- SAS switching unit is a module responsible for SASIO routing. Its software program records the SAS address routing table of all SAS devices in the data storage system in the embodiment of this application, which can implement SASIO switching.
- SAS expander It is a hardware device of a storage node and can be connected to multiple hard disks.
- the software program of the SAS expander records the SAS address routing table of all SAS devices in the data storage system in the embodiment of this application, and can control SASIO exchange.
- a hard disk read-write control method includes:
- the software-SAS-HBA driver layer of the compute node periodically queries the HBA queue. For example, the software-SAS-HBA driver layer polls the HBA queue every 10 milliseconds, and obtains from the HBA queue to be sent to Data request instruction for the target hard disk.
- S302 Determine whether the computing node holds the token of the target hard disk. If the token of the target hard disk is held, execute S306; if the token of the target hard disk is not held, execute S303.
- the software-SAS-HBA driver layer determines whether the compute node holds the token of the target hard disk.
- the software-SAS-HBA driver layer sends a token application request to the SAS expander where the target hard disk is located through a SAS-HBA card and a SAS switch. After receiving the token application request, the SAS expander returns the current token depth of the target hard disk to the computing node that sent the token application request.
- S304 Determine the size of the current token depth and depth threshold of the target hard disk. If the current token depth of the target hard disk is less than the depth threshold, perform S305; otherwise, return to S301 to continue execution.
- the software-SAS-HBA driver layer of the compute node After the software-SAS-HBA driver layer of the compute node obtains the current token depth of the target hard disk, compare the current token depth of the target hard disk with the depth threshold.
- the depth threshold must be set to ensure that it can meet at least two calculations. Nodes access a hard disk at the same time. If the current token depth of the target hard disk is greater than or equal to the depth threshold, the data request instruction is not executed to read or write the target hard disk, and S301 is executed, that is, the data request instruction is reacquired in the next cycle.
- the software-SAS-HBA driver layer sends the SAS expander where the target hard disk is located through the SAS-HBA card and SAS switch.
- the token acquisition success instruction wherein the token acquisition success instruction signifies that the token acquisition of the target hard disk is successful.
- the SAS expander increases the token depth of the target hard disk according to a preset depth increase rule, for example, increases the token depth of the target hard disk by one.
- S306 Send a read / write instruction to the target hard disk to perform a read / write operation.
- Software-SAS-HBA driver layer through the SAS-HBA card and SAS switch, etc., sends read and write instructions to the target hard disk for read and write operations to complete the read and write operations on the target hard disk.
- the read and write instructions can be
- the data request instruction may be an instruction different from the data request instruction.
- S307 Determine whether the computing node satisfies a preset token release rule, and if the preset token release rule is satisfied, execute S308.
- the preset token release rule can be set according to actual needs, for example, when the computing node completes reading and writing to the target hard disk, or when the computing node holds the token of the target hard disk for a preset time threshold, It is determined that the computing node satisfies a preset token release rule.
- S308 Release the token of the target hard disk, and send a token release instruction to the SAS expander where the target hard disk is located, so that the SAS expander where the target hard disk is located can reduce the token depth of the target hard disk according to the token release instruction.
- the token of the target hard disk is released, so that the computing node no longer holds the token of the target hard disk.
- the software-SAS-HBA driver layer sends a token release instruction to the SAS expander where the target hard disk is located through a SAS-HBA card, a SAS switch, etc., where the token release instruction represents a token for releasing the target hard disk.
- the SAS expander reduces the token depth of the target hard disk according to a preset depth reduction rule, for example, reduces the token depth of the target hard disk by one.
- An embodiment of the present application further provides a hard disk read-write control device.
- the device includes:
- a hard disk determining module 401 configured to determine a target hard disk where the data to be operated is located;
- a state determination module 402 configured to determine an operation state of the computing node requesting the operation of the data to be operated on the target hard disk;
- the depth obtaining module 403 is configured to obtain the token depth of the target hard disk if the operation status of the computing node for the target hard disk is not allowed, wherein the token depth of the target hard disk is used to characterize that the target hard disk is occupied. Read and write resources;
- a threshold determination module 404 configured to determine the magnitude relationship between the token depth of the target hard disk and the depth threshold
- the state calibration module 405 is configured to change the operation state of the computing node for the target hard disk to an allowed state if the token depth of the target hard disk is less than the depth threshold, and add a command for the target hard disk according to a preset depth increase rule. Card depth.
- the target hard disk it is determined whether the target hard disk can still allow access to the computing node according to the token depth of the target hard disk.
- the token depth of the target hard disk is less than the depth threshold, the computing node is allowed to perform corresponding read and write operations on the target hard disk. It can realize that multiple computing nodes access one hard disk at the same time, which can improve the working efficiency of the computing nodes, thereby improving the overall operating efficiency of the network.
- the hard disk read-write control device in the embodiment of the present application further includes:
- the operation permitting module is configured to complete the read / write operation of the data to be operated on the target hard disk by the computing node if the operation status of the computing node with respect to the target hard disk is allowed.
- the computing node when the computing node is in the allowed operating state of the target hard disk, the computing node performs read and write operations on the target hard disk according to the data request instruction, so that multiple computing nodes can simultaneously access one hard disk, which can improve the computing node's performance. Work efficiency, thereby improving the overall operating efficiency of the network.
- the hard disk read-write control device in the embodiment of the present application further includes:
- the deep release module is used to change the operation status of the computing node for the target hard disk to a non-permitted state when the computing node meets the preset token release rule, and reduce the order of the target hard disk according to the preset depth reduction rule. Card depth.
- the above-mentioned depth release module is specifically configured to:
- the operation status of the computing node for the target hard disk is changed The state is not allowed, and the depth of the token of the target hard disk is reduced according to the preset depth reduction rule.
- the operation state of the computing node for the target hard disk is changed to a non-permitted state, and the preset depth reduction rule is used to reduce the token depth of the target hard disk.
- the release of the hard disk token is guaranteed, thereby ensuring that new computing nodes have the opportunity to read and write to the target hard disk.
- the hard disk read-write control device in the embodiment of the present application further includes:
- An operation prohibition module is configured to prohibit the computing node from performing read and write operations on the target hard disk if the token depth of the target hard disk is not less than the depth threshold.
- the read / write operation of the target hard disk by the computing node is prohibited, thereby ensuring the bandwidth of the computing node which is performing read / write operations on the target hard disk.
- the hard disk read-write control device in the embodiment of the present application further includes:
- a resource determining module configured to determine the read and write resources of the target hard disk occupied by the computing node when the read and write operations are performed on the data to be operated, as the read and write resources to be used;
- the threshold determination module is configured to remove the read-write resources to be used from the total read-write resources of the target hard disk to obtain the depth threshold.
- the depth threshold is determined according to the data to be operated, and the read and write resources of the hard disk can be fully utilized.
- An embodiment of the present application further provides an electronic device.
- the electronic device includes a processor 501 and a memory 502.
- the memory 502 is configured to store a computer program
- the processor 501 is configured to execute the following steps when executing a program stored in the memory 502:
- the operation state of the computing node for the target hard disk is changed to an allowed state, and the token depth of the target hard disk is increased according to a preset depth increase rule.
- the target hard disk it is determined whether the target hard disk can still allow access to the computing node according to the token depth of the target hard disk.
- the token depth of the target hard disk is less than the depth threshold, the computing node is allowed to perform corresponding read and write operations on the target hard disk. It can realize that multiple computing nodes access one hard disk at the same time, which can improve the working efficiency of the computing nodes, thereby improving the overall operating efficiency of the network.
- the electronic device in the embodiment of the present application further includes a communication interface and a communication bus, where the processor 501, the communication interface, and the memory 502 complete communication with each other through the communication bus.
- processor 501 when configured to execute a program stored in the memory 502, it can also implement any of the hard disk read-write control methods described above.
- the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, the figure only uses a thick line, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the aforementioned electronic device and other devices.
- the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
- NVM non-Volatile Memory
- the memory may also be at least one storage device located far from the foregoing processor.
- the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- CPU central processing unit
- NP network processor
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- An embodiment of the present application further provides a computer-readable storage medium.
- a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the following steps are implemented:
- the operation state of the computing node for the target hard disk is changed to an allowed state, and the token depth of the target hard disk is increased according to a preset depth increase rule.
- the target hard disk it is determined whether the target hard disk can still allow access to the computing node according to the token depth of the target hard disk.
- the token depth of the target hard disk is less than the depth threshold, the computing node is allowed to perform corresponding read and write operations on the target hard disk. It can realize that multiple computing nodes access one hard disk at the same time, which can improve the working efficiency of the computing nodes, thereby improving the overall operating efficiency of the network.
- any of the hard disk read-write control methods described above can also be implemented.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
Description
Claims (14)
- 一种硬盘读写控制方法,其特征在于,所述方法包括:A hard disk read-write control method, characterized in that the method includes:确定待操作数据所在的目标硬盘;Determine the target hard disk where the data to be operated is located;判断请求操作所述待操作数据的计算节点针对所述目标硬盘的操作状态;Determine an operation state of a computing node requesting operation of the data to be operated with respect to the target hard disk;若所述计算节点针对所述目标硬盘的操作状态为非允许状态,获取所述目标硬盘的令牌深度,其中,所述目标硬盘的令牌深度用于表征所述目标硬盘中被占用的读写资源;Obtaining the token depth of the target hard disk if the operation status of the target hard disk for the target hard disk is a non-permitted state, wherein the token depth of the target hard disk is used to represent an occupied read in the target hard disk; Write resources判断所述目标硬盘的令牌深度与深度阈值的大小关系;Determining a magnitude relationship between a token depth of the target hard disk and a depth threshold;若所述目标硬盘的令牌深度小于所述深度阈值,将所述计算节点针对所述目标硬盘的操作状态变更为允许状态,并按照预设深度增加规则,增加所述目标硬盘的令牌深度。If the token depth of the target hard disk is less than the depth threshold, change the operation state of the computing node for the target hard disk to an allowed state, and increase the token depth of the target hard disk according to a preset depth increase rule. .
- 根据权利要求1所述的方法,其特征在于,在所述判断请求操作所述待操作数据的计算节点针对所述目标硬盘的操作状态之后,所述方法还包括:The method according to claim 1, wherein after the judging an operation state of the computing node that requested to operate the data to be operated on the target hard disk, the method further comprises:若所述计算节点针对所述目标硬盘的操作状态为允许状态,通过所述计算节点完成对所述目标硬盘中待操作数据的读写操作。If the operation state of the computing node with respect to the target hard disk is an allowed state, reading and writing operations to be performed on the target hard disk by the computing node are completed.
- 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, further comprising:在所述计算节点满足预设令牌释放规则时,将所述计算节点针对所述目标硬盘的操作状态变更为非允许状态,并按照预设深度减少规则,减少所述目标硬盘的令牌深度。When the computing node satisfies a preset token release rule, the operation state of the computing node for the target hard disk is changed to a non-permitted state, and the preset depth reduction rule is used to reduce the token depth of the target hard disk. .
- 根据权利要求3所述的方法,其特征在于,判断所述计算节点是否满足预设令牌释放规则的步骤如下:The method according to claim 3, wherein the step of determining whether the computing node satisfies a preset token release rule is as follows:在所述计算节点完成对所述目标硬盘的读写操作后,或所述计算节点针对所述目标硬盘的操作状态为允许状态的时间达到预设时间阈值时,判定所述计算节点满足预设令牌释放规则。Determining that the computing node satisfies a preset after the computing node completes a read-write operation on the target hard disk, or when the time when the operating state of the computing node for the target hard disk is in an allowed state reaches a preset time threshold Token release rules.
- 根据权利要求1所述的方法,其特征在于,在所述判断所述目标硬盘的 令牌深度与深度阈值的大小关系之后,所述方法还包括:The method according to claim 1, wherein after determining a magnitude relationship between a token depth and a depth threshold of the target hard disk, the method further comprises:若所述目标硬盘的令牌深度不小于所述深度阈值,禁止所述计算节点对所述目标硬盘进行读写操作。If the token depth of the target hard disk is not less than the depth threshold, the computing node is prohibited from performing read and write operations on the target hard disk.
- 根据权利要求1所述的方法,其特征在于,在所述判断所述目标硬盘的令牌深度与深度阈值的大小关系之前,所述方法还包括:The method according to claim 1, wherein before the determining a magnitude relationship between a token depth and a depth threshold of the target hard disk, the method further comprises:确定所述计算节点对所述待操作数据进行读写操作时,所占用的所述目标硬盘的读写资源,作为待使用读写资源;Determining that the read and write resources of the target hard disk occupied by the computing node when performing read and write operations on the data to be operated are used as read and write resources to be used;在所述目标硬盘的总读写资源中去除所述待使用读写资源,得到所述深度阈值。The read and write resources to be used are removed from the total read and write resources of the target hard disk to obtain the depth threshold.
- 一种硬盘读写控制装置,其特征在于,所述装置包括:A hard disk read-write control device is characterized in that the device includes:硬盘确定模块,用于确定待操作数据所在的目标硬盘;A hard disk determining module for determining a target hard disk where the data to be operated is located;状态判定模块,用于判断请求操作所述待操作数据的计算节点针对所述目标硬盘的操作状态;A state determination module, configured to determine an operation state of a computing node requesting operation of the data to be operated on the target hard disk;深度获取模块,用于若所述计算节点针对所述目标硬盘的操作状态为非允许状态,获取所述目标硬盘的令牌深度,其中,所述目标硬盘的令牌深度用于表征所述目标硬盘中被占用的读写资源;A depth acquisition module, configured to obtain a token depth of the target hard disk if the operation status of the computing node for the target hard disk is not allowed, wherein the token depth of the target hard disk is used to characterize the target; Read and write resources occupied on the hard disk;阈值判定模块,用于判断所述目标硬盘的令牌深度与深度阈值的大小关系;A threshold determination module, configured to determine a magnitude relationship between a token depth of the target hard disk and a depth threshold;状态标定模块,用于若所述目标硬盘的令牌深度小于所述深度阈值,将所述计算节点针对所述目标硬盘的操作状态变更为允许状态,并按照预设深度增加规则,增加所述目标硬盘的令牌深度。A state calibration module, configured to change the operation state of the computing node for the target hard disk to an allowed state if the token depth of the target hard disk is less than the depth threshold, and add the preset depth increase rule to increase the The token depth of the target hard disk.
- 根据权利要求7所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 7, further comprising:操作允许模块,用于若所述计算节点针对所述目标硬盘的操作状态为允许状态,通过所述计算节点完成对所述目标硬盘中待操作数据的读写操作。An operation permission module is configured to complete the reading and writing of data to be operated on the target hard disk by the computing node if the operation status of the computing node for the target hard disk is allowed.
- 根据权利要求7或8所述的装置,其特征在于,所述装置还包括:The device according to claim 7 or 8, wherein the device further comprises:深度释放模块,用于在所述计算节点满足预设令牌释放规则时,将所述 计算节点针对所述目标硬盘的操作状态变更为非允许状态,并按照预设深度减少规则,减少所述目标硬盘的令牌深度。A deep release module is configured to change an operation state of the computing node for the target hard disk to a non-permitted state when the computing node meets a preset token release rule, and reduce the rule according to a preset depth reduction rule to reduce the The token depth of the target hard disk.
- 根据权利要求9所述的装置,其特征在于,所述深度释放模块,具体用于:The device according to claim 9, wherein the depth release module is specifically configured to:在所述计算节点完成对所述目标硬盘的读写操作后,或所述计算节点针对所述目标硬盘的操作状态为允许状态的时间达到预设时间阈值时,将所述计算节点针对所述目标硬盘的操作状态变更为非允许状态,并按照预设深度减少规则,减少所述目标硬盘的令牌深度。After the computing node completes the read and write operations on the target hard disk, or when the time when the operation status of the computing node for the target hard disk is allowed to reach a preset time threshold, the computing node is The operating state of the target hard disk is changed to a non-permitted state, and the token depth of the target hard disk is reduced according to a preset depth reduction rule.
- 根据权利要求7所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 7, further comprising:操作禁止模块,用于若所述目标硬盘的令牌深度不小于所述深度阈值,禁止所述计算节点对所述目标硬盘进行读写操作。An operation prohibition module is configured to prohibit the computing node from performing read and write operations on the target hard disk if the token depth of the target hard disk is not less than the depth threshold.
- 根据权利要求7所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 7, further comprising:资源确定模块,用于确定所述计算节点对所述待操作数据进行读写操作时,所占用的所述目标硬盘的读写资源,作为待使用读写资源;A resource determining module, configured to determine the read and write resources of the target hard disk occupied by the computing node when performing read and write operations on the data to be operated, as the read and write resources to be used;阈值确定模块,用于在所述目标硬盘的总读写资源中去除所述待使用读写资源,得到所述深度阈值。A threshold determination module is configured to remove the read-write resources to be used from the total read-write resources of the target hard disk to obtain the depth threshold.
- 一种电子设备,其特征在于,包括处理器及存储器;An electronic device, comprising a processor and a memory;所述存储器,用于存放计算机程序;The memory is used to store a computer program;所述处理器,用于执行所述存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。The processor is configured to implement the method steps according to any one of claims 1-6 when executing a program stored in the memory.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps according to any one of claims 1-6 are implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810496764.2A CN110515535B (en) | 2018-05-22 | 2018-05-22 | Hard disk read-write control method and device, electronic equipment and storage medium |
CN201810496764.2 | 2018-05-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019223445A1 true WO2019223445A1 (en) | 2019-11-28 |
Family
ID=68617361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/082262 WO2019223445A1 (en) | 2018-05-22 | 2019-04-11 | Hard disk read-write control method and apparatus, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110515535B (en) |
WO (1) | WO2019223445A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112148222B (en) * | 2020-09-21 | 2023-08-25 | 浙江大华技术股份有限公司 | Configuration method and device of database hard disk, storage medium and electronic device |
CN112838991B (en) * | 2021-02-09 | 2023-03-24 | 芯河半导体科技(无锡)有限公司 | Method for adaptively adjusting token value of small-bandwidth scheduler |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101419828A (en) * | 2008-11-20 | 2009-04-29 | 杭州海康威视数字技术股份有限公司 | Hard disc video recording and retrieval method for analog magnetic tape serial schema |
CN101803330A (en) * | 2007-09-14 | 2010-08-11 | 国际商业机器公司 | Method, system and computer program for balancing the access to shared resources with credit-based tokens |
CN102663310A (en) * | 2012-03-23 | 2012-09-12 | 华为技术有限公司 | Method and device for protecting storage system |
CN107276827A (en) * | 2017-07-25 | 2017-10-20 | 郑州云海信息技术有限公司 | Qos implementation method and device in a kind of distributed memory system |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100396065C (en) * | 2005-01-14 | 2008-06-18 | 清华大学 | A method for implementing iSCSI memory system |
CN101566933B (en) * | 2009-06-11 | 2012-07-04 | 成都市华为赛门铁克科技有限公司 | Method and device for configurating cache and electronic equipment and data read-write equipment |
CN102012794A (en) * | 2010-11-19 | 2011-04-13 | 北京兆易创新科技有限公司 | Solid state disk and access control method thereof, and solid state disk controller |
CN102215268A (en) * | 2011-07-14 | 2011-10-12 | 北京飞杰信息技术有限公司 | Method and device for transferring file data |
CN103870202B (en) * | 2012-12-10 | 2018-08-21 | 上海优刻得信息科技有限公司 | A kind of distributed storage method and system of block device |
CN103513938B (en) * | 2013-09-16 | 2016-06-29 | 华为技术有限公司 | A kind of RAID RAID system expansion method and device |
CN104734985A (en) * | 2013-12-23 | 2015-06-24 | 腾讯数码(天津)有限公司 | Data receiving flow control method and system |
JP6382454B2 (en) * | 2014-11-06 | 2018-08-29 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Distributed storage and replication system and method |
CN105138276B (en) * | 2015-07-14 | 2018-05-18 | 苏州科达科技股份有限公司 | Data storage method and data storage system |
CN105630416B (en) * | 2015-12-24 | 2018-10-26 | 创新科存储技术(深圳)有限公司 | Disk method and device is kicked in a kind of cloud storage system |
CN105978987B (en) * | 2016-06-16 | 2019-04-26 | 上海天玑科技股份有限公司 | A kind of virtual method for Exadata memory node |
CN106354436A (en) * | 2016-09-20 | 2017-01-25 | 郑州云海信息技术有限公司 | Storage system based on distributed IPSAN |
CN106775456B (en) * | 2016-11-22 | 2019-11-26 | 华为技术有限公司 | A kind of data processing method, apparatus and system |
CN107145384A (en) * | 2017-04-17 | 2017-09-08 | 广州孩教圈信息科技股份有限公司 | Method for allocating tasks and system |
CN107423111B (en) * | 2017-06-23 | 2020-06-26 | 浪潮云信息技术有限公司 | Openstack environment computing node back-end storage management method |
CN107402721A (en) * | 2017-06-30 | 2017-11-28 | 郑州云海信息技术有限公司 | A kind of control method of hard disk, device and server |
-
2018
- 2018-05-22 CN CN201810496764.2A patent/CN110515535B/en active Active
-
2019
- 2019-04-11 WO PCT/CN2019/082262 patent/WO2019223445A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101803330A (en) * | 2007-09-14 | 2010-08-11 | 国际商业机器公司 | Method, system and computer program for balancing the access to shared resources with credit-based tokens |
CN101419828A (en) * | 2008-11-20 | 2009-04-29 | 杭州海康威视数字技术股份有限公司 | Hard disc video recording and retrieval method for analog magnetic tape serial schema |
CN102663310A (en) * | 2012-03-23 | 2012-09-12 | 华为技术有限公司 | Method and device for protecting storage system |
CN107276827A (en) * | 2017-07-25 | 2017-10-20 | 郑州云海信息技术有限公司 | Qos implementation method and device in a kind of distributed memory system |
Also Published As
Publication number | Publication date |
---|---|
CN110515535B (en) | 2021-01-01 |
CN110515535A (en) | 2019-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9864517B2 (en) | Actively responding to data storage traffic | |
CN113918101B (en) | Method, system, equipment and storage medium for writing data cache | |
US11726701B2 (en) | Memory expander, heterogeneous computing device using memory expander, and operation method of heterogenous computing | |
CN103890729A (en) | Collaborative management of shared resources | |
CN112988066B (en) | Data processing method and device | |
KR102646619B1 (en) | Method and system providing file system for an electronic device comprising a composite memory device | |
JP2017211984A (en) | METHOD, SYSTEM AND APPARATUS FOR QoS-AWARE INPUT/OUTPUT MANAGEMENT FOR PCIe STORAGE SYSTEM WITH RECONFIGURABLE MULTI-PORTS | |
US11556391B2 (en) | CPU utilization for service level I/O scheduling | |
US10860223B1 (en) | Method and system for enhancing a distributed storage system by decoupling computation and network tasks | |
WO2014206078A1 (en) | Memory access method, device and system | |
CN110119304A (en) | A kind of interruption processing method, device and server | |
CN114546902A (en) | System, apparatus and method for multi-protocol based access to memory | |
US10846094B2 (en) | Method and system for managing data access in storage system | |
WO2019223445A1 (en) | Hard disk read-write control method and apparatus, electronic device and storage medium | |
US9069621B2 (en) | Submitting operations to a shared resource based on busy-to-success ratios | |
JP5893028B2 (en) | System and method for efficient sequential logging on a storage device that supports caching | |
WO2015078193A1 (en) | Management method for storage space and storage management device | |
KR20220082563A (en) | Storate device and operating method of the same | |
JP2015088071A (en) | Information processor, storage device control circuit, and control method for storage device | |
CN114550773A (en) | Memory controller, memory system, and data processing method | |
CN110515536B (en) | Data storage system | |
KR20240063438A (en) | Method and device to reconfigure memory region of memory device dynamically | |
KR102365261B1 (en) | A electronic system and operating method of memory device | |
US11055218B2 (en) | Apparatus and methods for accelerating tasks during storage caching/tiering in a computing environment | |
CN112291292B (en) | Data storage method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19808267 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19808267 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19808267 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.06.2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19808267 Country of ref document: EP Kind code of ref document: A1 |