CN101521673A - Method and device for resource distribution - Google Patents

Method and device for resource distribution Download PDF

Info

Publication number
CN101521673A
CN101521673A CN200910081956A CN200910081956A CN101521673A CN 101521673 A CN101521673 A CN 101521673A CN 200910081956 A CN200910081956 A CN 200910081956A CN 200910081956 A CN200910081956 A CN 200910081956A CN 101521673 A CN101521673 A CN 101521673A
Authority
CN
China
Prior art keywords
watch
dog
address block
address
storage
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.)
Granted
Application number
CN200910081956A
Other languages
Chinese (zh)
Other versions
CN101521673B (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.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009100819568A priority Critical patent/CN101521673B/en
Publication of CN101521673A publication Critical patent/CN101521673A/en
Application granted granted Critical
Publication of CN101521673B publication Critical patent/CN101521673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for resource distribution. The method comprises the steps as follows: A. a memory array is divided into an address block with the size of X byte, wherein X is a signless integral; B. the middle of the address block formed by dividing the memory array in the step A is separated into address blocks with the number of I, and each address block is distributed to a storage area network (SAN) which corresponds to the same monitoring equipment, wherein I is a signless integral. With the adoption of the invention, the time for the tracking of a magnetic head can be shortened, and the storage efficiency is improved.

Description

A kind of resource allocation methods and device
Technical field
The present invention relates to the memory system technologies field, particularly a kind of resource allocation methods and device
Background technology
At present, video monitoring is owing to characteristics such as true, effective are used widely.Wherein, video monitoring specifically is to utilize a plurality of cameras to take, and the data that will take acquisition continuously are saved in the storage system.In the video monitoring technology, each camera is equivalent to a control point, and the corresponding storage resources network (SAN) in each control point comprises the memory block of dividing from storage array among this SAN.
Wherein, storage array is to utilize memory block on all physical disks that Redundant Array of Inexpensive Disc (RAID, Redundant Array ofInexpensive Disks) algorithm comprises RAID (also can abbreviate disk array as) to make up to form.Referring to Fig. 1, Fig. 1 is the data distribution relation schematic diagram of RAID5 in the prior art.Wherein, a among Fig. 1 is the distribution map of RAID5.Shown in a among Fig. 1, comprised 4 independently physical disks among the RAID5, be respectively physical disk 0 to physical disk 3.Physical disk 0 to physical disk 3 is divided into the identical memory block of a plurality of sizes, afterwards, (such as the D0 on the physical disk 0) forms continuous storage array according to the RAID algorithm with the memory block on all physical disks among the RAID5, shown in the b among concrete visible Fig. 1.As can be seen, the storage array shown in the b has mapping relations among the RAID5 among Fig. 1 shown in a and Fig. 1, and wherein, the logical address of the memory block in the storage array among Fig. 1 shown in the b is continuous from top to bottom successively.
Afterwards, for ease of watch-dog with the storage of self monitoring in storage system, need create corresponding SAN respectively for each camera in the supervisory control system.Wherein, each SAN has comprised one section continuous in storage array memory block, and correspondingly, the logical address of the one section memory block that comprises among this SAN also is continuous.Specifically: if there are 4 cameras in the current video supervisory control system, be specially camera 0, then be respectively these 4 cameras and create corresponding SAN, be specially SAN1 to SAN4 to camera 3.Afterwards, the sum of the memory block that comprises according to the sum and the storage array of camera is respectively the continuous memory block of logical address in each SAN memory allocated array.Such as, give SAN 1 with A to the B region allocation of the storage array shown in the b among Fig. 1, give SAN 2 with B to C region allocation, give SAN 3 with C to D region allocation, give SAN 4 with D to E region allocation.As can be seen, each SAN has comprised one section continuous memory block in the storage array.
Afterwards, a camera memory block will taking the data that obtain and distribute to self is carried at and sends to storage system in the write request.Storage system is determined each memory block corresponding physical disk address according to the mapping relations of above-mentioned foundation, by the mobile card magnetic track that obtains this physical disk address correspondence of hard disc magnetic head, the storage that each write request is carried is to the card magnetic track of correspondence.
As seen, the memory block that SAN comprised of each camera correspondence is one section continuous in storage array memory block in the prior art, and correspondingly, the logical address of the memory block that SAN comprised of each camera correspondence also all is continuous.So, when each camera need send write request simultaneously, each camera memory block of selective sequential successively from its corresponding SAN.Such as, camera 0 to camera 3 all is to send write request first, wherein, the corresponding memory block of the size of the current data that will store of each camera, then select the memory block of first memory block the SAN of camera 0 to camera 3 from correspondence, be respectively D0, D4, D8 and D12 as needs storage data.Because the memory block that SAN comprised of each camera correspondence is one section continuous in storage array memory block, so, for storage array, the memory block that each write request is carried just is at random memory block in the storage array.Such as, from the storage array shown in the b of Fig. 1 as can be seen, the D0 that above-mentioned write request is carried, D4, D8 and D12 are discontinuous memory block in the storage array, correspondingly, the logical address of the memory block that write request is carried also is discontinuous.Because storage array and disk array have mapping relations, like this, physical disk address among the RAID of the memory block correspondence that each write request is carried also is at random, so, will cause moving around in the whole magnetic track space of each hard disc magnetic head on corresponding physical disk, increase the time of magnetic head tracking greatly, reduced storage efficiency.
Summary of the invention
In view of this, a kind of resource allocation methods provided by the invention and device so that reduce the time of magnetic head tracking, improve storage efficiency.
A kind of resource allocation methods comprises:
A is divided into size with storage array and is the address block of X byte; Wherein, X is a positive integer; B, each address block that is spaced apart I address block in the address block after described steps A divided is distributed to the storage resources network SAN of same watch-dog correspondence, and wherein, I is a positive integer.
A kind of resource allocation device comprises: division unit and allocation units; Wherein,
Described division unit is used for that storage array is divided into size and is the address block of X byte; Wherein, X is a positive integer;
Each address block that address block after described allocation units are used for described division unit divided is spaced apart I address block is distributed to the storage resources network SAN of same watch-dog correspondence, and wherein, I is a positive integer.
By on can state, resource allocation methods that the embodiment of the invention provides and device are the address block of X byte by storage array being divided into size; Wherein, X is a positive integer; Each address block that is spaced apart I address block in the address block after dividing is distributed to the SAN of same watch-dog correspondence, and wherein, I is a positive integer.Such as, if I is 4, address block among the present invention is the memory block in the storage array shown in the b among above-mentioned Fig. 1, then D0, D4, D8, the D12 with the storage array shown in the b among Fig. 1 distributes to SAN0, and D1, D5, D9, D13 are distributed to SAN1, D2, D6, D10, D14 are distributed to SAN2, D3, D7, D11, D15 are distributed to SAN3; So, according to above-mentioned resource allocation operations, when each watch-dog need be stored data simultaneously, then each watch-dog from its corresponding SAN successively selective sequential distribute to self memory block.Such as, watch-dog 0 to watch-dog 3 all is to send write request first, wherein, the corresponding address block of the size of the current data that will store of each camera, then watch-dog 0 is selected first address block to be carried to watch-dog 3 respectively from its corresponding SAN and is sent to storage system in the write request, and promptly the address block of Xuan Zeing is respectively D0 to D3.So, for storage array, the entrained address block of write request that storage system receives is an address block continuous in the storage array.Because storage array and disk array have mapping relations, therefore, physical disk address in the disk array of each address block correspondence is also nonrandom, but it is continuous, so, each hard disc magnetic head also can move in corresponding physical magnetic track space in order successively, and this has significantly reduced the time of magnetic head tracking, has improved storage efficiency.
Description of drawings
Fig. 1 is the data distribution relation schematic diagram of RAID5 in the prior art;
The basic flow sheet of the resource allocation that Fig. 2 provides for the embodiment of the invention;
The resource allocation detail flowchart that Fig. 3 provides for the embodiment of the invention;
The SAN resource that Fig. 4 provides for the embodiment of the invention and the mapping relations figure of storage array;
Another detail flowchart of the resource allocation that Fig. 5 provides for the embodiment of the invention;
The resource allocation device structure chart that Fig. 6 provides for the embodiment of the invention.
Embodiment
In order to make the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the drawings and specific embodiments.
Referring to Fig. 2, the basic flow sheet of the resource allocation that Fig. 2 provides for the embodiment of the invention.As shown in Figure 2, this flow process can may further comprise the steps:
Step 201 is divided into size with storage array and is the address block of X byte.
Here, X is a positive integer, and what it can be with the supervisory control system data blocks stored is big or small identical.Such as, if supervisory control system data blocks stored size is 16KB, effective memory space of storage array adds up to 7500G, then preferably, above-mentioned steps 201 is specially: the useful space 7500G of storage array is divided into the big or small address block of 16KB that is.The number of the address block that wherein, marks off is calculated by following formula:
7500 × 10 6 16 = 468750000 ;
Wherein, calculate, get 1G=10 for convenient 6K.
Preferably, for ease of describing the address block of dividing, can be (wherein from preset value, this preset value can be 0 or for other values, present embodiment does not specifically limit) beginning carries out serial number to address block successively, such as, above-mentionedly 468750000 address blocks have been divided, if preset value is 0, then successively 468750000 address blocks are numbered since 0, numbering is respectively 0 to 468750000-1.
Certainly, if storage array is the storage array that comprises a plurality of memory blocks shown in the b among Fig. 1, then preferably, present embodiment can continue that also memory block is divided into size and be the address block of X byte.
Step 202 is distributed to each address block that is spaced apart I address block in the address block after dividing in the step 201 SAN of same watch-dog correspondence.
Usually, supervisory control system comprises a plurality of watch-dogs, and preferably, this watch-dog specifically can be camera.Each watch-dog all has the storage code stream of self, and wherein, the storage code stream is meant the data traffic of watch-dog in the unit interval stored, and usually, this storage code stream also is code check.In the present embodiment, the storage code stream of each watch-dog that supervisory control system comprises can be identical, also can be inequality.
In the present embodiment, I is a positive integer, and the total N of the watch-dog that it comprises with supervisory control system is relevant with the storage code stream of each watch-dog that supervisory control system comprises.Such as, when the storage code stream of each watch-dog that comprises when supervisory control system was identical, I equaled the total N of the watch-dog that supervisory control system comprises; So, step 202 specifically can be: each address block that is spaced apart N address block in the address block after step 201 is divided is distributed to the SAN of same watch-dog correspondence; When the storage code stream of each watch-dog that comprises when supervisory control system was inequality, then the total N of the watch-dog that comprised by supervisory control system of I and the storage code stream of each watch-dog are determined, and be specifically following.
So, realized the resource allocation methods that the embodiment of the invention provides.
Referring to Fig. 3, the resource allocation detail flowchart that Fig. 3 provides for the embodiment of the invention.The storage code stream of each watch-dog that comprises with supervisory control system among this embodiment be identical be example, be 2M such as the storage code stream of watch-dog.In addition, for ease of describing, if the total N of watch-dog is 100 in the present embodiment.Then as shown in Figure 3, this flow process can may further comprise the steps:
Step 301 is respectively 100 watch-dogs and creates SAN.
Here, corresponding 1 the SAN resource of each watch-dog, owing in the present embodiment 100 watch-dogs are arranged, therefore, this step 301 need be respectively 100 watch-dogs and create corresponding SAN, promptly creates ading up to 100 SAN.
For ease of describing, can be numbered SAN, such as, step 301 is determined needs to create 100 SAN, and then numbering can be 0 to 99.Preferably, be numbered in the present embodiment 0 to 99 SAN resource respectively reference numeral be 0 to 99 watch-dog.
Step 302 is divided into size with storage array and is the address block of X.
Here, X is a positive integer, and its size with the supervisory control system data blocks stored is relevant.Such as, be example with the RAID5 array in the present embodiment, comprise 15+1 physical disk in this RAID5 array, if the capacity of each physical disk is 500G, then the useful space of this RAID5 adds up to 15 * 5=7500G.If watch-dog is the data block of 16KB with the size is unit storage data, and then present embodiment can be divided into the useful space of above-mentioned RAID5 7500 × 1000 × 1000 16 = 468750000 Individual size is the address block of 16KB.
For ease of describing, can begin successively the address block of dividing to be carried out serial number from initial value, wherein, for ease of of the realization of following step 303 to step 304, this initial value is identical with above-mentioned initial value when SAN is numbered, if above-mentioned initial value when SAN is numbered is 0, then the numbering at the address block of dividing specifically can be 0 to 468750000-1.
Step 303 is carried out poll to the address block after step 302 division, and numbering and watch-dog sum N complementation to this address block that is polled to obtain remainder.
Here, if the total N of watch-dog is 100, if the address block that is polled to be numbered 20, then step 303 is specially: to 20 and 100 execution modulo operation, obtaining remainder is 20.
Step 304 is distributed to the address block that is polled to the SAN that is numbered above-mentioned remainder.
Here, if the remainder that obtains of step 303 is 20, then this step 304 is specially: will be numbered 20 address block and distribute to and be numbered 20 SAN.
So, through behind the aforesaid operations, can realize that all address blocks in the storage array distribute to the operation of corresponding SAN.Preferably, for ease of describing, can among each SAN the addresses distributed piece carry out serial number successively from initial value 0 beginning, so, if watch-dog add up to 100, and the data block that storage array is divided be numbered 0 to 468750000-1, then pass through above-mentioned steps, the mapping relations of addresses distributed piece and storage array can be referring to Fig. 4 among each SAN.
Need to prove, because the storage code stream of each watch-dog that supervisory control system comprises in the present embodiment is identical, then pass through above-mentioned steps, each address block that is spaced apart total N address block of the watch-dog that supervisory control system comprises can be distributed to same SAN.And, by step 303 as can be seen, each address block that is spaced apart total N address block of the watch-dog that supervisory control system comprises in the address block after step 302 is divided has identical sign, wherein, this sign is specially the numbering of each address block that is spaced apart N address block and the resulting remainder of sum execution modulo operation of watch-dog.If N is 100, then be spaced apart each address block of 100 such as be numbered 1,101, the address block of 201...100*n+1 carries out modulo operation with 100 respectively, the remainder that obtains is all identical, the remainder that promptly obtains all is 1, so, can be numbered 1,101 in the storage array, the address block of 201...100*n+1 distributes to and is numbered 1 SAN.
Also need to prove, because SAN and watch-dog have one-to-one relationship, therefore, the operation of distributing to same SAN of above-mentioned each address block that will be spaced apart N address block specifically can be the operation of each address block that is spaced apart N address block being distributed to the SAN of same watch-dog correspondence.So, realized that by aforesaid operations the address block in the storage array distributes to the operation of each SAN.
After finishing above-mentioned batch operation, as shown in Figure 3, this flow process also can may further comprise the steps 305 to step 309.
Step 305, all watch-dogs that start supervisory control system simultaneously and comprised.
Preferably, for strengthening the video monitoring performance, the embodiment of the invention can be enabled all watch-dogs in the supervisory control system simultaneously.Certainly, can in the light of actual conditions start the part watch-dog in the supervisory control system in the step 305, the embodiment of the invention does not specifically limit yet.
Step 306, the watch-dog that supervisory control system is comprised carries out time synchronized.
Here, send the write request operation, can adopt Network Time Protocol synchronous each watch-dog time of implementation for guaranteeing follow-up each watch-dog is carried out simultaneously.
Step 307, watch-dog will need the data of storing and this data corresponding address to be carried to send to storage system in the write request.
Here, step 307 specifically can be: if watch-dog sends write request first, then watch-dog begins successively order from first address block according to the size of the data of current needs storage and obtains the data corresponding address of described needs storage in its corresponding SAN, the data of needs storage and this address that obtains is carried at sends to storage system in the write request; Such as, watch-dog 0 to watch-dog 99 when sending write request first, wherein, the current corresponding address block of size that needs the data of storage of each watch-dog, then the 0th address block among the SAN that each watch-dog is corresponding with it respectively is carried at and sends to storage system in the write request.Certainly, if the non-write request that sends first of watch-dog, then watch-dog according to the size of the data of current needs storage in its corresponding SAN from the end address selected when once sending write request begin successively order and obtain the data corresponding address of described needs storage; The data of needs storages and this address that obtains be carried at send to storage system in the write request.Such as, watch-dog 0 to watch-dog 99 above-mentioned send write request first after, currently also need to carry out data storage operations, wherein, the current corresponding address block of size that needs the data of storage of each watch-dog, then the 1st address block among the SAN that each watch-dog is corresponding with it respectively is carried at and sends to storage system in the write request; And the like, repeat no more here.
Step 308, the address transition that storage system is carried the write request that receives are the address in the storage array.
Here, if watch-dog add up to 100, when the address that one of them write request that storage system receives is carried is b the address that is numbered among the SAN of j in a the address block, then step 308 can be the address in the storage array according to the following equation with this address transition:
a*16K*100+16K*j+b。
If watch-dog is chosen the address in order in the step 307 from its corresponding SAN.So, if each watch-dog data quantity stored each second is identical, then pass through this step 308 after, the address after the storage system conversion is the continuation address in the storage array.Such as, watch-dog 0 to watch-dog 99 when sending write request first, the 0th address block among respectively that it is the corresponding SAN is carried at and sends to storage system in the write request; Like this, storage system is according to mapping relations shown in Figure 4, and the address transition that each write request can be carried is the address in the storage array, is the 0th in the storage array to the 99th address block; Afterwards, watch-dog 0 to watch-dog 99 when for the second time sending write request, the 1st address block in respectively that it is the corresponding SAN resource is carried at and sends to storage system in the write request; So, the address block that storage system can be carried each write request is converted to the 100th in the storage array to the 199th address block, and the like.
The data of the needs storage that this write request carries are stored in step 309, the storage system address after according to conversion.
Here, step 309 specifically can be: storage system is according to the address mapping relation of storage array and disk array, stores the data of the needs storage that this write request carries according to the address after the conversion.
Certainly, for embodying the application of the embodiment of the invention, when being arranged in the step 307, one or more watch-dogs do not select the address from it the corresponding SAN in order, then step 309 can further comprise: storage system according to the sequence of addresses in the storage array arrange each the conversion after the address, when arriving default memory time, the data of the needs storage of carrying according to the address corresponding write request of storage after arranging.That is to say, after the conversion of storage system executive address, be not to store data immediately, but the address after the conversion is arranged according to the order of address in the storage array; Like this, when arriving default memory time, with the storage of the address correspondence after arranging, so, the address that can guarantee the data of storing is order for storage array.
Because storage array and physical address have mapping relations, therefore when storage system according to storage array in continuous address when storing data, correspondingly, hard disc magnetic head will move to corresponding magnetic track successively in proper order in the RAID of the address block correspondence in each storage array.
Need to prove that the storage system of above-mentioned steps 308 and step 309 specifically can be disk array controller or can realize this for other and search the entity of physical address function, the embodiment of the invention repeats no more.
Also need to prove, is the storage of the data of order owing to can realize the address in the present embodiment, and like this, preferably, present embodiment can be provided with the monitoring storage system according to the write performance of default supervisory control system and the storage code stream of supervisory control system, is specially:
(1), the total N that calculates watch-dog according to the write performance and the memory code flowmeter of supervisory control system.
Here, the concrete grammar of calculating the total N of watch-dog according to the write performance and the memory code flowmeter of supervisory control system is: if the write performance of supervisory control system is TMBps (a per second T Mbytes), the storage code stream is that 2Mbps (is a per second 250K byte, certainly, this storage code stream also can be 512K or 1M etc., the embodiment of the invention does not specifically limit), then can calculate N according to following formula:
T × 1000 1000 * 2 8 = N ;
Wherein, owing to store code stream with position (bit) storage, and the unit of write performance is a byte, equal 8 (bit) according to 1 byte (B), the unit of each parameter is unified for the position, then obtain above-mentioned parameter " 8 ", for ease of calculating 1G=1000K in the present embodiment.
(2), be respectively N watch-dog and create SAN; Afterwards, execution in step 302 is to step 309.Here repeat no more.
Because hard disc magnetic head moves around at random in the prior art, limited the quantity of the watch-dog of storage system support like this in the whole magnetic track space of physical disk.Such as, in actual applications, disk array is the 15+1RAID5 array, if the storage code stream of the watch-dog of this array support is 2M, when memory property is 280MBPS, can obtain the storage operation that this disk array is at most only supported 180 watch-dogs according to statistical computation.And in the embodiment of the invention, because the entrained address of write request that each watch-dog sends can be exchanged into the continuous address of storage system, according to the mapping relations of storage array and physical address, correspondingly, hard disc magnetic head also can order move in the magnetic track space, and the time ratio of tracking is less.So, flow down, disk array is supported at most in same memory property and memory code 280 250 × 1000 = 1120 Individual watch-dog, wherein, 1G=10 3K.As seen, in prior art, the embodiment of the invention can be supported more watch-dog, has improved the monitoring memory property.
Above-mentioned is that to have identical storage code stream with all watch-dogs that supervisory control system comprises be example, and present embodiment also can be applicable to the storage code stream scene inequality of watch-dog in the supervisory control system.
Referring to Fig. 5, another detail flowchart of the resource allocation that Fig. 5 provides for the embodiment of the invention.As shown in Figure 5, this flow process can may further comprise the steps:
Step 501 is divided into size with storage array and is the address block of X byte.
Step 502, the total N of the watch-dog that comprises according to supervisory control system and the storage code stream of each watch-dog are determined I at interval.
Here, interval I is specially the address block interval of each address block of distributing to same SAN.Need to prove, above-mentioned storage code stream according to each watch-dog determines that at interval principle is to make the number of the number of the address block that SAN comprised of storing the big watch-dog correspondence of code stream greater than the address block that SAN comprised of the little watch-dog correspondence of storage code stream.So, can guarantee when all watch-dogs are enabled simultaneously, to improve the utilance of the storage code stream of each watch-dog.
Such as, if supervisory control system comprises 5 watch-dogs, wherein first, second, the 4th identical with the storage code stream of the 5th watch-dog, be 1M all, and the storage code stream of the 3rd watch-dog is 2M.If the storage code stream of 1M corresponding data volume in the unit interval just in time is the data volume of 1 address block correspondence, then above-mentioned steps 502 determines that operation at interval is specially: because the storage code stream of the 3rd watch-dog is first, second, 2 times of the storage code stream of the 4th and the 5th watch-dog, when then enabling simultaneously for all watch-dogs of assurance, improve the utilance of the storage code stream of watch-dog, can be the 3rd watch-dog and distribute two continuous address blocks, and be first, second, the the 4th and the 5th watch-dog distributes an address block respectively, and so can determining at interval, I is 6 continuous address blocks.Certainly, above-mentioned is a kind of giving an example, and the embodiment of the invention also can be determined at interval according to actual conditions.
Step 503, each address block that will be spaced apart 1 address block in all address blocks that step 501 is divided is distributed to same SAN.
If above-mentioned definite interval I is 6 continuous address blocks, then step 503 specifically can be and distributes to same SAN with being spaced apart 6 continuous address blocks.Particularly, such as, if current have above-mentioned 5 watch-dogs, wherein first, second, the 4th identical with the storage code stream of the 5th watch-dog, all be 1M, and the storage code stream of the 3rd watch-dog is 2M, adopts as the address block in the storage array among Fig. 4, then will be numbered 0,6, the address block of 6n distributes to the SAN of first watch-dog correspondence; Be numbered 1,7, the address block of 6n+1 distributes to the SAN of second watch-dog correspondence; Be numbered 2,3,8,9, the address block of 6n+2,6n+3 distributes to the SAN of the 3rd watch-dog correspondence; Be numbered 4,10, the address block of 6n+4 distributes to the SAN of the 4th watch-dog correspondence; Be numbered 5,11, the address block of 6n+5 distributes to the SAN of the 5th watch-dog correspondence.So, can realize that address block in the storage array distributes to the operation of each SAN.
Because the corresponding same watch-dog of same logical resource, therefore, each address block that will be spaced apart I address block that above-mentioned steps 502 to step 503 also can be present embodiment to be provided is distributed to the concrete operations of the SAN of same watch-dog correspondence.
So, realized the batch operation of the storage resources that the embodiment of the invention provides.
Step 504 is similar to step 309 with step 305 shown in Figure 3 to step 508, repeats no more here.
The above-mentioned method that the embodiment of the invention is provided is described, and the device that the embodiment of the invention is provided is described below.
Referring to Fig. 6, the resource allocation device structure chart that Fig. 6 provides for the embodiment of the invention.As shown in Figure 6, this device comprises: division unit 601 and allocation units 602.
Wherein, division unit 601 is used for storage array is divided into the big or small address block of X byte that is; Wherein, X is a positive integer;
Each address block that address block after allocation units 602 are used for division unit 601 divided is spaced apart I address block is distributed to the SAN of same watch-dog correspondence, and wherein, I is a positive integer.
Preferably, watch-dog is a watch-dog in the supervisory control system; The sum of the watch-dog that described I is comprised by supervisory control system and the storage code stream of each watch-dog that described supervisory control system comprises are determined.
Wherein, if the storage code stream of each watch-dog of comprising of supervisory control system is identical, then described I equals the total N of the watch-dog that supervisory control system comprises.
If the storage code stream of the watch-dog that comprises of described supervisory control system is inequality, the total N of the watch-dog that then described I is comprised by supervisory control system and the storage code stream of each watch-dog determine that concrete principle is that the number of the address block that SAN comprised of the watch-dog correspondence that makes that the storage code stream is big is greater than the number of the address block that SAN comprised of the little watch-dog correspondence of storage code stream.
Preferably, each address block that is spaced apart I address block in the address block that division unit 601 is divided has identical sign.So, the address block that the address block after allocation units 602 are used for division unit 601 divided has a like-identified is distributed to the SAN of same watch-dog correspondence.
Preferably, division unit 601 also is used for from preset value successively to the address block serial number after dividing;
As shown in Figure 6, described device also comprises: creating unit 603.
Wherein, creating unit 603 was that each watch-dog is created SAN in the supervisory control system before allocation units 602 distribute address blocks, and from above-mentioned preset value successively to the SAN serial number after creating.
So, above-mentioned sign can be the numbering of each address block that is spaced apart I address block and the sum of watch-dog is carried out the resulting remainder of modulo operation.
As shown in Figure 6, allocation units 602 can comprise: poll subelement 6021, complementation subelement 6022 and distribution subelement 6023.
Wherein, when the storage code stream of each watch-dog that poll subelement 6021 is used for comprising when supervisory control system is identical, the address block after poll division unit 601 is divided.
Complementation subelement 6022 is used for the numbering of address block that poll subelement 6022 is polled to and the total complementation of the watch-dog that supervisory control system comprises, and obtains remainder.
Distribute subelement 6023 to be used for the address block that poll subelement 6021 is polled to is distributed to the SAN that is numbered described remainder that creating unit 603 is created.
By on can state, resource allocation methods that the embodiment of the invention provides and device are the address block of X byte by storage array being divided into size; Wherein, X is a positive integer; Each address block that is spaced apart I address block in the address block after dividing is distributed to the SAN of same watch-dog correspondence, and wherein, I is a positive integer.Such as, if I is 4, address block among the present invention is the memory block that storage array comprised shown in the b among above-mentioned Fig. 1, then D0, D4, D8, D12 are distributed to SAN0, D1, D5, D9, D13 are distributed to SAN1, D2, D6, D10, D14 are distributed to SAN2, D3, D7, D11, D15 are distributed to SAN3; So, according to above-mentioned resource allocation operations, when each watch-dog need be stored data simultaneously, then each watch-dog from its corresponding SAN successively selective sequential distribute to self memory block.Such as, watch-dog 0 to watch-dog 3 all is to send write request first, wherein, the corresponding address block of the size of the current data that will store of each camera, then watch-dog 0 is selected first address block to be carried to watch-dog 3 respectively from its corresponding SAN and is sent to storage system in the write request, and promptly the address block of Xuan Zeing is respectively D0 to D3.So, for storage array, the entrained address block of write request that storage system receives is an address block continuous in the storage array.Because storage array and disk array have mapping relations, therefore, physical disk address in the disk array of each address block correspondence is also nonrandom, but it is continuous, so, each hard disc magnetic head also can move in corresponding physical magnetic track space in order successively, and this has significantly reduced the time of magnetic head tracking, has improved storage efficiency.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is preferred embodiment of the present invention; be not to be used to limit protection scope of the present invention; within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1, a kind of resource allocation methods is characterized in that, this method comprises:
A is divided into size with storage array and is the address block of X byte; Wherein, X is a positive integer;
B, each address block that is spaced apart I address block in the address block after described steps A divided is distributed to the storage resources network SAN of same watch-dog correspondence, and wherein, I is a positive integer.
2, method according to claim 1 is characterized in that, described watch-dog is a watch-dog in the supervisory control system;
The sum of the watch-dog that described I is comprised by supervisory control system and the storage code stream of each watch-dog that described supervisory control system comprises are determined.
3, method according to claim 2 is characterized in that, if the storage code stream of each watch-dog of comprising of described supervisory control system is identical, then described I equals the total N of the watch-dog that supervisory control system comprises;
If the storage code stream of the watch-dog that comprises of described supervisory control system is inequality, the total N of the watch-dog that then described I is comprised by supervisory control system and the storage code stream of each watch-dog are determined specifically: make the number of the address block that SAN comprised of the watch-dog correspondence that the storage code stream is big greater than the number of the address block that SAN comprised of the little watch-dog correspondence of storage code stream.
According to the arbitrary described method of claim 1 to 3, it is characterized in that 4, each address block that is spaced apart I address block in the described steps A has identical sign;
Described step B comprises: the address block that has like-identified in the address block after described steps A is divided is distributed to the SAN of same watch-dog correspondence.
5, method according to claim 4 is characterized in that, described steps A further comprises: from the preset value address block serial number to dividing successively;
Further comprise before the described step B: be that each watch-dog is created SAN in the supervisory control system, and from described preset value successively to the SAN serial number after creating;
The described numbering of each address block that is spaced apart I address block and the resulting remainder of sum execution modulo operation of watch-dog of being designated; The SAN that the address block that has like-identified in the described address block after steps A is divided is distributed to same watch-dog correspondence comprises: if the storage code stream of each watch-dog that supervisory control system comprises is identical, and the address block after the poll steps A is divided; The total complementation of the watch-dog that the numbering and the supervisory control system of this address block that is polled to comprised obtains remainder; This address block that is polled to is distributed to the SAN that is numbered described remainder.
6, according to claim 1 or 4 described methods, it is characterized in that this method further comprises:
All watch-dogs that supervisory control system is comprised carry out time synchronized;
When the one or more watch-dogs in described all watch-dogs need send write request, this watch-dog will need the data of storing and this data corresponding address to be carried to send to storage system in the write request.
7, method according to claim 6 is characterized in that, described watch-dog will need the data of storing and this data corresponding address to be carried to send to storage system in the write request to comprise:
If watch-dog sends write request first, then watch-dog begins to obtain in proper order successively the data corresponding address of described needs storage from first address block in its corresponding SAN according to the size of the data of current needs storage; The data of needs storages and this address that obtains be carried at send to storage system in the write request;
If the non-write request that sends first of watch-dog, then watch-dog according to the size of the data of current needs storage in its corresponding SAN from once send the selected end address of write request and begin successively order and obtain the data corresponding address of described needs storage; The data of needs storages and this address that obtains be carried at send to storage system in the write request.
8, method according to claim 6 is characterized in that, when receiving the write request of watch-dog transmission, this method further comprises:
The address transition that write request is carried is the address in the storage array;
Store the data of the needs storage that this write request carries according to the address after the conversion; Perhaps, arrange address after each conversion, the data of the needs storage of carrying according to the corresponding write request of storage of the address after arranging according to the sequence of addresses in the storage array.
9, a kind of resource allocation device is characterized in that, this device comprises: division unit and allocation units; Wherein,
Described division unit is used for that storage array is divided into size and is the address block of X byte; Wherein, X is a positive integer;
Each address block that address block after described allocation units are used for described division unit divided is spaced apart I address block is distributed to the SAN of same watch-dog correspondence, and wherein, I is a positive integer.
10, device according to claim 9 is characterized in that, described watch-dog is a watch-dog in the supervisory control system;
The sum of the watch-dog that described I is comprised by supervisory control system and the storage code stream of each watch-dog that described supervisory control system comprises are determined.
According to claim 9 or 10 described devices, it is characterized in that 11, if the storage code stream of each watch-dog of comprising of described supervisory control system is identical, then described I equals the total N of the watch-dog that supervisory control system comprises;
If the storage code stream of the watch-dog that comprises of described supervisory control system is inequality, the total N of the watch-dog that then described I is comprised by supervisory control system and the storage code stream of each watch-dog determine it is that the number of the address block that SAN comprised of the watch-dog correspondence that makes that the storage code stream is big is greater than the number of the address block that SAN comprised of the little watch-dog correspondence of storage code stream.
12, device according to claim 11 is characterized in that, each address block that is spaced apart I address block in the address block that described division unit is divided has identical sign;
The address block that address block after described allocation units are used for described division unit divided has a like-identified is distributed to the SAN of same watch-dog correspondence.
13, device according to claim 12 is characterized in that, described division unit also is used for from preset value successively to the address block serial number after dividing; Described device also comprises: creating unit; Wherein,
Described creating unit was that each watch-dog is created SAN in the supervisory control system before described allocation units distribute address block, and from described preset value successively to the SAN serial number after creating;
The described numbering of each address block that is spaced apart I address block and the resulting remainder of sum execution modulo operation of watch-dog of being designated; Described allocation units comprise: poll subelement, complementation subelement and distribution subelement; Wherein,
When the storage code stream of each watch-dog that described poll subelement is used for comprising when supervisory control system is identical, the address block after the described division unit of poll is divided;
Described complementation subelement is used for the numbering of address block that described poll subelement is polled to and the total complementation of the watch-dog that supervisory control system comprises, and obtains remainder;
Described distribution subelement is used for the address block that described poll subelement is polled to is distributed to the SAN that is numbered described remainder that described creating unit is created.
CN2009100819568A 2009-04-09 2009-04-09 Method and device for resource distribution Active CN101521673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100819568A CN101521673B (en) 2009-04-09 2009-04-09 Method and device for resource distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100819568A CN101521673B (en) 2009-04-09 2009-04-09 Method and device for resource distribution

Publications (2)

Publication Number Publication Date
CN101521673A true CN101521673A (en) 2009-09-02
CN101521673B CN101521673B (en) 2012-05-02

Family

ID=41082046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100819568A Active CN101521673B (en) 2009-04-09 2009-04-09 Method and device for resource distribution

Country Status (1)

Country Link
CN (1) CN101521673B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808122A (en) * 2010-03-05 2010-08-18 浪潮(北京)电子信息产业有限公司 Large-scale cluster storage system and construction method thereof
CN103647723A (en) * 2013-12-26 2014-03-19 深圳市迪菲特科技股份有限公司 Method and system for monitoring flow
CN103917962A (en) * 2011-11-18 2014-07-09 国际商业机器公司 Reading files stored on a storage system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1258713C (en) * 2003-11-14 2006-06-07 清华大学 Data distribution dynamic mapping method based on magnetic disc characteristic
CN100428131C (en) * 2006-10-13 2008-10-22 清华大学 Method for distributing resource in large scale storage system
CN100574432C (en) * 2008-03-03 2009-12-23 杭州华三通信技术有限公司 The storage means of the video coding in a kind of supervisory control system and equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808122A (en) * 2010-03-05 2010-08-18 浪潮(北京)电子信息产业有限公司 Large-scale cluster storage system and construction method thereof
CN103917962A (en) * 2011-11-18 2014-07-09 国际商业机器公司 Reading files stored on a storage system
CN103647723A (en) * 2013-12-26 2014-03-19 深圳市迪菲特科技股份有限公司 Method and system for monitoring flow
CN103647723B (en) * 2013-12-26 2016-08-24 深圳市迪菲特科技股份有限公司 A kind of method and system of traffic monitoring

Also Published As

Publication number Publication date
CN101521673B (en) 2012-05-02

Similar Documents

Publication Publication Date Title
CN104133777B (en) A kind of shared memory systems and its application method
US10191808B2 (en) Systems and methods for storing, maintaining, and accessing objects in storage system clusters
US10007587B2 (en) Systems and methods for pre-generation and pre-storage of repair fragments in storage systems
CN104317742A (en) Automatic thin-provisioning method for optimizing space management
CN101135994A (en) Method and apparatus for dividing cache space and cache controller thereof
CN108874688A (en) A kind of message data caching method and device
CN101521673B (en) Method and device for resource distribution
CN105406999A (en) Multi-data distribution method and distribution equipment
CN105760459A (en) Distributed data processing system and method
CN103778149A (en) Document system and document storage managing method thereof
CN101729421A (en) Storage method and device based on time division multiplex
CN109684127A (en) Locality node restorative procedure based on complete graph minimum bandwidth regeneration code
CN110515542A (en) Date storage method, calculates equipment, storage system and storage medium at device
CN106899678B (en) High-efficiency data transmission method and system for dynamically balancing energy Internet network bandwidth
CN101667105A (en) Dispatching device and method for dynamically reading, writing, accessing and grouping dynamic memories
CN103825946A (en) Virtual machine placement method based on network perception
CN103827837B (en) Access the method in solid state hard disc space, Apparatus and system
CN103259824B (en) The synchronous method of data route and device in distributed data-storage system
CN101783814A (en) Metadata storing method for mass storage system
CN101566932A (en) Multi-disk array system and data writing method for multi-disk array system
CN101945271A (en) Image compression system and compression method
CN101566933B (en) Method and device for configurating cache and electronic equipment and data read-write equipment
CN101763310B (en) Data storage control method
CN110083313A (en) A kind of data cache method and device
CN110110158A (en) A kind of the memory space division methods and system of three-dimensional mesh data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.