CN106776032B - The treating method and apparatus of the I/O request of distributed block storage - Google Patents

The treating method and apparatus of the I/O request of distributed block storage Download PDF

Info

Publication number
CN106776032B
CN106776032B CN201611201071.3A CN201611201071A CN106776032B CN 106776032 B CN106776032 B CN 106776032B CN 201611201071 A CN201611201071 A CN 201611201071A CN 106776032 B CN106776032 B CN 106776032B
Authority
CN
China
Prior art keywords
node
cpu
request
volume
volume controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201611201071.3A
Other languages
Chinese (zh)
Other versions
CN106776032A (en
Inventor
董冠军
游峰
王劲凯
姜金瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Internet Science And Technology Ltd Of Cloud Of China
Original Assignee
Beijing Internet Science And Technology Ltd Of Cloud Of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Internet Science And Technology Ltd Of Cloud Of China filed Critical Beijing Internet Science And Technology Ltd Of Cloud Of China
Priority to CN201611201071.3A priority Critical patent/CN106776032B/en
Publication of CN106776032A publication Critical patent/CN106776032A/en
Application granted granted Critical
Publication of CN106776032B publication Critical patent/CN106776032B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Abstract

An embodiment of the present invention provides a kind for the treatment of method and apparatus of the I/O request of distributed block storage.The processing method of the I/O request of the distributed block storage, including:Receive the I/O request of client;The I/O request carries book to be visited and the operational order to the book;Obtain at least two nodes where the book;In at least two node, a node is selected, as volume controller node;Obtain the corresponding at least two available CPU of the volume controller node;In described at least two available CPU, a CPU is selected;The I/O request is sent to the CPU of selection so that the I/O request is added in the task queue of the CPU of selection, and the CPU of selection is waited for be handled according to the I/O request.The present invention can improve system treatment effeciency.

Description

The treating method and apparatus of the I/O request of distributed block storage
Technical field
The present invention relates to the processing methods of I/O request that distributed block field of storage more particularly to a kind of distributed block store And device.
Background technology
In concurrent program design, how to carry out the synchronization of access of shared resource is a crucial design problem, is influenced Framework, reliability and the performance of final system.In high performance network server, there are various synchronization mechanisms, such as semaphore, read-write Lock, spin lock, but all highly impact the oncurrent processing ability of program.Because concurrent I/O operation can be handled, still When concurrently triggering lock, there is a situation where that IO does not perform to maximum in queuing but cpu resource, lead to the wasting of resources, performance It is unexcellent.
For example, when concurrent IO is initiated, synchronization mechanism is first done, such as volume lock, each IO is allowed to be lined up.Then, sequentially often One IO is handled to randomly choose CPU core, is treated that CPU core is disposed, is discharged the lock of next IO to handle next IO.This Sample, complete in a upper I O process, the interval before next IO releases lock, CPU core there is idle condition.Accordingly, there exist moneys Source wastes, and CPU core cannot play maximum processing capability, lead to less than optimal performance.
Invention content
The embodiment provides a kind for the treatment of method and apparatus of the I/O request of distributed block storage, can improve System treatment effeciency.
To achieve these goals, this invention takes following technical solutions.
A kind of processing method of the I/O request of distributed block storage, including:
Receive the I/O request of client;The I/O request carries book to be visited and the behaviour to the book It instructs;
Obtain at least two nodes where the book;
In at least two node, a node is selected, as volume controller node;
Obtain the corresponding at least two available CPU of the volume controller node;
In described at least two available CPU, a CPU is selected;
The I/O request is sent to the CPU of selection so that the I/O request is added to the CPU's of selection In task queue, the CPU of selection is waited for be handled according to the I/O request.
A kind of processing unit of the I/O request of distributed block storage, including:
Receiving unit receives the I/O request of client;The I/O request carries book to be visited and to described The operational order of book;
First acquisition unit obtains at least two nodes where the book;
First selecting unit at least two node, selects a node, as volume controller node;
Second acquisition unit obtains the corresponding at least two available CPU of the volume controller node;
Second selecting unit in described at least two available CPU, selects a CPU;
The I/O request is sent to the CPU of selection by transmitting element so that the I/O request is added to the institute of selection In the task queue for stating CPU, the CPU of selection is waited for be handled according to the I/O request.
It can be seen from the technical solution provided by embodiments of the invention described above in the embodiment of the present invention, in distributed block In storage system, the processing of volume controller and CPU scheduler is introduced, to control the concurrently access each rolled up, does not use volume lock It sorting to handle I/O operation, but transfers to CPU to handle, CPU can be handled according to the sequence for receiving request, so there is no need to Synchronization mechanism can improve the I O process ability of system, and then optimize performance.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description It obtains significantly or is recognized by the practice of the present invention.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for this For the those of ordinary skill of field, without having to pay creative labor, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the process flow of the processing method of the I/O request of a kind of distributed block storage that the embodiment of the present invention one provides Figure;
Fig. 2 is the framework signal of the system in the processing method for the I/O request that distributed block stores in the embodiment of the present invention Figure;
Fig. 3 is a kind of process flow of the processing method of the I/O request of distributed block storage provided by Embodiment 2 of the present invention Figure;
Fig. 4 is the process flow of the processing method of the I/O request of a kind of distributed block storage that the embodiment of the present invention three provides Figure;
Fig. 5 is a kind of connection signal of the processing unit of the I/O request of distributed block storage provided in an embodiment of the present invention Figure.
Specific embodiment
Embodiments of the present invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning Same or similar element is represented to same or similar label eventually or there is the element of same or like function.Below by ginseng The embodiment for examining attached drawing description is exemplary, and is only used for explaining the present invention, and is not construed as limiting the claims.
As shown in Figure 1, for a kind of processing method of the I/O request of distributed block storage of the present invention, including:
Step 11, the I/O request of client is received;The I/O request carries book to be visited and to the number According to the operational order of volume;
Step 12, at least two nodes where the book are obtained;
Step 13, at least two node, a node is selected, as volume controller node;
Step 14, the corresponding at least two available CPU of the volume controller node is obtained;
Step 15, in described at least two available CPU, a CPU is selected;
Step 16, the I/O request is sent to the CPU of selection so that the I/O request is added to the described of selection In the task queue of CPU, the CPU of selection is waited for be handled according to the I/O request.
In the embodiment of the present invention, in distributed block storage system, the processing of volume controller and CPU scheduler is introduced, is come The concurrently access each rolled up is controlled, does not use volume lock to handle I/O operation sequence, but transfers to CPU to handle, CPU is according to connecing The sequence of request is received to handle, so there is no need to synchronization mechanisms, can improve the I O process ability of system, and then optimization property Energy.
Specifically, step 15 includes:By HASH algorithms, in described at least two available CPU, a CPU is selected.Tool Body can be:core_hash(volume):=volume.id%cpuset_usable;
Wherein, core_hash (volume) is the ID of the CPU selected;Volume.id is the ID of book;% Represent modulo operation;Cpuset_usable represents the total quantity of the corresponding available CPU of volume controller node.Above-mentioned algorithm is existing There is technology, therefore do not repeat herein.It is of course also possible to it is handled using other algorithm.
In one embodiment, step 13 includes:Using lease leases algorithms, at least two node, choosing A node is selected, as volume controller node.Above-mentioned algorithm is the prior art, therefore is not repeated herein.It is of course also possible to it uses Other algorithm is handled.
In one embodiment, step 13 includes:
Step 131, all nodes in the cluster of distributed block storage are obtained;
Step 132, in all nodes, a lease host node is selected;
Step 133, the lease host node uses lease leases algorithms, at least two node, selects one A node, as volume controller node.
The design philosophy of the present invention is described below.
In distributed block storage system, volume is most basic processing unit.Therefore, process resource can be carried out by volume It divides.The core concept of the present invention is that the processing of each volume is scheduled in unique control node, is then scheduled for On some specific CPU.It is that sequence performs, so there is no need to reuse synchronization mechanism for each CPU.In this way Concurrent IO can allow corresponding CPU core to play maximum processing capacity, to improve storage system processing capacity.
In distributed block storage system, volume is most basic processing unit, to all I O process of volume, introduces volume control The processing of device and CPU scheduler to control the concurrently access each rolled up, does not use volume lock to handle I/O operation sequence, but CPU is transferred to handle, CPU can realize that sequence is handled automatically, and so there is no need to synchronization mechanisms, can greatly improve system I O process ability, and then optimize performance.
Fig. 2 is the Organization Chart of system of the present invention, and the present invention is based on this frameworks to design.System has multiple data Volume, multiple nodes, each book distribution are stored on multiple nodes, and each node corresponds to multiple CPU, and CPU is for processing pair Data manipulation in the node answered.In the present invention, the book that client currently prepares operation is obtained, then finds and preserves institute Multiple nodes of book are stated, from the multiple node, select a node, as volume controller node, reselection obtains The corresponding at least two available CPU of the volume controller node;In described at least two available CPU, a CPU is selected, is made The I/O request is added in the task queue of the CPU of selection, wait for the CPU of selection according to the I/O request into Row processing.Since the speed ratio of CPU processing is very fast, compared to existing lock mechanism, processing speed is improved.
1st, volume controller
Using mini paxos (distributed consensus) algorithm, lease master (lease main control) node is elected, entirely Office is unique.Above-mentioned algorithm is the prior art, therefore is not repeated herein.
Using lease algorithms, volume controller is elected.
2nd, scheduler
Hash algorithm calculates the CPU core of volume processing binding
core_hash(volume):=volume.id%CPUset_usable.
After (concurrent) volume IO is initiated, storage system selects unique volume controller node, and IO gives volume controller node, so Afterwards according to the algorithm of scheduler, the CPU core that IO is currently rolled up in volume controller node processing is calculated, the CPU core that IO is transferred to select To handle.Concurrent tasks can be lined up at the CPU core selected in this way, and CPU core can play maximum processing capacity and is lined up to handle All IO.
As described in Figure 3, process flow of the invention includes:
First, I/O request is received;
Then, volume controller node is selected;
Then, according to scheduler algorithms, which the processing CPU core for obtaining this IO is;
Then, IO gives CPU core processing;
Then, concurrent IO is lined up in corresponding CPU core.
As described in Figure 4, process flow of the invention includes:
First, the I/O instruction of Client clients is received;
Then, client Connection Service end;First connection target (tie point at client Connection Service end), visits again Volume.
Then, Controller Node Controllers are selected;
Then, the CPU core 1 of Controller Node Controllers is selected.
As described in Figure 5, it is a kind of processing unit of the I/O request of distributed block storage of the present invention, including:
Receiving unit 41 receives the I/O request of client;The I/O request carries book to be visited and to institute State the operational order of book;
First acquisition unit 42 obtains at least two nodes where the book;
First selecting unit 43 at least two node, selects a node, as volume controller node;
Second acquisition unit 44 obtains the corresponding at least two available CPU of the volume controller node;
Second selecting unit 45 in described at least two available CPU, selects a CPU;
The I/O request is sent to the CPU of selection so that the I/O request is added to selection by transmitting element 46 In the task queue of the CPU, the CPU of selection is waited for be handled according to the I/O request.
Wherein, second selecting unit 45 is specially:Pass through HASH algorithms, in described at least two available CPU, choosing Select a CPU.Specially:Second selecting unit is specially: core_hash(volume):=volume.id% cpuset_usable;Wherein, core_hash (volume) is the ID of the CPU selected;Volume.id is book ID;% represents modulo operation;Cpuset_usable represents the total quantity of the corresponding available CPU of volume controller node.
The first selecting unit 43 is specially:
Using lease leases algorithms, at least two node, a node is selected, as volume controller section Point.
The foregoing is only a preferred embodiment of the present invention, but protection scope of the present invention be not limited thereto, Any one skilled in the art in the technical scope disclosed by the present invention, the change or replacement that can be readily occurred in, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims Subject to.

Claims (2)

1. a kind of processing method of the I/O request of distributed block storage, which is characterized in that including:
Receive the I/O request of client;The I/O request carries book to be visited and the operation of the book is referred to It enables;
Obtain at least two nodes where the book;
In at least two node, a node is selected, as volume controller node;
Obtain the corresponding at least two available CPU of the volume controller node;
In described at least two available CPU, a CPU is selected;
The I/O request is sent to the CPU of selection so that the I/O request is added to the task team of the CPU of selection In row, the CPU of selection is waited for be handled according to the I/O request;
It is described in described at least two available CPU, select a CPU the step of include:By HASH algorithms, it is described at least In two available CPU, a CPU is selected;
It is described by HASH algorithms, in described at least two available CPU, the step of selecting a CPU, includes:core_hash (volume):=volume.id%cpuset_usable
Wherein, core_hash (volume) is the ID of the CPU selected;Volume.id is the ID of the book;% Represent modulo operation;Cpuset_usable represents the total quantity of the corresponding available CPU of volume controller node;
It is described at least two node, select a node, include as the step of volume controller node:Using lease Leases algorithms at least two node, select a node, as volume controller node;
It is described at least two node, select a node, include as the step of volume controller node:Obtain distribution All nodes in the cluster of formula block storage;In all nodes, a lease host node is selected;The lease host node Using lease leases algorithms, at least two node, a node is selected, as volume controller node.
2. a kind of processing unit of the I/O request of distributed block storage, which is characterized in that including:
Receiving unit receives the I/O request of client;The I/O request carries book to be visited and to the data The operational order of volume;
First acquisition unit obtains at least two nodes where the book;
First selecting unit at least two node, selects a node, as volume controller node;
Second acquisition unit obtains the corresponding at least two available CPU of the volume controller node;
Second selecting unit in described at least two available CPU, selects a CPU;
The I/O request is sent to the CPU of selection so that the I/O request is added to the described of selection by transmitting element In the task queue of CPU, the CPU of selection is waited for be handled according to the I/O request;
Second selecting unit is specially:By HASH algorithms, in described at least two available CPU, a CPU is selected;
Second selecting unit is specially:
core_hash(volume):=volume.id%cpuset_usable
Wherein, core_hash (volume) is the ID of the CPU selected;Volume.id is the ID of book;% is represented Modulo operation;Cpuset_usable represents the total quantity of the corresponding available CPU of volume controller node;
The first selecting unit is specially:Using lease leases algorithms, at least two node, a section is selected Point, as volume controller node;
The first selecting unit is specially:It is described at least two node, select a node, as volume controller The step of node, includes:Obtain all nodes in the cluster of distributed block storage;In all nodes, a rent is selected About host node;The lease host node uses lease leases algorithms, at least two node, selects a node, As volume controller node.
CN201611201071.3A 2016-12-22 2016-12-22 The treating method and apparatus of the I/O request of distributed block storage Expired - Fee Related CN106776032B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611201071.3A CN106776032B (en) 2016-12-22 2016-12-22 The treating method and apparatus of the I/O request of distributed block storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611201071.3A CN106776032B (en) 2016-12-22 2016-12-22 The treating method and apparatus of the I/O request of distributed block storage

Publications (2)

Publication Number Publication Date
CN106776032A CN106776032A (en) 2017-05-31
CN106776032B true CN106776032B (en) 2018-07-03

Family

ID=58897394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611201071.3A Expired - Fee Related CN106776032B (en) 2016-12-22 2016-12-22 The treating method and apparatus of the I/O request of distributed block storage

Country Status (1)

Country Link
CN (1) CN106776032B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273051B (en) * 2017-05-15 2018-07-03 北京华云网际科技有限公司 The reading/writing method and device of I/O data
CN107256131B (en) * 2017-06-15 2019-10-01 深圳市云舒网络技术有限公司 A kind of performance optimization method based on TCMU virtual disk distributed block storage system
CN107291396B (en) * 2017-06-27 2018-04-13 北京华云网际科技有限公司 The wiring method and device of I/O data in distributed block storage system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090063852A (en) * 2007-12-14 2009-06-18 한국전자통신연구원 Disk i/o scheduler for server virtualization environment and scheduling method thereof
CN101938516A (en) * 2010-09-02 2011-01-05 华中科技大学 User-oriented dynamic storage resource distribution method
CN105183666A (en) * 2015-09-14 2015-12-23 浪潮(北京)电子信息产业有限公司 Scheduling control method, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6292856B1 (en) * 1999-01-29 2001-09-18 International Business Machines Corporation System and method for application influence of I/O service order post I/O request
US8312175B2 (en) * 2010-01-21 2012-11-13 Vmware, Inc. Virtual machine access to storage via a multi-queue IO storage adapter with optimized cache affinity and PCPU load balancing
CN104144194A (en) * 2013-05-10 2014-11-12 中国移动通信集团公司 Data processing method and device for cloud storage system
EP3126998A4 (en) * 2015-02-26 2017-11-29 Strato Scale Ltd. Ordering schemes for network and storage i/o requests for minimizing workload idle time and inter-workload interference

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090063852A (en) * 2007-12-14 2009-06-18 한국전자통신연구원 Disk i/o scheduler for server virtualization environment and scheduling method thereof
CN101938516A (en) * 2010-09-02 2011-01-05 华中科技大学 User-oriented dynamic storage resource distribution method
CN105183666A (en) * 2015-09-14 2015-12-23 浪潮(北京)电子信息产业有限公司 Scheduling control method, device and system

Also Published As

Publication number Publication date
CN106776032A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN103297456B (en) Access method and the distributed system of resource is shared under a kind of distributed system
CN103309738B (en) User job dispatching method and device
CN104750543B (en) Thread creation method, service request processing method and relevant device
US9467399B2 (en) Processing concurrency in a network device
CN106776032B (en) The treating method and apparatus of the I/O request of distributed block storage
CN106446067A (en) Transaction data acquisition method and apparatus
CN106354544A (en) Virtual machine creating method and system and host
US20070033205A1 (en) Method or apparatus for selecting a cluster in a group of nodes
CN110008031B (en) Device operation method, cluster system, electronic device and readable storage medium
WO2009008007A2 (en) Data packet processing method for a multi core processor
CN104518987A (en) Method and device for processing parallel multithreading messages
CN105511954A (en) Method and device for message processing
EP2393015B1 (en) Information processing system, information processing device, control method for information processing device, control program for information processing device, and computer-readable recording medium
CN103366022B (en) Information handling system and disposal route thereof
JP2009059310A (en) Program controller
CN104461705B (en) A kind of method and storage control, cluster storage system of business access
JP5672504B2 (en) Parallel packet processing method and apparatus for switching distribution destination
CN105049240B (en) A kind of message treatment method and server
CN104408372B (en) A kind of mimicry application solutions system and method based on system reload
CN106059940A (en) Flow control method and device
Tan et al. Coupling scheduler for mapreduce/hadoop
CN106775975A (en) Process scheduling method and device
KR20140128685A (en) File distribution management system restorable using predetermined number of file share and operation method thereof
JP5331549B2 (en) Distributed processing system and distributed processing method
CN105549911B (en) The data transmission method and device of NVRAM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20181115

Granted publication date: 20180703

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20211115

Granted publication date: 20180703

PD01 Discharge of preservation of patent
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180703

Termination date: 20191222

CF01 Termination of patent right due to non-payment of annual fee