CN101521673B - Method and device for resource distribution - Google Patents

Method and device for resource distribution Download PDF

Info

Publication number
CN101521673B
CN101521673B CN2009100819568A CN200910081956A CN101521673B CN 101521673 B CN101521673 B CN 101521673B CN 2009100819568 A CN2009100819568 A CN 2009100819568A CN 200910081956 A CN200910081956 A CN 200910081956A CN 101521673 B CN101521673 B CN 101521673B
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.)
Active
Application number
CN2009100819568A
Other languages
Chinese (zh)
Other versions
CN101521673A (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

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 XThe 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 distributis 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 heaed 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.d 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 sketch map 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, and 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.Can find out that the storage array shown in the b has mapping relations among the RAID5 among Fig. 1 shown in a and Fig. 1, 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 to camera 3, then be respectively these 4 cameras and create corresponding SAN, be specially SAN1 to SAN 4.The sum of the memory block that comprises according to the sum and the storage array of camera afterwards, 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.Can find out that each SAN has comprised one section continuous memory block in the storage array.
Afterwards, camera will be taken the data that obtain and be carried at a memory block distributing to self and send to storage system in the request of writing.Storage system is determined each memory block corresponding physical disk address according to the mapping relations of above-mentioned foundation; Obtain the corresponding card magnetic track in this physical disk address through hard disc magnetic head mobile, each is write storage that request carries to the card magnetic track of correspondence.
It is thus clear that the memory block that SAN comprised that each camera is corresponding in the prior art is one section continuous in storage array memory block, correspondingly, the logical address of the memory block that SAN comprised that each camera is corresponding also all is continuous.So, when each camera needs to send simultaneously when writing request, each camera memory block of selective sequential successively from its corresponding SAN.Such as; Camera 0 to camera 3 all is to send the request of writing first; Wherein, The corresponding memory block of the size of the current data that will store of each camera, then camera 0 to camera 3 is selected the memory block of first memory block as needs storage data from the SAN of correspondence, is respectively D0, D4, D8 and D12.Because the memory block that SAN comprised that each camera is corresponding is one section continuous in storage array memory block, so, for storage array, each is write memory block that request carries and just is at random memory block in the storage array.Such as, can find out that from the storage array shown in the b of Fig. 1 above-mentioned to write the request D0, D4, D8 and the D12 that carry be discontinuous memory block in the storage array, correspondingly, the logical address of the memory block that the request write is carried also is discontinuous.Because storage array and disk array have mapping relations; Like this; Each physical disk address of writing among the corresponding RAID of the request memory block of carrying 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 distributes to the corresponding storage resources network SAN of same watch-dog with each address block that is divided into I address block in the middle of the address block after the said steps A division, and wherein, I is a positive integer.
A kind of resource allocation device comprises: division unit and allocation units; Wherein,
Said 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;
Said allocation units are used for each address block that is divided into I address block in the middle of the address block after the said division unit division is distributed to the corresponding storage resources network SAN of same watch-dog, 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 through storage array being divided into size; Wherein, X is a positive integer; Each address block that is divided into I address block in the middle of the address block after dividing is distributed to the corresponding SAN of same watch-dog, 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 the request of writing first; Wherein, The corresponding address block of the size of the current data that will store of each camera, then watch-dog 0 to watch-dog 3 is selected first address block to be carried at respectively from its corresponding SAN and is sent to storage system in the request of writing, and the address block of promptly selecting is respectively D0 to D3.So, for storage array, the entrained address block of the request of writing that storage system receives is an address block continuous in the storage array.Because storage array and disk array have mapping relations; Therefore, the physical disk address in the disk array of each address block correspondence is also nonrandom, but 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 sketch map 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 object of the invention, technical scheme and advantage clearer, describe the present invention below in conjunction with accompanying drawing and specific embodiment.
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 passed through computes:
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 and perhaps is other values, and present embodiment does not specifically limit) begin successively address block to be carried out serial number, such as; Above-mentionedly 468750000 address blocks have been divided; If preset value is 0, then successively 468750000 address blocks to be 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 the corresponding SAN of same watch-dog with each address block that is divided into I address block in the middle of the address block after dividing in the step 201.
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 divided into N address block in the middle of the address block after step 201 is divided is distributed to the corresponding SAN of same watch-dog; 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 confirmed, 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 number 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 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 to 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, can each address block of total N the address block that be spaced apart the watch-dog that supervisory control system comprises be distributed to same SAN.And; Can find out through step 303; Each address block that is divided into total N address block of the watch-dog that supervisory control system comprises in the middle of 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 corresponding SAN of same watch-dog.So, realized that through aforesaid operations the address block in the storage array distributes to the operation of each SAN.
After accomplishing 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 launched 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, for guarantee follow-up each watch-dog is carried out to send simultaneously write solicit operation, can adopt Network Time Protocol synchronous to each watch-dog time of implementation.
Step 307, the data that watch-dog will be stored are carried at this data corresponding address and send to storage system in the request of writing.
Here; Step 307 specifically can be: if watch-dog sends the request of writing 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 said needs storage in its corresponding SAN, the data of needs storage is carried at this address that obtains sends to storage system in the request of writing; Such as; Watch-dog 0 to watch-dog 99 is sending when writing request first; Wherein, the current corresponding address block of size that needs the data of storage of each watch-dog, the 0th address block among the SAN that then each watch-dog is corresponding with it respectively is carried at and sends to storage system in the request of writing.Certainly; If watch-dog is non-to send the request of writing first, then watch-dog according to the size of the data of current needs storage in its corresponding SAN from once send the end address of selecting when writing request and begin successively order and obtain the data corresponding address of said needs storage; The data of needs storages are carried at this address that obtains send to storage system in the request of writing.Such as; Watch-dog 0 to watch-dog 99 above-mentioned send first write request after; Currently also need carry out data storage operations; Wherein, the current corresponding address block of size that needs the data of storage of each watch-dog, the 1st address block among the SAN that then each watch-dog is corresponding with it respectively is carried at and sends to storage system in the request of writing; And the like, repeat no more here.
Step 308, the address transition that the request of writing that storage system will receive is carried is the address in the storage array.
Here; If watch-dog add up to 100; When storage system receives one of them to write address that request carries be 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 with this address transition according to the following equation:
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.Sending first when writing request such as, watch-dog 0 to watch-dog 99, the 0th address block among respectively that it is the corresponding SAN is carried at and sends to storage system in the request of writing; Like this, storage system is according to mapping relations shown in Figure 4, and can each be write the address transition of asking to carry 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 is when the second time, request was write in transmission, and the 1st address block in respectively that it is the corresponding SAN resource is carried at and sends to storage system in the request of writing; So, storage system can be write the address block of asking to carry with each and convert the 100th in the storage array into to the 199th address block, and the like.
This writes the data of the needs storage that request carries the address storage after according to conversion of step 309, storage system.
Here, step 309 specifically can be: storage system is according to the address mapping relation of storage array and disk array, and this writes the data of the needs storage that request carries according to the storage of 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 is arranged the address after each conversion according to the sequence of addresses in the storage array, when arriving preset memory time, and the data of the needs storage of carrying according to the corresponding request of writing of the address 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 preset memory time, with the corresponding storage in address after arranging, so, the address of the data that can guarantee to store 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 corresponding RAID of the address block 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 searches 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 preset 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 (be per second 250K byte, certainly, this storage code stream also can be 512K or 1M etc. to 2Mbps; The embodiment of the invention does not specifically limit), then can be according to computes N:
T × 1000 1000 * 2 8 = N ;
Wherein, because the storage code stream is with position (bit) storage, and the unit of write performance is a byte, equals 8 (bit) according to 1 byte (B), then obtains above-mentioned parameter " 8 " for the position with the unit of each parameter is unified, 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 practical application, 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 the request of writing 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.It is thus clear that 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 confirms I at interval with the storage code stream of each watch-dog.
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 confirms that at interval principle is to make the number of the number of the corresponding address block that SAN comprised of the big watch-dog of storage code stream greater than the corresponding address block that SAN comprised of the little watch-dog of storage code stream.So, can guarantee when all watch-dogs are launched 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 corresponding data volume of 1 address block; Then above-mentioned steps 502 confirms that operations at interval are specially: since the storage code stream of the 3rd watch-dog be first, second, 2 times of the storage code stream of the 4th and the 5th watch-dog; When then launching 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 that first, second, the 4th and the 5th watch-dog distribute an address block respectively, 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 confirmed at interval according to actual conditions.
Step 503, each address block that in all address blocks that step 501 is divided, will be spaced apart I address block 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 like 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 corresponding SAN of second watch-dog; Be numbered 2,3,8,9, the address block of 6n+2,6n+3 distributes to the corresponding SAN of the 3rd watch-dog; Be numbered 4,10, the address block of 6n+4 distributes to the corresponding SAN of the 4th watch-dog; Be numbered 5,11, the address block of 6n+5 distributes to the corresponding SAN of the 5th watch-dog.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 corresponding SAN of same watch-dog.
So, realized the batch operation of the storage resources that the embodiment of the invention provides.
Step 504 to step 508 is similar with step 305 to step 309 shown in Figure 3, repeats no more here.
The above-mentioned method that the embodiment of the invention is provided is described, and the device that provides in the face of the embodiment of the invention is down described.
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;
Allocation units 602 are used for each address block that is divided into I address block in the middle of the address block after division unit 601 divisions is distributed to the corresponding SAN of same watch-dog, 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 said I is comprised by supervisory control system and the storage code stream of each watch-dog that said supervisory control system comprises are confirmed.
Wherein, if the storage code stream of each watch-dog of comprising of supervisory control system is identical, then said 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 said supervisory control system is inequality, the total N of the watch-dog that then said I is comprised by supervisory control system and the storage code stream of each watch-dog confirm that concrete principle is the number of the number of the address block that SAN comprised that makes that the big watch-dog of storage code stream is corresponding greater than the corresponding address block that SAN comprised of the little watch-dog of storage code stream.
Preferably, each address block that is divided into I address block in the middle of the address block that division unit 601 is divided has identical sign.So, the address block after allocation units 602 are used for division unit 601 divided has the address block of like-identified and distributes to the corresponding SAN of same watch-dog.
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, said device also comprises: create unit 603.
Wherein, creating unit 603 before allocation units 602 distribute address blocks, is that each watch-dog is created SAN in the supervisory control system, 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.
The numbering of the address block that complementation subelement 6022 is used for poll subelement 6022 is polled to and the total complementation of the watch-dog that supervisory control system comprises obtain 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 said remainder that creates unit 603 establishments.
By on can state, resource allocation methods that the embodiment of the invention provides and device are the address block of X byte through storage array being divided into size; Wherein, X is a positive integer; Each address block that is divided into I address block in the middle of the address block after dividing is distributed to the corresponding SAN of same watch-dog, 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 the request of writing first; Wherein, The corresponding address block of the size of the current data that will store of each camera, then watch-dog 0 to watch-dog 3 is selected first address block to be carried at respectively from its corresponding SAN and is sent to storage system in the request of writing, and the address block of promptly selecting is respectively D0 to D3.So, for storage array, the entrained address block of the request of writing that storage system receives is an address block continuous in the storage array.Because storage array and disk array have mapping relations; Therefore, the physical disk address in the disk array of each address block correspondence is also nonrandom, but 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; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely preferred embodiment of the present invention; Be not to be used to limit protection scope of the present invention; All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a 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 divided into I address block in the middle of the address block after the said steps A division is distributed to the corresponding storage resources network SAN of same watch-dog; Wherein, I is a positive integer; The sum of the watch-dog that is comprised by supervisory control system and the storage code stream of each watch-dog that said supervisory control system comprises are confirmed, are specially: if the storage code stream of each watch-dog that said supervisory control system comprises is identical, then said I equals the total N of the watch-dog that supervisory control system comprises; If the storage code stream of the watch-dog that said supervisory control system comprises is inequality, then said I makes the number of storing the corresponding address block that SAN comprised of the big watch-dog of code stream greater than the number of storing the corresponding address block that SAN comprised of the little watch-dog of code stream.
2. method according to claim 1 is characterized in that, each address block that is divided into I address block in the middle of the said steps A has identical sign;
Said step B comprises: the address block that has like-identified in the address block after said steps A is divided is distributed to the corresponding SAN of same watch-dog.
3. method according to claim 2 is characterized in that, said steps A further comprises: from the preset value address block serial number to dividing successively;
Further comprise before the said step B: be that each watch-dog is created SAN in the supervisory control system, and from said preset value successively to the SAN serial number after creating;
The said 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 address block that has like-identified in the said address block after steps A is divided is distributed to the corresponding SAN of same watch-dog and is comprised: 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 said remainder.
4. according to the arbitrary described method of claim 1 to 3, it is characterized in that this method further comprises:
All watch-dogs that supervisory control system is comprised carry out time synchronized;
Write when request when the one or more watch-dogs in said all watch-dogs need send, the data that this watch-dog will be stored and this data corresponding address are carried at and send to storage system in the request of writing.
5. method according to claim 4 is characterized in that, the data that said watch-dog will be stored and this data corresponding address are carried at and send to storage system in the request of writing and comprise:
If watch-dog sends the request of writing first, then watch-dog begins successively in proper order obtain data corresponding address that said needs store from first address block according to the size of the data of current needs storage in its corresponding SAN; The data of needs storages are carried at this address that obtains send to storage system in the request of writing;
If watch-dog is non-to send the request of writing first, then watch-dog according to the size of the data of current needs storage in its corresponding SAN from once send and write the requesting selected end address and begin successively order and obtain the data corresponding address of said needs storage; The data of needs storages are carried at this address that obtains send to storage system in the request of writing.
6. method according to claim 4 is characterized in that, when receive that watch-dog sends write request the time, this method further comprises:
The address transition that the request of writing is carried is the address in the storage array;
This writes the data of the needs storage that request carries according to the address storage after the conversion; Perhaps, arrange the address after each conversion, the data of the needs storage of carrying according to the corresponding request of writing of the address storage after arranging according to the sequence of addresses in the storage array.
7. a resource allocation device is characterized in that, this device comprises: division unit and allocation units; Wherein,
Said 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;
Said allocation units are used for each address block that is divided into I address block in the middle of the address block after the said division unit division is distributed to the corresponding SAN of same watch-dog; Wherein, I is a positive integer; The sum of the watch-dog that is comprised by supervisory control system and the storage code stream of each watch-dog that said supervisory control system comprises are confirmed; Be specially: if the storage code stream of each watch-dog that said supervisory control system comprises is identical; Then said I equals the total N of the watch-dog that supervisory control system comprises, if the storage code stream of the watch-dog that said supervisory control system comprises is inequality, then said I makes the number of the address block that SAN comprised that the big watch-dog of storage code stream is corresponding greater than the number of the corresponding address block that SAN comprised of the little watch-dog of storage code stream.
8. device according to claim 7 is characterized in that, each address block that is divided into I address block in the middle of the address block that said division unit is divided has identical sign;
Address block after said allocation units are used for said division unit divided has the address block of like-identified and distributes to the corresponding SAN of same watch-dog.
9. device according to claim 8 is characterized in that, said division unit also is used for from preset value successively to the address block serial number after dividing; Said device also comprises: create the unit; Wherein,
Said establishment unit was that each watch-dog is created SAN in the supervisory control system before said allocation units distribute address block, and from said preset value successively to the SAN serial number after creating;
The said 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; Said allocation units comprise: poll subelement, complementation subelement and distribution subelement; Wherein,
When the storage code stream of each watch-dog that said poll subelement is used for comprising when supervisory control system is identical, the address block after the said division unit of poll is divided;
The numbering of the address block that said complementation subelement is used for said poll subelement is polled to and the total complementation of the watch-dog that supervisory control system comprises obtain remainder;
Said distribution subelement is used for the address block that said poll subelement is polled to is distributed to the SAN that is numbered said remainder that said establishment 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 CN101521673A (en) 2009-09-02
CN101521673B true 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)

Families Citing this family (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
JP2014533850A (en) * 2011-11-18 2014-12-15 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method, computer program and storage system for reading a file stored on a storage system
CN103647723B (en) * 2013-12-26 2016-08-24 深圳市迪菲特科技股份有限公司 A kind of method and system of traffic monitoring

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545030A (en) * 2003-11-14 2004-11-10 清华大学 Data distribution dynamic mapping method based on magnetic disc characteristic
CN1955912A (en) * 2006-10-13 2007-05-02 清华大学 Method for distributing resource in large scale storage system
CN101237571A (en) * 2008-03-03 2008-08-06 杭州华三通信技术有限公司 A video coding storage method and device in monitoring system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545030A (en) * 2003-11-14 2004-11-10 清华大学 Data distribution dynamic mapping method based on magnetic disc characteristic
CN1955912A (en) * 2006-10-13 2007-05-02 清华大学 Method for distributing resource in large scale storage system
CN101237571A (en) * 2008-03-03 2008-08-06 杭州华三通信技术有限公司 A video coding storage method and device in monitoring system

Also Published As

Publication number Publication date
CN101521673A (en) 2009-09-02

Similar Documents

Publication Publication Date Title
US10191808B2 (en) Systems and methods for storing, maintaining, and accessing objects in storage system clusters
CN104317742A (en) Automatic thin-provisioning method for optimizing space management
CN104133777B (en) A kind of shared memory systems and its application method
CN104618269B (en) Cloud system utilization rate maximum resource distribution method based on horsepower requirements
CN107734558A (en) A kind of control of mobile edge calculations and resource regulating method based on multiserver
CN102096557B (en) Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID)
CN101521673B (en) Method and device for resource distribution
CN103024825A (en) Method and device of distributing network source among multiple applications of terminal
US20170083416A1 (en) Systems and methods for pre-generation and pre-storage of repair fragments in storage systems
CN101135994A (en) Method and apparatus for dividing cache space and cache controller thereof
Berson et al. Randomized data allocation for real-time disk I/O
CN105138281B (en) A kind of sharing method and device of physical disk
CN102082830B (en) Unstable network-oriented distributed file storage method based on quality perception
CN109684127A (en) Locality node restorative procedure based on complete graph minimum bandwidth regeneration code
CN105406999A (en) Multi-data distribution method and distribution equipment
CN101729421A (en) Storage method and device based on time division multiplex
CN103778149A (en) Document system and document storage managing method thereof
Anderson et al. Service rate region of content access from erasure coded storage
CN103827837B (en) Access the method in solid state hard disc space, Apparatus and system
CN111782135A (en) Data storage method, system, data node and computer readable storage medium
CN101945271B (en) Image compression system and compression method
CN113608887A (en) Real-time interaction method for digital twin virtual and real network information
CN101566932A (en) Multi-disk array system and data writing method for multi-disk array system
CN101566933B (en) Method and device for configurating cache and electronic equipment and data read-write equipment
CN101763310B (en) Data storage control method

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.