The embodiments of the invention will be better understood in view of the following drawings and the detailed description.
With reference to
Normally, after the assignment of one space, the fragment space threshold is reset and the fragment space is re-defined. For example in
After a new business request is received and space is assigned from rack space, the fragment space may also be re-defined. For example, with reference to
Sometimes, it may be necessary to adjust the fragment space threshold and to re-define the fragment space simultaneously. For example in
With reference to
After one space assignment, it may be needed to reset the big space threshold and re-define the big space. For example in
Every time a new business is received and space from the rack space is assigned, the big space may also be re-defined. For example in
It may be needed to simultaneously re-determine the big space threshold and re-define the big space in some embodiments. For example in
It should be obvious to a person skilled in the art that in some cases, adjustments to parameters of the big space may affect the parameters of the fragment space. Therefore, it may be necessary to adjust the parameters of both the big space and the fragment space simultaneously. For example in
With reference to
Step 425 includes, upon receiving a business requesting a rack space, determining whether the size of the space requested by the business is smaller than the fragment space threshold. If the space requested by the business is smaller than the fragment space threshold, step 426 includes assigning a space from the fragment space to the business. If the space requested by the business is larger than the fragment space threshold, step 427 includes further determining whether the size of the space requested by the business is larger than the big space threshold. If the size of the space requested by the business is larger than the big space threshold, step 428 includes assigning a space from the big space to the business. If the space requested by the business is smaller than the big space threshold, step 429 includes assigning a space from the common business space to the business.
The flow and the space assignment status in this embodiment is similar to that in the second embodiment described above, and hence will not be repeated. It is to be noted that the fragment space, the big space, and the common business space are generally contiguous spaces. In other words, the three spaces are arranged together to form a single continuous space. However, the order of the three spaces in the contiguous space in the present invention is not limited to the embodiments described herein.
Rack Space Assignment Algorithm in Dividing Racks
A typical Internet data center normally includes several racks, each rack having a corresponding rack space. When there is a business request, the rack space assigned to the business is selected from a most appropriate rack among the several racks of the data centre. The general assignment principle has already been described above. An exemplary assignment algorithm will now be described below.
A series of objects are defined: a first object for indicating a single rack, and a second object for indicating a continuous free space in the single rack. In this example, the first object is defined as Rack and the second object is defined as RackRoom.
The second object further comprises two sub objects: a first sub object for indicating a weight of the continuous free space in the single rack, and a second sub object for indicating a size of the continuous free space in the single rack. The first sub object is defined as iWeight, and the second sub object is defined as iSpace.
In this example, a third object is further defined to indicate the size of a unit space in the rack space, i.e., the size of one U. Since U is not a standard space unit, this object specifies an actual size of one U. The third object is defined as RackSpace.
In addition, a series of parameters are defined:
fragment space threshold (FSH);
big space threshold (BSH);
fragment space area (FSA), which indicates the range of the fragment space;
the size of the space requested by the business, represented using iNeedSpace.
A big space area is not defined. It is obvious to a person skilled in the art that if a parameter for big space area is added, the above algorithm may also be implemented.
The following descriptions are directed to the above three parameters.
Upon receiving a new business request, a new iWeight value (i.e., the weight of a continuous free space in a single rack) is calculated based on a current value of Rack, a current value of iWeight, a current value of Space, iNeedSpace, BSH, FSH, and FSA.
When assigning a space, the assigned space shall satisfy the following conditions:
the space having the largest iWeight, i.e., largest weight; and
the space having an iSpace which is not smaller than iNeedSpace, i.e., a continuous free space.
If the iSpace of the RackRoom is smaller than the iNeedSpace, this continuous space is assigned to the business (Step 606). After assignment, Step 608 includes re-calculating the weight of all continuous spaces in all single rack, that is, for all Rack, re-calculating the iWeight of each RackRoom. Step 610 includes erasing all weights after completing the procedures, that is, erasing the iWeight for all RackRoom in all Rack.
Step 704 includes setting an intermediate variable i, and using i as an index for all Rack. Step 705 includes determining whether the following conditions are satisfied:
Step 706 includes determining whether the iSpace of this RackRoom is larger than iNeedSpace for all RackRoom in this Rack. If iSpace is smaller than iNeedSpace, the Weight of this RackRoom is set to 0 in Step 707. If iSpace is larger than iNeedSpace, the iWeight of this RackRoom is set to iWeightthreshold−i*iCtrl, wherein iWeightthreshold is a predetermined variable value and is generally set to a constant to ensure iWeight is always larger than 0.
Step 709 includes determining whether Weight has been set for all RackRoom in this Rack. If iWeight has not been set for all RackRoom, the method returns to Step 705 to calculate iWeight for a next RackRoom in the Rack. If iWeight for all RackRoom in the Rack has been calculated, the method returns to Step 704 to find a next Rack.
After iWeight has been set for all Rack and the RackRoom, the RackRoom having the highest iWeight is found after traversing all RackRoom in all Rack, and it is determined that the iSpace of this RackRoom is larger than iNeedSpace, then the assignment according to the embodiment is performed.
In the above algorithm, for RackRooms with iSpace larger than iNeedSpace, their iWeights are always larger than those RackRooms with iSpace smaller than or equal to iNeedSpace.
With the above algorithm, business requesting a small space may be limited in FSA to ensure there is enough continuous space for use by business requesting a larger space.
Exemplary Rack Space Assignment Apparatus
Upon receiving a business requesting a rack space, the determination means 806 first determines whether the size of space requested by the business is smaller than the fragment space threshold set by the threshold determination means 802. If it is smaller than the fragment space threshold, then the space assignment means 808 assigns a space from the fragment space to the business.
The functions of the space assignment means 808 in the first embodiment correspond to the rack space assigning method of the first embodiment, and their specific functions and space assignment examples has already been described above with reference to
Also, in accordance with the first embodiment, the threshold determination means 802 re-determines a fragment space threshold after receiving a new business and assigning space from the rack space. And the space defining means 804 re-defines a fragment space after receiving a new business and assigning space from the rack space.
The system diagram of the second embodiment is also made with reference to
Upon receiving a business requesting a rack space, the determination means 806 determines whether the size of space requested by the business is smaller than the fragment space threshold set by the threshold determination means 802. If it is smaller than the fragment space threshold, the space assignment means 808 assigns a space from the fragment space to the business.
If it is not smaller than the fragment space threshold, the determination means 806 further determines whether the size of space requested by the business is larger than the big space threshold set by the threshold determination means 802. If it is larger than the big space threshold, then the space assignment means 808 assigns a space from the big space to the business.
The functions of the space assignment means 808 in the second embodiment correspond to the rack space assigning method of the second embodiment, and their specific functions and space assignment examples have already been described earlier with reference to
Also, in accordance with the first embodiment, the threshold determination means 802 re-determines a big space threshold after receiving a new business and assigning space from the rack space. The space defining means 804 re-defines a big space after receiving a new business and assigning space from the rack space. Similarly, in the apparatus of the second embodiment, the threshold determination means 802 may simultaneously adjust the fragment space threshold and the big space threshold, while the space defining means 804 may simultaneously adjust the fragment space and the big space.
The system diagram of the second embodiment is also made with reference to
Upon receiving a business requesting a rack space, the determination means 806 first determines whether the size of space requested by the business is smaller than the fragment space threshold set by the threshold determination means 802. If it is smaller than the fragment space threshold, then the space assignment means 808 assigns a space from the fragment space to the business.
If it is not smaller than the fragment space threshold, the determination means 806 further determines whether the size of space requested by the business is larger than the big space threshold set by the threshold determination means 802. If it is larger than the big space threshold, then the space assignment means 808 assigns a space from the big space to the business. When it is determined by the determination means 806 that the size of space requested by the business is smaller than the big space threshold but larger than the fragment space threshold, then a space is assigned from the common business space to the business.
In the above three embodiments, the space defining means 804 defines the fragment space, the big space, and the common business space in such a manner that they form a single contiguous space.
In an embodiment, the system diagram of
The second object further comprises two sub objects: a first sub object for indicating the weight of the continuous free space in the single rack and is indicated as iWeight, and a second sub object for indicating the size of the continuous free space in the single rack and is indicated as iSpace.
The object setting means 810 also comprise a third object for indicating the size of a unit space, i.e., the size of one U. Since U is not a standard space unit, this object specifies an actual size of one U. The third object is defined as RackSpace.
In addition, the object setting means 810 further defines a series of parameters, comprising:
fragment space threshold (FSH);
big space threshold (BSH);
fragment space area (FSA) for indicating the range of the fragment space;
the size of the space requested by the business, iNeedSpace.
A big space area is not defined. However, it is obvious to a person skilled in the art that if a parameter for big space area is added, the above algorithm may also be implemented.
Upon receiving a new business request, a new iWeight value (i.e., the weight of a continuous free space in a single rack) may be calculated based on a current value of Rack, a current value of iWeight, a current value of iSpace, iNeedSpace, BSH, FSH and FSA.
When assigning a space, the space assignment means 808 assigns spaces in accordance with the following conditions:
the space having a largest iWeight, i.e., largest weight;
the space having an iSpace not smaller than iNeedSpace, i.e., a continuous free space.
The determination means 806 and space defining means 808 in the above assignment apparatus 800 together implement the following functional steps in an embodiment. Alternatively, a processor 812 may be added into the assignment apparatus 800 in an alternative embodiment to implement the following:
receiving a rack space iNeedSpace requested by the business;
calculating the weight of all continuous spaces in all single rack, that is, calculating iWeight of each RackRoom for all Racks;
finding, from all continuous spaces of all single racks, the continuous space having the highest weight, that is, traversing all RackRooms of all Racks and finding the RackRoom having the highest iWeight;
if the iSpace of the RackRoom is smaller than iNeedSpace, then the continuous space is assigned to the business;
after assignment, re-calculating the weight of all continuous spaces in all single racks, that is, re-calculating the iWeight of each RackRoom for all Racks; and
after completing all procedures, erasing all weights, that is, erasing the iWeight for all RackRooms in all Racks.
The weight calculation algorithm receives a rack space requested by the business iNeedSpace, and determines the size of iNeedSpace and BSH. If iNeedSpace is larger than BSH, an intermediate variable iCtrl is set as −1. If iNeedSpace is not larger than BSH, the intermediate variable iCtrl is set as 1.
Another intermediate variable i is set, and is used as an index for all Racks. Two conditions are determined if they are satisfied: the current Rack is not in FSA and iNeedSpace is not larger than FSH. If these two conditions are satisfied, the index value i is changed. The algorithm then inquires whether the next Rack satisfies these conditions, until a Rack which does not meet the two conditions is found.
The algorithm further determines whether the iSpace of this RackRoom is larger than iNeedSpace for all RackRoom in this Rack. If the iSpace is larger than iNeedSpace, the iWeight of this RackRoom is set to iWeightthreshold−i*iCtrl, wherein iWeightthreshold is a predetermined variable value and is generally set to a constant to ensure iWeight is always larger than 0. If the iSpace is not larger than iNeedSpace, iWeight is set to 0.
The algorithm then determines whether iWeight has been set for all RackRooms in this Rack. If iWeight has not been set for all RackRooms, the algorithm returns to calculate iWeight for a next RackRoom in the Rack. And if all RackRooms in the Rack have been calculated, the algorithm returns to find a next Rack.
After iWeight has been set for all Racks and the RackRooms, the RackRoom having the highest iWeight has been found after traversing all RackRoom in all Rack, and it is determined that the iSpace of this RackRoom is larger than iNeedSpace, then assignment according to the embodiment is performed.
In the above algorithm, for RackRooms whose iSpace are larger than iNeedSpace, their iWeights are always larger than those RackRooms whose iSpace is smaller than or equal to iNeedSpace.
From the above algorithm, the business requesting smaller space may be limited in FSA to ensure there is enough continuous space for use by business requesting larger space.
In accordance with the embodiments described above, the generation of fragments in the rack space is reduced. Also, the large continuous space in the rack space can be assigned and used by large business requests. Therefore, the overall utilization efficiency of rack space is increased and performance is improved.
The present invention is not intended to be limited to the embodiments shown herein. Various modifications to the embodiments described above will be readily apparent to those skilled in the art and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention.
| Number | Date | Country | Kind |
|---|---|---|---|
| 200610026487.6 | May 2006 | CN | national |