CN106843751A - The method and apparatus for placing storage volume - Google Patents

The method and apparatus for placing storage volume Download PDF

Info

Publication number
CN106843751A
CN106843751A CN201611228589.6A CN201611228589A CN106843751A CN 106843751 A CN106843751 A CN 106843751A CN 201611228589 A CN201611228589 A CN 201611228589A CN 106843751 A CN106843751 A CN 106843751A
Authority
CN
China
Prior art keywords
storage volume
storage
pool
condition
volume
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
CN201611228589.6A
Other languages
Chinese (zh)
Other versions
CN106843751B (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611228589.6A priority Critical patent/CN106843751B/en
Publication of CN106843751A publication Critical patent/CN106843751A/en
Application granted granted Critical
Publication of CN106843751B publication Critical patent/CN106843751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/063Address space extension for I/O modules, e.g. memory mapped I/O
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

A kind of method and virtual memory manager for placing storage volume is the embodiment of the invention provides, the method includes:Virtual memory manager obtains the placement request of at least one storage volume, what placement request included at least one storage volume obligates condition and Preference Constraint condition, it is the necessary condition for determining the storage pool of at least one storage volume that this obligates condition, and the Preference Constraint condition is the complementary condition for determining the storage pool of at least one storage volume;Condition and the Preference Constraint condition are obligated according to this, the corresponding storage pool of each storage volume at least one storage volume is determined;Each storage volume at least one storage volume is placed in corresponding storage pool.The embodiment of the present invention can select suitable storage pool to place each storage volume from candidate virtual storage pool, disclosure satisfy that the performance requirement of different storage volume, and reasonably be placed on multiple storage volume on storage pool by realization.

Description

The method and apparatus for placing storage volume
Technical field
The present embodiments relate to field of storage, and the method and apparatus more particularly, to storage volume is placed.
Background technology
With the development of IT application in enterprises, the hardware device of enterprise data center is continuously increased, and operation system is held to storage The requirement of amount is increasing.But enterprise is often faced with storage device isomerization predicament, the i.e. hardware of different vendor in storage Operation coexists with software product, and each other can not be compatible, form storage system isolated island.Therefore, storage device and resource, data Integration it is imperative.Storage Virtualization is a kind of through whole IT environment, for simplifying bottom isomery storage architecture Technology.`
The thought of Storage Virtualization is to separate the logical image of resource and physical store, so that for systems and management person carries For width simplification, seamless resource virtual view.
For a user, the storage resource of virtualization is like storage pool one by one, and user not can be appreciated that specific magnetic Disk, tape, user can create storage volume in storage pool, and need not be concerned about the storage volume and create in which platform physical equipment On.In other words, user need not be concerned about which specific storage device is data lead to by which paths.
From from the perspective of management, virtual memory manager can create the demand of storage volume in storage pool according to user Middle storage resource distributes to each user or application.However, the parameter between different storage pools, such as storage medium, treatability Energy, free space etc., it is often different.Different storage volume may have personalized placement constraint, for example, storage medium is wanted Ask or the requirement to memory space, meanwhile, it is likely between storage volume with demands such as compatibility, non-compatibilities.
Therefore, in order to meet the performance requirement of different storage volume, how virtual memory manager reasonably stores multiple The placement on storage pool is rolled up, as problem demanding prompt solution.
The content of the invention
The embodiment of the present invention provides a kind of method and virtual memory manager for placing storage volume, and the method disclosure satisfy that not With the performance requirement of storage volume, reasonably be placed on multiple storage volume on storage pool by realization.
First aspect, there is provided a kind of method of placement storage volume, the method includes:
Virtual memory manager obtains the placement request of at least one storage volume, and placement request includes that this at least one is deposited What storage was rolled up obligates condition and Preference Constraint condition, and it is the void for determining at least one storage volume that this obligates condition Intend the necessary condition of storage pool, the Preference Constraint condition is the auxiliary for determining the storage pool of at least one storage volume Property condition;
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume in volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In.
Wherein, the corresponding storage pool of each storage volume is that the storage manager is obligated condition and is somebody's turn to do according to this Suitable placement each storage volume that Preference Constraint condition is selected from the multiple storage pools in the storage system Storage pool.
In other words, virtual memory manager obligates condition and the Preference Constraint condition according to this, by this at least one In individual storage volume each storage volume find place the storage volume suitable storage pool, and each storage volume is placed on it is right In the storage pool answered.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
It should be understood that in embodiments of the present invention, mandatory constraints is that the storage pool for placing storage volume must expire The condition of foot, Preference Constraint condition is to place the condition that the storage pool of storage volume preferably meets.
Alternatively, in a kind of implementation of first aspect, this obligates condition and the Preference Constraint condition is distinguished Constrained including at least one in following:The storage media types constraint of storage volume, the storage size of storage volume are constrained, deposited The compatibility constraint stored up between performance constraints, the storage volume of volume is constrained with non-compatibility.
Virtual memory manager can obligate condition according to this first and the Preference Constraint condition is accurately solved, Solve the corresponding storage pool of each storage volume at least one storage volume.Feasible solution is looked in accurate solution, i.e., this is at least Each storage volume solves the storage pool placed in one storage volume, then problem solving terminates.If accurately solved In the case of not finding feasible solution, virtual memory manager carries out fuzzy solution again.Wherein, accurate solution is for storage volume is looked for The storage pool of condition and Preference Constraint condition is obligated to satisfaction;Fuzzy solution only considers to obligate condition, and has Loosening to obligating condition for selectivity, i.e., selectively obligate condition and ignore to part, is storage Volume finds to meet is ignoring remaining the storage pool for obligating condition after condition is obligated in part, in the hope of " maximum Change " meets the feasible solution of user's request.In other words, the stage is solved accurate, solution procedure will simultaneously consider mandatory constraint With Preference constraint, i.e., while all mandatory constraints are met, Preference constraint is met as much as possible, and in fuzzy solution In the stage, only consider mandatory constraint, do not consider Preference constrain, and to part " inessential " mandatory constraint carried out selection Ignore on ground.
In the embodiment of the present invention, condition can be obligated according to this first and the Preference Constraint condition is accurately asked Solution, solves the storage pool of each storage volume placement, in the case of accurately solving without solution, can carry out abnormality processing, enters Row is fuzzy to be solved, can as far as possible provide the feasible solution for meeting user's request, it is to avoid the possibility without solution, can lift user's body Test.
In addition, solving the stage accurate, the embodiment of the present invention can also carry out anti-crushing optimization.I.e. meet it is mandatory about On the basis of beam, Preference constraint, the minimum scheme of selection fragment.That is one group of placement of the fragment minimum of selection storage pool Scheme.In the fuzzy solution stage, anti-crushing optimization will not be carried out.
Therefore, in void on the basis of the embodiment of the present invention can obligate condition and the Preference Constraint condition this is met Tried one's best when placing storage volume in plan storage pool and avoid or reduce the generation of virtual pool fragment, Consumer's Experience can be lifted.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager obligates condition according to this With the Preference Constraint condition, the corresponding storage pool of each storage volume at least one storage volume is determined, including:
The virtual memory manager obligates condition and the Preference Constraint condition according to this, using greedy algorithm, solves The storage pool that each storage volume is placed at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After at least one storage volume solves the storage pool placed, the virtual memory manager is according to final Greedy solving result, each storage volume at least one storage volume is placed in corresponding storage pool.
Therefore, in the embodiment of the present invention virtual memory manager can determine meet storage volume obligate condition and partially The storage pool of good constraints, and each storage volume at least one storage volume is placed on corresponding storage pool In, the performance requirement of different storage volume is disclosure satisfy that, reasonably be placed on multiple storage volume on storage pool by realization.
Alternatively, in a kind of implementation of first aspect, greedy algorithm is being used, all storage volume are solved puts After the storage pool put, in the case of without very first time threshold value is reached,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume, also includes in volume:
The virtual memory manager repeats to obligate condition and the Preference Constraint condition according to this, using greedy algorithm, The storage pool of each storage volume placement at least one storage volume is solved, multigroup greedy solving result is obtained, this is more Each group of greedy solving result includes one group of placement schemes of at least one storage volume in the greedy solving result of group;
The virtual memory manager puts each storage volume at least one storage volume according to final greediness solving result Put in corresponding storage pool, including:
The virtual memory manager is true by anti-crushing one group of best solving result of effect in multigroup greedy solving result It is set to the final greedy solving result, and according to the final greedy solving result, by each storage at least one storage volume Volume is placed in corresponding storage pool.
Therefore, in void on the basis of the embodiment of the present invention can obligate condition and the Preference Constraint condition this is met Tried one's best when placing storage volume in plan storage pool and avoid or reduce the generation of virtual pool fragment, Consumer's Experience can be lifted.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager ties multigroup greedy solution Anti-crushing one group of best solving result of effect is defined as the final greedy solving result in fruit, including:
The virtual memory manager is finished threshold value Y according to the fragment-threshold F of storage pool and storage, by multigroup greedy solution The remaining space of storage pool is located at one group of solving result determination of the storage pool number minimum between F and Y in result It is the final greedy solving result.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager obligates condition according to this With the Preference Constraint condition, using greedy algorithm, the virtual of each storage volume placement is deposited in solving at least one storage volume Reservoir, including:
The virtual memory manager obligates condition according to this, the initial candidate storage pool of each storage volume Number, wherein, the initial candidate storage pool of the first storage volume meet place first storage volume obligate condition;
The ascending order of the number of the candidate's storage pool according at least one storage volume, one by one from this at least one Current candidate storage pool is determined in storage volume in the initial candidate storage pool of each storage volume, first storage volume Current candidate storage pool is somebody's turn to do assuming that meeting after all storage volume before first storage volume are placed on storage pool First storage volume obligates condition;
According to the Preference Constraint condition, from the current candidate storage pool of first storage volume determine place this first The storage pool of storage volume.
Alternatively, in a kind of implementation of first aspect, assuming that all storage volume before first storage volume After being placed on storage pool, the initial candidate storage pool of first storage volume is unsatisfactory for the pressure of first storage volume In the case of constraints,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, using greedy algorithm, solves The storage pool that each storage volume is placed at least one storage volume, also includes:
The virtual memory manager releases the storage before taking the initial candidate virtualization pool of first storage volume Volume, and the storage volume before this is placed in other candidate virtual resource pools of the storage volume,
Using the initial candidate virtualization pool after releasing as each storage volume current candidate storage pool.
Therefore, when the embodiment of the present invention takes the storage pool of the placement of follow-up storage volume in storage volume before, lead to Retrospect Solution is crossed, the storage pool for placing storage volume can be reasonably adjusted, and then finally realize the reasonable of all storage volume Place, lift Consumer's Experience.
Alternatively, in a kind of implementation of first aspect, this according to the Preference Constraint condition, from first storage volume Current candidate storage pool in determine place first storage volume storage pool, including:
According to the Preference Constraint condition, to each virtual memory in the current candidate storage pool of first storage volume Pond is scored, and the highest storage pool that scored in the current candidate virtual storage pool is defined as to place first storage The storage pool of volume.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager according to below equation to this Each storage pool is scored in the current candidate storage pool of one storage volume:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents the scorings of the first storage volume obj to storage pool p, w_opcobj,iTable Show the first storage volume obj to i-th weight of constraint in the Preference Constraint condition.
Alternatively, in a kind of implementation of first aspect, using greedy algorithm, at least one storage volume by During the storage pool that individual solution storage volume is placed, there is storage volume at least one storage volume and do not solve the void placed In the case of intending storage pool,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume, also includes in volume:
The virtual memory manager obligates condition and the Preference Constraint condition according to this, using linear programming algorithm, Solve the storage pool of each storage volume placement at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After at least one storage volume solves the storage pool placed, the virtual memory manager is according to final Programming evaluation result, each storage volume at least one storage volume is placed in corresponding storage pool.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager obligates condition according to this With the Preference Constraint condition, the corresponding storage pool of each storage volume at least one storage volume is determined, including:
The virtual memory manager obligates condition and the Preference Constraint condition according to this, using linear programming algorithm, Solve the storage pool of each storage volume placement at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
Solved to after the storage pool placed at least one storage volume, the virtual memory manager is according to final rule Solving result is drawn, each storage volume at least one storage volume is placed in corresponding storage pool.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager obligates condition according to this With the Preference Constraint condition, using linear programming algorithm, the void of each storage volume placement at least one storage volume is solved Intend storage pool, including:
Each is deposited during the virtual memory manager determines at least one storage volume according to the maximum for solving object function The corresponding storage pool of storage volume, wherein, the object function represents that storage pool meets the score of Preference Constraint condition, the target letter Several constraints obligates condition for this,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage Roll up corresponding xthnThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet obtaining for Preference Constraint condition Point, M represents that this obligates the number of condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
Alternatively, in a kind of implementation of first aspect, linear programming algorithm is being used, all storage volume are solved To after the storage pool placed, in the case of without the second time threshold is reached,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume, also includes in volume:
The virtual memory manager repeats to obligate condition and the Preference Constraint condition according to this, using linear plan algorithm Method, solves the storage pool of each storage volume placement at least one storage volume, obtains multigroup programming evaluation result, should Each group of solving result includes one group of placement schemes of at least one storage volume in multigroup programming evaluation result;
The virtual memory manager puts each storage volume at least one storage volume according to final programming evaluation result Put in corresponding storage pool, including:
The virtual memory manager will meet one group of best solving result of Preference constraint in multigroup solving result true It is set to the final programming evaluation result, and according to final programming evaluation result, by each storage volume at least one storage volume It is placed in corresponding storage pool.
Alternatively, in a kind of implementation of first aspect, use linear programming algorithm, do not solve this at least one In the case of the storage pool that each storage volume is placed in individual storage volume,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume, also includes in volume:
The virtual memory manager according to the 3rd constraints, using greedy algorithm, in solving at least one storage volume Each storage volume place storage pool, wherein, the 3rd constraints including this obligate condition in remove part Remaining constraints after constraint;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After all storage volume solve the storage pool placed, the virtual memory manager is asked according to final obscuring Solution result, each storage volume at least one storage volume is placed in corresponding storage pool.
Alternatively, in a kind of implementation of first aspect, the virtual memory manager according to the 3rd constraints, Using greedy algorithm, the storage pool of each storage volume placement at least one storage volume is solved, including:
The virtual memory manager according to the storage pool for obligating condition for meeting storage volume number by it is small to Big order, is ranked up at least one storage volume;
The virtual memory manager, according to the sequence of at least one storage volume, will successively remove N according to step-length N is loosened Remaining constraints is pre-conditioned as the 3rd after first constraints obligated in condition of individual storage volume, and every After the N number of constraints obligated in condition of storage volume of secondary removal, according to the 3rd constraints, calculated using greediness Method, solves the storage pool of each storage volume placement at least one storage volume, until all storage volume are solved The storage pool of placement.
Alternatively, in a kind of implementation of first aspect, the virtual memory placed is solved in all storage volume Chi Hou, in the case of without the 3rd time threshold is reached,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, determines at least one storage The corresponding storage pool of each storage volume, also includes in volume,
The virtual memory manager is repeated according to the 3rd constraints, using greedy algorithm, is solved this and at least one is deposited The storage pool that each storage volume is placed in storage volume, obtains multigroup fuzzy solving result, in multigroup fuzzy solving result Each group of fuzzy solving result includes one group of placement schemes of at least one storage volume;
The virtual memory manager puts each storage volume at least one storage volume according to final fuzzy solving result Put in corresponding storage pool, including:
The virtual memory manager by multigroup fuzzy solving result constraints scoring one group of solving result of highest Be defined as the finally fuzzy solving result, and according to the final fuzzy solving result, by least one storage volume each deposit Storage volume is placed in corresponding storage pool.
In the embodiment of the present invention, condition can be obligated according to this first and the Preference Constraint condition is accurately asked Solution, solves the storage pool of each storage volume placement, in the case of accurately solving without solution, can carry out abnormality processing, enters Row is fuzzy to be solved, can as far as possible provide the feasible solution for meeting user's request, it is to avoid the possibility without solution, can lift user's body Test.
Second aspect, there is provided a kind of virtual memory manager, for performing above-mentioned first aspect, any of first aspect Method in possible implementation.Specifically, the virtual memory manager includes the module for performing the above method.
A kind of third aspect, there is provided virtual memory manager, the virtual memory manager includes processor and memory, The memory is used to store computer program, and the processor is used to perform the computer program stored in the memory, in execution State the method in first aspect, any possible implementation of first aspect.
A kind of fourth aspect, there is provided computer-readable medium, for storing computer program, the computer program includes The instruction of the method in for performing first aspect, any possible implementation of first aspect.
Brief description of the drawings
Fig. 1 is the applicable memory virtualization system configuration diagram of the embodiment of the present invention.
Fig. 2 is the schematic diagram that embodiment of the present invention virtual memory manager places storage volume.
Fig. 3 is the method flow diagram of placement storage volume according to an embodiment of the invention.
Fig. 4 is the algorithm flow chart that storage volume is placed according to one embodiment of the invention virtual memory manager.
Fig. 5 is the algorithm flow chart that storage volume is placed according to another embodiment of the present invention virtual memory manager.
Fig. 6 is according to one embodiment of the invention greedy algorithm flow chart.
Fig. 7 is linear programming algorithm flow chart according to an embodiment of the invention.
Fig. 8 is the example schematic of placement storage volume according to an embodiment of the invention.
Fig. 9 is the example schematic of placement storage volume according to another embodiment of the present invention.
Figure 10 is the schematic block diagram of virtual memory manager according to an embodiment of the invention.
Figure 11 is the schematic block diagram of virtual memory manager according to another embodiment of the present invention.
Specific embodiment
Below in conjunction with accompanying drawing, the technical scheme in the embodiment of the present invention is described.
Fig. 1 is the applicable memory virtualization system configuration diagram of the embodiment of the present invention.As shown in figure 1, storage is virtual Changing system architecture includes physical storage layer, Storage Virtualization layer, storage pool, virtual memory manager and calculate node.
Wherein, physical storage layer can include various physical storage devices, such as service memory network (Storage Area Network, SAN) equipment, memory node (Nodes), storage array (Array) is for example, 3U small computer system interfaces (ISCSI) disk, network attached storage (Network Attached Storage, NAS) equipment, direct additional storage (Direct Attached Storage, DAS) equipment, the storage network based on fiber optic communication protocol or based on IP agreement (Fiber Channel/IP Storage Area Network, FC/IP-SAN).Storage Virtualization layer is based on physical storage layer Multiple storage pools can be created, and then shields bottom physical store isomerism, realize and manage virtual memory and physical store Mapping relations, there is provided the expanded function such as automatic simplify configuration, automatic data migration.Virtual memory manager is responsible for storage pool Management, scheduling, to calculate node provide data storage.Virtual memory management layer is asked according to the placement of storage volume, for example, count The placement request of operator node, storage volume is placed in the plurality of storage pool.
Wherein, the embodiment of the present invention relates generally to virtual memory manager according to the placement of storage volume request, by storage volume It is placed on the detailed process in the plurality of storage pool.
It should be understood that the virtual memory manager can be included in the embodiment of the present invention in the memory virtualization system, it is optional Ground, the virtual memory manager can not also be located in the virtual memory management system, i.e., the virtual memory manager is independent Unit, the embodiment of the present invention is not limited to this.
Hereinafter, it is non-limiting as an example for the ease of understanding and illustrating, by the placement storage volume of the embodiment of the present invention Implementation procedure and action of the method and apparatus in virtual storage system illustrate.
Specifically, as shown in Fig. 2 virtual memory manager is after placement request is got, can be according in placement request Constraints, scheduling is dynamically placed to storage volume, also will multiple storage volume for example, LUN (Logical Unit Number, LUN) create multiple storage pools in physical array.
It should be understood that in the embodiment of the present invention, a storage pool can correspond to the void of a kind of physical storage device, i.e., Intend storage pool to create in a kind of physical storage device;Alternatively, storage pool can also correspond to various physics and deposit and set Standby, i.e., one storage pool is created in various physical equipments, and the embodiment of the present invention is limited not to this.
It should be understood that storage volume is placed in storage pool in the embodiment of the present invention can also state as in virtual memory Storage volume is created in pond, the embodiment of the present invention is not limited to this.
It should be understood that two storage volume meet compatibility and represent that two storage volume needs are placed on together in the embodiment of the present invention In one storage pool, two storage volume are unsatisfactory for compatibility and represent that two storage volume need to be placed on different virtual deposit In reservoir;Or, in embodiments of the present invention, two storage volume meet compatibility and represent that two storage volume are correspondingly placed at together On one physical array;Two storage volume meet non-compatibility and represent that two storage volume are correspondingly placed at different physical arrays On.
For example, the daily record storage volume and data storage volume of database need to meet compatibility, the primary storage volume of database and Standby storage volume needs to meet non-compatibility.It should be understood that the storage volume for meeting compatibility or non-compatibility can also be other types Storage volume, the embodiment of the present invention is not limited to the related storage volume of database, and the storage volume in the embodiment of the present invention can be with Arbitrary storage volume including meeting compatibility or the definition of non-compatibility, the embodiment of the present invention will not enumerate herein.
The method for describing the placement storage volume of the embodiment of the present invention in detail with reference to Fig. 3.
Fig. 3 is the method flow diagram of placement storage volume according to an embodiment of the invention.Method 300 as shown in Figure 3 Can apply in the memory virtualization system shown in Fig. 1, method 300 can be performed by virtual memory manager, specifically, such as Method 300 shown in Fig. 3 includes:
310, virtual memory manager obtain at least one storage volume placement request, the placement request include this at least one Individual storage volume obligates condition and Preference Constraint condition, and this obligates condition is for determining at least one storage volume Storage pool necessary condition, the Preference Constraint condition is the storage pool for determining at least one storage volume Complementary condition.
It should be understood that the placement request can be that user sends, or system manager send, or should Storage virtual system generation, the embodiment of the present invention is limited not to this.
It should be understood that in embodiments of the present invention, mandatory constraints is that the storage pool for placing storage volume must expire The condition of foot, Preference Constraint condition is to place the condition that the storage pool of storage volume preferably meets.
Specifically, this obligate condition and the Preference Constraint condition include respectively it is following at least one constraint:Deposit Storage media types constraint, the storage size constraint of storage volume, the parent between the performance constraints of storage volume, storage volume for storing up volume Constrained with property constraint and non-compatibility.
Alternatively, in the embodiment of the present invention, each constraints can be endowed a weighted value in request is placed, should Weighted value is used to characterize the relative importance of the constraints, and the numerical value of weight is smaller, and the importance for characterizing constraints is lower, The weight sum of institute's Prescribed Properties of placement request is 1.
For example, user needs to place 5 storage volume, storage volume 1 to 5, what placement request included obligates condition Can be:The memory space of storage volume 1-5 is respectively 500G, 500G, 400G, 1000G, 600G, and storage volume 1 and storage volume 2 are full Sufficient compatibility, storage volume 3 and storage volume 4 meet non-compatibility.The placement Preference constraints that includes of request can be: Storage volume 1 and storage volume 5 meet compatibility, i.e., the number of times (Input/ for being written and read (I/O) operation per second of storage volume 1 Output Operations Per Second, IOPS) >=200, the storage medium of storage volume 5 is solid state hard disc (Solid State Drives, SSD).Alternatively, the weight of following constraints can also be included in placement request:Compatibility/non-parent It is 0.3 with property class constraint weight, spatial class constraint weight is 0.3, storage medium weight is that 0.1, IOPS constraint weights are 0.3.
320, the virtual memory manager obligates condition and the Preference Constraint condition according to this, determine this at least one The corresponding storage pool of each storage volume in storage volume.
Wherein, the corresponding storage pool of each storage volume is that the storage manager is obligated condition and is somebody's turn to do according to this Suitable placement each storage volume that Preference Constraint condition is selected from the multiple storage pools in the storage system Storage pool.
330, be placed on for each storage volume at least one storage volume and corresponding virtually deposit by the virtual memory manager In reservoir.
In other words, virtual memory manager obligates condition and the Preference Constraint condition according to this, by this at least one In individual storage volume each storage volume find place the storage volume suitable storage pool, and each storage volume is placed on it is right In the storage pool answered.
Specifically, in the embodiment of the present invention, after all of storage volume seeks the corresponding storage pool of determination, this is virtual Just be placed on each storage volume at least one storage volume in corresponding storage pool by storage manager.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
Specifically, in 320, virtual memory manager can obligate condition and the Preference Constraint bar according to this first Part is accurately solved, and solves the corresponding storage pool of each storage volume at least one storage volume.Looked in accurate solution Each storage volume solves the storage pool placed in feasible solution, i.e. at least one storage volume, then problem solving terminates. If in the case where accurate solution does not find feasible solution, virtual memory manager carries out fuzzy solution again.Wherein, accurately ask Solution is to meet the storage pool for obligating condition and Preference Constraint condition for storage volume finds;Fuzzy solution only considers to force Constraints, and selectively loosen to obligating condition, i.e., condition selectively is obligated to part and enter Row is ignored, and is that storage volume finds to meet and ignoring remaining the virtual memory for obligating condition after condition is obligated in part Pond, the feasible solution of user's request is met in the hope of " maximization ".In other words, the stage is solved accurate, solution procedure will simultaneously Consider mandatory constraint and Preference constraint, i.e., while all mandatory constraints are met, Preference is met as much as possible about Beam, and in the fuzzy solution stage, only consider mandatory constraint, do not consider that Preference is constrained, and to the pressure of part " inessential " Property constraint selectively ignored.
A kind of currently existing scheme is that different storage volume is placed on into virtual memory virtual pool according to the capacity of storage volume, when When the capacity for having part storage volume cannot meet, then null value is returned to, abnormality processing is not carried out or return meets as far as possible The candidate virtual storage pool of user's request.And in the embodiment of the present invention, condition and the preference can be obligated according to this first Constraints is accurately solved, and solves the storage pool of each storage volume placement, in the case of accurately solving without solution, Abnormality processing can be carried out, fuzzy solution is carried out, can as far as possible provide the feasible solution for meeting user's request, it is to avoid without solution can Can, Consumer's Experience can be lifted.
In addition, solving the stage accurate, the embodiment of the present invention can also carry out anti-crushing optimization.I.e. meet it is mandatory about On the basis of beam, Preference constraint, the minimum scheme of selection fragment.That is one group of placement of the fragment minimum of selection storage pool Scheme.In the fuzzy solution stage, anti-crushing optimization will not be carried out.
Therefore, in void on the basis of the embodiment of the present invention can obligate condition and the Preference Constraint condition this is met Tried one's best when placing storage volume in plan storage pool and avoid or reduce the generation of virtual pool fragment, Consumer's Experience can be lifted.
For example, as shown in figure 4, virtual memory manager is accurately solved first in present example, wherein, accurately ask Solution preocess can bag heuristic solving strategy and mathematics programming evaluation, for example, in very first time threshold value t1Interior use greedy algorithm is carried out Heuristic solving strategy, in t1After arrival, if finding feasible solution, problem solving terminates.If not finding feasible solution, into mathematics The programming evaluation stage, for example, in the second time threshold t2Linear programming for solution is inside used, is solved if feasible solution is found and terminated, Otherwise, i.e., the fuzzy solution stage is entered in the case of without solution.Fuzzy solution only considers to obligate condition, and selectively Loosen to obligating condition, i.e., condition selectively is obligated to part and ignore, for example, in the 3rd time Threshold value t3It is interior using based on the fuzzy solution loosened of constraint, being that storage volume finds to meet and obligates virtually depositing for condition remainingly Reservoir, the feasible solution of user's request is met in the hope of " maximization ".Wherein, no matter accurate solve and fuzzy solution, do not arrive Up to time threshold (t1、t2Or t3) in the case of can repeat, until time threshold duration terminates, if last solve To multigroup solution, then one group of last solution is selected from multigroup solution.
Alternately, as shown in figure 5, the embodiment of the present invention is when accurately being solved, it is also possible to do not carry out heuristic asking Solution, but directly carry out Mathematical Planning and solve the stage, for example, in the second time threshold t2Linear programming for solution is inside used, if looking for Then solved to feasible solution and terminated, otherwise, i.e., without solution in the case of enter the fuzzy solution stage.Fuzzy solution only considers to obligate Condition, and selectively loosen to obligating condition, i.e., condition selectively is obligated to part and neglect Slightly, for example, in the 3rd time threshold t3It is interior to use the fuzzy solution loosened based on constraint, it is with finding satisfaction residue strong storage volume The storage pool of constraints processed, the feasible solution of user's request is met in the hope of " maximization ".Wherein, though it is accurate solve and It is fuzzy to solve, there is no arrival time threshold value (t2Or t3) in the case of can repeat, until time threshold duration knot Beam, if last solve to multigroup solution, selects one group of last solution from multigroup solution.
The accurate solution and fuzzy solution of the embodiment of the present invention will in detail be retouched with reference to row of Fig. 4 and Fig. 5 State.
The accurate solution procedure for carrying out heuristic solving strategy as shown in Figure 4, in 320, the virtual memory manager according to This obligates condition and the Preference Constraint condition, using greedy algorithm, solves each storage at least one storage volume Roll up the storage pool placed;
In 330, after at least one storage volume solves the storage pool placed, the virtual memory manager According to final greedy solving result, each storage volume at least one storage volume is placed in corresponding storage pool, The final greedy solving result includes one group of placement schemes of at least one storage volume.
Therefore, in the embodiment of the present invention virtual memory manager can determine meet storage volume obligate condition and partially The storage pool of good constraints, and each storage volume at least one storage volume is placed on corresponding storage pool In, the performance requirement of different storage volume is disclosure satisfy that, reasonably be placed on multiple storage volume on storage pool by realization.
Specifically, as shown in fig. 6, Fig. 6 is the heuristic solving strategy schematic flow sheet of one embodiment of the invention.Such as Fig. 6 institutes The method shown includes:
610, storage volume sequence.
Specifically, the virtual memory manager obligates condition according to this, determines that the initial candidate of each storage volume is empty Intend storage pool, wherein, the initial candidate storage pool of the first storage volume meet place first storage volume obligate bar Part;The number of the candidate's storage pool according at least one storage volume is ascending to carry out order to storage volume.
Wherein, if there is the storage volume that can not find storage pool at least one storage volume, this is heuristic Failure is solved, then performs Mathematical Planning solution procedure.
620, at least one storage volume is solved one by one.
Specifically, the number of the candidate's storage pool according at least one storage volume order from small to large, one by one from this Current candidate storage pool is determined at least one storage volume in the initial candidate storage pool of each storage volume, this first The current candidate storage pool of storage volume is assuming that all storage volume before first storage volume are placed on storage pool Meet first storage volume afterwards obligates condition.It should be understood that first storage volume can be at least one storage volume Any one storage volume.
630, judge whether that all storage volume have current candidate storage pool.
When all storage volume have current candidate storage pool, step 640 is performed;Exist in all storage volume Storage volume does not exist current candidate storage pool, i.e., assuming that all storage volume before first storage volume are placed on virtually After storage pool, the initial candidate storage pool of first storage volume is unsatisfactory for the condition of obligating of first storage volume In the case of, perform step 650.
640, all of storage volume determines the virtual pool placed.
The virtual memory manager according to the Preference Constraint condition, from the current candidate storage pool of first storage volume The middle storage pool for determining to place first storage volume.
Further, the virtual memory manager is according to the Preference Constraint condition, to the current candidate of first storage volume Each storage pool is scored in storage pool, and the highest that scored in the current candidate virtual storage pool is virtual Storage pool is defined as placing the storage pool of first storage volume.
Wherein, the virtual memory manager can virtually be deposited according to below equation to the current candidate of first storage volume Each storage pool is scored in reservoir:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents the scorings of the first storage volume obj to storage pool p, w_opcobj,iTable Show the first storage volume obj to i-th weight of constraint in the Preference Constraint condition.
It should be understood that in the embodiments of the present invention, by the highest virtual memory that scored in the current candidate virtual storage pool Pond is defined as placing the storage pool of each storage volume.Alternatively, can also be by current candidate in the embodiment of the present invention Scoring is defined as placing the storage pool of each storage volume in the interval storage pool of selection in storage pool.
Specifically, in solution procedure, to ensure the diversity and optimality of solution, if certain storage volume is waited before having multiple Storage pool is selected, then therefrom randomly selects one as last solution.Can be using " the mould based on threshold value in the embodiment of the present invention Paste optimal solution ", specifically, sets Fuzzy Threshold γ, if in all current candidate storage pools of current storage volume obj most Higher assessment is divided into score_opcobj (p)high, then by scoring in selection interval [score_opcobj (p)high-γ,score_ opcobj(p)high]) storage pool be all considered as optimal solution, randomly selected from above-mentioned solution.If score_opcobj (p)high–γ<0, then it is [0, score_opcobj (p) that above-mentioned selection is intervalhigh]。
After all of storage volume determines the virtual pool placed, step 670 is performed.In all of storage volume for solution is arrived After the virtual pool of placement, step 660 is performed.
650, Retrospect Solution.
Specifically, in solution procedure, if certain storage volume does not get feasible solution, recalled along conflict solution Solve.Specifically, after assuming that all storage volume before first storage volume are placed on storage pool, first storage The initial candidate storage pool of volume be unsatisfactory for first storage volume obligate condition in the case of,
The virtual memory manager releases the storage before taking the initial candidate virtualization pool of first storage volume Volume, and the storage volume before this is placed in other candidate virtual resource pools of the storage volume, by the initial candidate after releasing Virtualization pool as each storage volume current candidate storage pool.
In other words, in solution procedure, if certain storage volume does not get feasible solution, returned along conflict solution Trace back solution.I.e. for taking the storage volume of the feasible solution, release and take accounting between storage volume and the feasible solution virtualization pool With relation, and for the storage volume selects optimal resource pool as solution resource pool from other unappropriated feasible solutions.If its Its resource pool all takes, then carry out backtracking process successively, until without conflict (Retrospect Solution success), or traces back to and has unbinded Cross resource pool (Retrospect Solution failure) once.
Therefore, when the embodiment of the present invention takes the storage pool of the placement of follow-up storage volume in storage volume before, lead to Retrospect Solution is crossed, the storage pool for placing storage volume can be reasonably adjusted, and then finally realize the reasonable of all storage volume Place, lift Consumer's Experience.
660, judge whether run time reaches very first time threshold value t1.
Specifically, very first time threshold value t is less than at runtime1, then return and perform step 620.Arrive at runtime Up to very first time threshold value t1Afterwards, in the case of no feasible solution, step 680 is performed.In the case where there is feasible solution, perform Step 670.
Specifically, after the storage pool placed is solved in all storage volume, without arrival very first time threshold Value t1In the case of,
The virtual memory manager repeats to obligate condition and the Preference Constraint condition according to this, using greedy algorithm, The storage pool of each storage volume placement at least one storage volume is solved, multigroup greedy solving result is obtained, this is more Each group of greedy solving result includes one group of placement schemes of at least one storage volume in the greedy solving result of group.
In other words, the first row time threshold t of greedy algorithm fortune can be pre-set in the embodiment of the present invention1, every Check run time whether more than t after secondary operation greedy algorithm is complete1If, more than t1And in the case of having multiple final feasible solutions, then Performing step 670 carries out anti-debris filter.
670, it is determined that final seek greedy solution result.
Specifically, anti-crushing one group of best solving result of effect is defined as the final greediness from group greedy solving result Solving result,
For specifically, the virtual memory manager is by best one group of anti-crushing effect in multigroup greedy solving result Solving result is defined as the final greedy solving result, and according to the final greedy solving result, by least one storage volume In each storage volume be placed in corresponding storage pool.
For example, the virtual memory manager is finished threshold value Y according to the fragment-threshold F of storage pool and storage, this is multigroup greedy The remaining space of storage pool is located at one group of solution knot of the storage pool number minimum between F and Y in greedy solving result Fruit is defined as the final greedy solving result, F>Y.
Wherein, the embodiment of the present invention can choose the final greedy solving result from all of group of greedy solving result. Preliminary screening can also be carried out to all of greedy solving result, the selection result is obtained, this is then chosen from the selection result most Whole greediness solving result.Wherein, solving result scoring is in during the selection result can include all of group of greedy solving result Scoring is chosen in interval [score_solutionhigh-μ,score_solutionhigh] greedy solving result, wherein, score_solutionhigh, represent one group of greedy solving result of Preference scoring highest in all of group of greedy solving result Scoring, μ represents predetermined threshold value.
In embodiments of the present invention, anti-crushing optimization can be the fragment rule set according to user, from existing greediness The i.e. final greediness solving result of the anti-crushing optimal scheme of effect is chosen in solving result.
Specifically, anti-crushing optimization includes three contents of aspect, i.e. fragment-threshold F settings, storage " being finished " threshold value Y sets It is fixed, and virtualization pool selection is carried out based on anti-crushing rule.
Wherein, fragment-threshold F is used to judge fragment that storage " being finished " threshold value Y to be used to judge the usage degree of memory space.
Specifically, F can be in the following manner determined in the embodiment of the present invention.
Mode one:Rule of thumb, the value of F is directly determined, that is to say, that the F is constant, user can manually change F's Value.
Mode two:The establishment data of the storage volume in the phase of history time are taken, is arranged from big to small according to the capacity of storage volume Sequence, according to predetermined threshold value Q (Q is percentage, for example, Q=50% or before 80%) choosing Q storage volume space, and will wherein most Small stores value of the Volume Space as F.The phase of history time can be nearest one hour, one day etc., and the present invention is implemented Example is limited not to this.Can also be according to the phase of history time real-time update F values in the embodiment of the present invention.
Mode three:F is determined according to moving weighted average method, i.e., the corresponding F values of request is placed according to history, it is determined that currently F values.For example, F values, F can be determined according to below equationi=α * Fi-1+(1-α)Fi, wherein, Fi-1It is the i-th -1 time placement request Corresponding fragment-threshold, Fi, it is that the i-th placement asks corresponding fragment-threshold, α to represent weighting weight, α values can be according to business Situation carries out appropriate value, for example, 20% or 50% etc., the embodiment of the present invention is not limited to this.
Specifically, Y can be in the following manner determined in the embodiment of the present invention.
Mode 1:Rule of thumb, the value of Y, (for example, Y=100M) are directly set.
Scheme 2:Space percentage P (such as P=1%) according to storage volume, it is assumed that total sky of the storage of storage pool Between be S, then Y=S*P.
In simple terms, as shown in table 1, when the remaining space of storage pool is 0 zero, the surface storage pool is finished And without fragment.
Storage pool remaining space more than 0 and during less than or equal to Y, shown the space of the storage pool It is finished, or is finished substantially, the embodiment of the present invention can consider that the storage pool does not have fragment, or the storage pool is deposited Can tolerate in the fragment of false fragment, the i.e. storage pool.
Storage pool remaining space more than Y and during less than or equal to F, show the remaining space of the storage pool It is larger, but the remaining space is not enough to one storage volume of placement, therefore, in this case, the remaining space cannot be utilized, it is believed that There is true fragment in the storage virtual pool, and fragment is larger.
When the remaining space of storage pool is more than F, show that the remaining space of the storage pool is big, and the residue is empty Between can place at least one storage volume, therefore, in this case, it is believed that the storage virtual pool does not have fragment.
Table 1, fragment type
Fragment type Remaining space Explanation
Frag-0 S=0 It is finished and without fragment
Frag-1 0<s≤Y False fragment, fragment can be with " tolerance "
Frag-2 Y<s≤F True fragment, fragment is larger
Frag-3 s>F There is no fragment
Anti-crushing effect of every kind of placement schemes can will be entered according to the fragment type in table 1 in the embodiment of the present invention Row quantifies, and specific quantized result is as shown in table 2.Specifically, every kind of number of tiles for every kind of placement schemes will being produced and Specific space is counted.If shown in table 2, illustrating the statistics of placement schemes 1.
Anti-crushing quantization of the placement schemes of table 2
The last embodiment of the present invention can carry out resource pool selection based on anti-crushing rule, i.e., tied from existing greedy solution The i.e. final greediness solving result of the anti-crushing optimal scheme of effect is chosen in fruit.
Specifically, the embodiment of the present invention can successively select Frag- according to anti-crushing quantitative information of every kind of placement schemes 2 type fragment spaces are minimum/and resource pool number is minimum, Frag-1 types fragment minimum/resource pool number is minimum, Frag-0 resources The most placement schemes of pond number greediness solving result the most final.
680, terminate.
Specifically, greedy algorithm is solved and terminated.
Describe to carry out the accurate heuristic solving strategy process for solving in Fig. 4 above in association with Fig. 6.In heuristic solving strategy failure In the case of, as shown in figure 4, data schema solution can also be carried out in the embodiment of the present invention.
Specifically, Mathematical Planning solves the stage, problem is converted into linear programming problem and is solved, and detailed process is as schemed Shown in 6.Riming time of algorithm threshold value t will be set first2, the type selecting of linear programming algorithm can choose according to real needs, example Such as, (branch-and-cut) algorithm is cut using branch.
It should be understood that because linear programming is also a kind of " traversal " of " heuristic ", and solution limited time, therefore, The order of storage volume will be adjusted before solving every time, the probability of failure is solved to reduce.The stage is solved in Mathematical Planning, is not taken Feasible solution is obtained, then will enter the follow-up fuzzy solution stage.
Accordingly, as another embodiment, in 320, greedy algorithm is being used, at least one storage volume is being asked one by one During the storage pool that solution storage volume is placed, there is storage volume at least one storage volume and do not solve virtually depositing for placement During reservoir, i.e., in the case of heuristic solving strategy failure,
The virtual memory manager obligates condition and the Preference Constraint condition according to this, using linear programming algorithm, Solve the storage pool of each storage volume placement at least one storage volume;
In 330, solved to after the storage pool placed at least one storage volume, the virtual memory manager root According to final programming evaluation result, each storage volume at least one storage volume is placed in corresponding storage pool, should Final programming evaluation result includes one group of placement schemes of at least one storage volume.
Specifically, as shown in fig. 7, Fig. 7 solves schematic flow sheet for the Mathematical Planning of one embodiment of the invention.Such as Fig. 7 Shown method includes:
710, linear programming for solution.
For example, the virtual memory manager obligates condition and the Preference Constraint condition according to this, using linear programming Algorithm, solves the storage pool of each storage volume placement at least one storage volume.
Specifically, the virtual memory manager determines at least one storage according to the maximum of the object function for solving The corresponding storage pool of each storage volume in volume, wherein, the object function represents that storage pool meets obtaining for Preference Constraint condition Point, the bound for objective function obligates condition for this,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage Roll up corresponding xthnThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet obtaining for Preference Constraint condition Point, M represents that this obligates the number of condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
Alternately, in the Mathematical Planning stage in the embodiment of the present invention, it is also possible to by anti-crushing constraint of storage pool Solved as a target, i.e., the solution after Mathematical Planning is solved will be with anti-crushing effect.
During i.e. the virtual memory manager determines at least one storage volume according to the minimum value of the object function for solving The corresponding storage pool of each storage volume, wherein, the object function represents the fragment scoring of storage pool, the pact of the object function Beam condition obligates condition and Preference Constraint condition for this.
For example, object function is:
F(x1)+F(x2)+…F(xn)…+F(xN)=Y
Constraints includes:
h(l1), h (l2) ..., h (lr) ... h (lR);
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, xnRepresent the n-th storage pool, 1≤n≤N;F(xn) represent xthnThe fragment score of individual storage pool;g (zm) represent m-th and obligate condition, 1≤m≤M, h (lr) represent r-th Preference Constraint condition, 1≤r≤R.
It should be understood that above-mentioned object function is schematical, those skilled in the art can be carried out respectively according to examples detailed above Deformation is planted, the embodiment of the present invention is not limited to this.
720, judge whether to find feasible solution.
Step 730 is performed in the case where feasible solution is found, in the case where feasible solution is not found, step 740 is performed.
730, update feasible solution.
740, judge run time whether less than the second time threshold.
If run time is less than the second time threshold t2, then after adjusting the order of storage volume, step is performed again 710。
The second time threshold t is less than at runtime2In the case of, the virtual memory manager repeats strong according to this Constraints processed and the Preference Constraint condition, using linear programming algorithm, solve each storage at least one storage volume The storage pool placed is rolled up, multigroup programming evaluation result, each group of solving result bag in multigroup programming evaluation result is obtained Include one group of placement schemes of at least one storage volume.
The second time threshold t is reached at runtime2Afterwards, in the case of no feasible solution, perform step 760, depositing In the case of feasible solution, step 750 is performed.
750, it is determined that final programming evaluation result.
Specifically, the virtual memory manager will meet one group of best solution of Preference constraint in multigroup solving result Result is defined as the final programming evaluation result, and according to final programming evaluation result, by least one storage volume each Storage volume is placed in corresponding storage pool.
760, terminate.
Specifically, linear programming for solution terminates.
The detailed process of the accurate solution shown in Fig. 4 is foregoing described, as shown in figure 4, in the accurate situation for solving failure Under, the embodiment of the present invention will perform fuzzy solution.
Alternatively, it is every at least one storage volume using linear programming algorithm, is not solved as another embodiment In the case of one storage pool of storage volume placement,
In 320, the virtual memory manager according to the 3rd constraints, using greedy algorithm, solve this at least one The storage pool that each storage volume is placed in storage volume, wherein, the 3rd constraints is obligated in condition including this Remaining constraints after removal partially restrained;
In 330, after all storage volume solve the storage pool placed, the virtual memory manager is according to most Fuzzy solving result, each storage volume at least one storage volume is placed in corresponding storage pool eventually.
Further, as another embodiment, the virtual memory manager obligates condition according to meet storage volume Storage pool the ascending order of number, at least one storage volume is ranked up;
The virtual memory manager, according to the sequence of at least one storage volume, will successively remove N according to step-length N is loosened Remaining constraints is pre-conditioned as the 3rd after first constraints obligated in condition of individual storage volume, and every After the N number of constraints obligated in condition of storage volume of secondary removal, according to the 3rd constraints, calculated using greediness Method, solves the storage pool of each storage volume placement at least one storage volume, until all storage volume are solved The storage pool of placement.
Further, as another embodiment, after all storage volume solve the storage pool placed, do not having In the case of reaching the 3rd time threshold,
The virtual memory manager is repeated according to the 3rd constraints, using greedy algorithm, is solved this and at least one is deposited The storage pool that each storage volume is placed in storage volume, obtains multigroup fuzzy solving result, in multigroup fuzzy solving result Each group of fuzzy solving result includes one group of placement schemes of at least one storage volume;
The virtual memory manager by multigroup fuzzy solving result constraints scoring one group of solving result of highest Be defined as the finally fuzzy solving result, and according to the final fuzzy solving result, by least one storage volume each deposit Storage volume is placed in corresponding storage pool.
For example, in the fuzzy solution stage, the 3rd time threshold t can be set3, algorithm, final choice constraint is run multiple times Condition score highest placement schemes.
Wherein, the algorithmic procedure for solving is obscured identical with heuristic solving strategy algorithm hereinbefore, difference is to obscure and solve In the 3rd constraint constraints be by obligating the condition after condition is loosened.I.e. selectively to the pact of part " inessential " Shu Jinhang " ignores ".Specifically, the 3rd constraints is the condition after constraint of the condition of obligating based on priority is loosened.
Specifically, constraint is loosened priority and can be specified by user, can also be automatically generated by system, loosens priority Can be about Shu Quanchong.
For example, being a kind of example for loosening priority of the embodiment of the present invention as shown in table 3.Wherein constraint weight is smaller, Corresponding constraint priority is higher, for example, the weight value of constraint weight 1 is 0.1, it is corresponding to loosen priority to loosen preferentially Level 1, the weight value for constraining weight 2 and 3 is 0.15, and corresponding to loosen excellent priority be 2, constrains the weight value of weight 4 It is 0.2, corresponding priority of loosening is 3, the weight value for constraining weight 5 is 0.4, and corresponding priority of loosening is 4.Wherein, Loosen institute's Constrained that priority 2 includes that constraint weight is 2 and 3, i.e., will be 2 and 3 pact to weight during constraint is loosened Beam can be loosened at random.
Priority is loosened in the constraint that the user of table 3 specifies
Loosen priority Constraint weight
1 1
2 2,3
3 4
4 5
Specifically, first, sorted according to the quantity of the candidate's storage pool that can be selected of storage volume, when algorithm runs, In sequence and loosen step-length (being designated as N), successively relaxed constraints, carry out fuzzy solution.Loosen sequence depositing in 1~N first What storage was rolled up loosens the constraint set that priority is 1, afterwards, according to the condition of obligating after loosening, i.e. the 3rd constraints, adopts Determine the corresponding storage pool of each storage volume at least one storage volume with greedy algorithm.
For example, N=3, then when loosening for the first time, loosen the 1st to the 3rd storage volume correspondence loosen priority be 1 it is strong Constraints processed.Afterwards, condition is obligated according to remaining to be solved using greedy algorithm.
After first time loosens, if without feasible solution, loosened successively, that is, loosen and be ordered as depositing for N+1~2N What storage was rolled up loosens the constraint set that priority is 1, by that analogy;If still unfeasible after the constraint of low priority has been loosened Solution, will successively loosen the constraint of higher priority.I.e. all of priority is 1 to obligate after condition loosens, and is not still had Feasible solution, then it is 2 to obligate condition to loosen priority.Directly returned if solving to " feasible solution ", if run time is small In t3, then dynamic adjusting step is continued to run with again, until run time is more than or equal to t3, then from each optimal result Optimal solution is taken again.
Example is loosened in the constraint of table 4
Table 4 is shown and loosens example, and including n storage volume obj, 4 are loosened priority, cons_setijRepresent i-th Individual storage volume loosens the constraint set of priority at j-th.By successively to loosening the row that priority is 1-4 in practical implementation Operated, i.e., since the row that priority is 1 are loosened, carry out loosening solution according to step-length N.
In fuzzy solution procedure, storage volume is to the code of points of storage pool:score_macobj(p)=∑ w_macobj,i, Wherein, score_macobjP () represents fuzzy solution scorings of the storage volume obj for virtualization pool p, w_macobj,jExpression is deposited Storage volume obj is for i-th weight of mandatory constraint.It is to be noted that said process is only to the strong of memory resource pool p satisfactions The weight of property constraint processed is added up, and the mandatory constraints loosened is not considered.To ensure the diversity and most of placement schemes Dominance, if certain storage volume has multiple optimal solutions (there is identical to assess fraction), therefrom randomly selects a conduct most Solve eventually.
Therefore, even if whole situations for obligating condition and Preference Constraint condition can not be being met in the embodiment of the present invention Under, it is also possible to carry out fuzzy solution, it is to avoid in the prior art without solution the occurrence of, lift Consumer's Experience.
In the embodiment of the present invention, it is tested based on two storage volume set pair algorithms.Wherein, storage volume collection 1 includes 2205 storage volume, the average solution time of all storage volume is 384ms, and the storage volume into the fuzzy solution stage is 20, Ratio is 0.9%, and the storage volume more than 1s is 24, and ratio is 1.1%, and the test case more than 1s is time-consuming as shown in Figure 8.Return The storage volume for returning failure is 0.
Storage volume collection 2 includes 5145 storage volume, and the average solution time of all storage volume is 455ms, is asked into fuzzy The storage volume in solution stage is 74, and ratio is 1.4%, and the storage volume solved more than 1s is 79, and ratio is 1.5%, more than 1s Test case it is time-consuming as shown in figure 9, the use-case for returning to failure is 0.
Therefore, in the embodiment of the present invention, can obligate condition and the Preference Constraint condition according to this first carries out essence Really solve, solve the storage pool of each storage volume placement, in the case of accurately solving without solution, exception can be carried out Reason, carries out fuzzy solution, can as far as possible provide the feasible solution for meeting user's request, it is to avoid the possibility without solution, can be lifted Consumer's Experience.
Alternately, as another embodiment, in the embodiment of the present invention in accurate solution, it is also possible to do not carry out heuristic Solve, but directly carry out Mathematical Planning and solve the stage, for example, as shown in figure 5, in the second time threshold t2Interior use linear gauge Draw and solve, solved if feasible solution is found and terminated, otherwise, i.e., without solution in the case of enter the fuzzy solution stage.Specifically, Fig. 5 The process that shown Mathematical Planning is solved can be found in the description in above-mentioned Fig. 7.The fuzzy detailed process for solving can be found in above To obscuring the description for solving.Here is omitted.
The method for describing the placement storage volume of the embodiment of the present invention in detail previously in conjunction with Fig. 1 to Fig. 9, with reference to Figure 10 With the virtual memory manager that Figure 11 describes the embodiment of the present invention in detail.
Figure 10 shows the schematic block diagram of the virtual memory manager of one embodiment of the invention.As shown in Figure 10 is virtual Storage manager 1000 includes:
Acquiring unit 1010, for obtain at least one storage volume placement request, the placement request include this at least one Individual storage volume obligates condition and Preference Constraint condition, and this obligates condition is for determining at least one storage volume Storage pool necessary condition, the Preference Constraint condition is the storage pool for determining at least one storage volume Complementary condition;
Determining unit 1020, for obligating condition and the Preference Constraint condition according to this, determines that this at least one is deposited The corresponding storage pool of each storage volume in storage volume;
Placement unit 1030, for each storage volume at least one storage volume to be placed on into corresponding storage pool In.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, it is determined that this is at least Each storage volume corresponding storage pool aspect in one storage volume, the determining unit specifically for:
Condition and the Preference Constraint condition are obligated according to this, using greedy algorithm, at least one storage volume is solved In each storage volume place storage pool;
Wherein, the aspect in each storage volume at least one storage volume is placed on into corresponding storage pool, should Placement unit specifically for:
After at least one storage volume solves the storage pool placed, according to final greedy solving result, will Each storage volume is placed in corresponding storage pool at least one storage volume.
Alternatively, as another embodiment, greedy algorithm is being used, all storage volume solve the virtual memory placed Chi Hou, in the case of without very first time threshold value is reached,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the determining unit is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to this, using greedy algorithm, solve this and at least one deposit The storage pool that each storage volume is placed in storage volume, obtains multigroup greedy solving result, in multigroup greedy solving result Each group of greedy solving result includes one group of placement schemes of at least one storage volume;
According to final greediness solving result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the placement unit specifically for:
Anti-crushing one group of best solving result of effect in multigroup greedy solving result is defined as into the final greediness to ask Solution result, and according to the final greedy solving result, each storage volume at least one storage volume is placed on corresponding void In plan storage pool.
Alternatively, as another embodiment, anti-crushing effect is best in multigroup greedy solving result by this one group is asked Solution result is defined as final greedy solving result aspect, the placement unit specifically for:
Fragment-threshold F and storage according to storage pool are finished threshold value Y, by storage pool in multigroup greedy solving result Remaining space be located at one group of minimum solving result of storage pool number between F and Y and be defined as this and final greedy solve As a result.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, is being calculated using greediness Method, solves the storage pool aspect that each storage volume is placed at least one storage volume, the determining unit specifically for:
Condition is obligated according to this, the number of the initial candidate storage pool of each storage volume is determined, wherein, first The initial candidate storage pool of storage volume meet place first storage volume obligate condition;
The ascending order of the number of the candidate's storage pool according at least one storage volume, one by one from this at least one Current candidate storage pool is determined in storage volume in the initial candidate storage pool of each storage volume, first storage volume Current candidate storage pool is somebody's turn to do assuming that meeting after all storage volume before first storage volume are placed on storage pool First storage volume obligates condition;
According to the Preference Constraint condition, from the current candidate storage pool of first storage volume determine place this first The storage pool of storage volume.
Alternatively, as another embodiment, assuming that all storage volume before first storage volume are placed on and virtually deposit After reservoir, the initial candidate storage pool of first storage volume is unsatisfactory for the feelings for obligating condition of first storage volume Under condition,
Condition and the Preference Constraint condition are being obligated according to this, using greedy algorithm, at least one storage is being solved The storage pool aspect that each storage volume is placed in volume, the determining unit is additionally operable to:
Release take first storage volume initial candidate virtualization pool before storage volume, and by this before deposit Storage volume is placed in other candidate virtual resource pools of the storage volume,
Using the initial candidate virtualization pool after releasing as each storage volume current candidate storage pool.
Alternatively, it is virtual from the first storage volume current candidate according to the Preference Constraint condition as another embodiment In storage pool determine place first storage volume storage pool aspect, the determining unit specifically for:
According to the Preference Constraint condition, to each virtual memory in the current candidate storage pool of first storage volume Pond is scored, and the highest storage pool that scored in the current candidate virtual storage pool is defined as to place each storage The storage pool of volume.
Alternatively, as another embodiment, the placement unit is according to below equation to the current candidate of first storage volume Each storage pool is scored in storage pool:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents the scorings of the first storage volume obj to storage pool p, w_opcobj,iTable Show the first storage volume obj to i-th weight of constraint in the Preference Constraint condition.
Alternatively, as another embodiment, greedy algorithm is being used, storage volume is being solved one by one at least one storage volume During the storage pool placed, there is storage volume at least one storage volume and do not solve the situation for placing storage pool Under,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the determining unit is additionally operable to:
Condition and the Preference Constraint condition are obligated according to this, using linear programming algorithm, this is solved and at least one is deposited The storage pool that each storage volume is placed in storage volume;
Aspect, the placement list in each storage volume at least one storage volume is placed on into corresponding storage pool Unit specifically for:
After at least one storage volume solves the storage pool placed, according to final programming evaluation result, will Each storage volume is placed in corresponding storage pool at least one storage volume.
Alternately, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, it is determined that this is extremely The corresponding storage pool aspect of each storage volume in a few storage volume, the determining unit specifically for:
Condition and the Preference Constraint condition are obligated according to this, using linear programming algorithm, this is solved and at least one is deposited The storage pool that each storage volume is placed in storage volume;
Aspect, the placement list in each storage volume at least one storage volume is placed on into corresponding storage pool Unit specifically for:
Solved to after the storage pool placed at least one storage volume, according to final programming evaluation result, by this Each storage volume is placed in corresponding storage pool at least one storage volume.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, using linear gauge The method of calculating, solves the storage pool aspect of each storage volume placement at least one storage volume, and the determining unit is specific For:
Maximum according to object function is solved determines at least one storage volume that each storage volume is corresponding and virtually deposits Reservoir, wherein, the object function represents that storage pool meets the score of Preference Constraint condition, and the bound for objective function is should Obligate condition,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage Roll up corresponding xthnThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet obtaining for Preference Constraint condition Point, M represents that this obligates the number of condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
Alternatively, as another embodiment, linear programming algorithm is being used, all storage volume solve the virtual of placement After storage pool, in the case of without the second time threshold is reached,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool, aspect, determining unit is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to this, using linear programming algorithm, solve this at least one The storage pool that each storage volume is placed in individual storage volume, obtains multigroup programming evaluation result, multigroup programming evaluation knot Each group of solving result includes one group of placement schemes of at least one storage volume in fruit;
According to final programming evaluation result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the placement unit specifically for:
Preference will be met in multigroup solving result constrain best one group of solving result and be defined as the final planning and ask Solution result, and according to final programming evaluation result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool.
Alternatively, it is every at least one storage volume using linear programming algorithm, is not solved as another embodiment In the case of one storage pool of storage volume placement,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the determining unit is additionally operable to:
According to the 3rd constraints, using greedy algorithm, each storage volume is placed in solving at least one storage volume Storage pool, wherein, the 3rd constraints obligates the remaining constraint after partially restrained is removed in condition including this Condition;
Aspect, the placement list in each storage volume at least one storage volume is placed on into corresponding storage pool Unit specifically for:
After all storage volume solve the storage pool placed, solving result is obscured according to final, by this at least Each storage volume is placed in corresponding storage pool in one storage volume, this finally obscure solving result include this at least one One group of placement schemes of individual storage volume.
Alternatively, as another embodiment, according to the 3rd constraints, using greedy algorithm, solve this at least one In individual storage volume each storage volume place storage pool aspect, the determining unit specifically for:
According to the order that the number of the storage pool for obligating condition for meeting storage volume is ascending, to this at least One storage volume is ranked up;
According to loosening step-length N, according to the sequence of at least one storage volume, by the pressure for removing N number of storage volume successively about Remaining constraints is pre-conditioned as the 3rd after the first constraints in beam condition, and is removing N number of storage every time Volume the constraints obligated in condition after, according to the 3rd constraints, using greedy algorithm, solve this at least one The storage pool that each storage volume is placed in storage volume, until all storage volume solve the storage pool placed.
Alternatively, as another embodiment, after all storage volume solve the storage pool placed, do not arrive In the case of the 3rd time threshold,
Condition and the Preference Constraint condition are obligated according to this in the virtual memory manager, determines that this at least one is deposited The corresponding storage pool aspect of each storage volume in storage volume, the determining unit is additionally operable to:
Repeat according to the 3rd constraints, using greedy algorithm, solve each storage at least one storage volume The storage pool placed is rolled up, multigroup fuzzy solving result is obtained, each group of fuzzy solution knot in multigroup fuzzy solving result Fruit includes one group of placement schemes of at least one storage volume;
According to finally fuzzy solving result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the placement unit specifically for:
Constraints scoring one group of solving result of highest in multigroup fuzzy solving result is defined as this final fuzzy Solving result, and solving result is finally obscured according to this, each storage volume at least one storage volume is placed on corresponding In storage pool.
Alternatively, as another embodiment, this obligate condition and the Preference Constraint condition include respectively it is following in At least one constraint:Storage volume storage media types constraint, storage volume storage size constraint, storage volume performance about Compatibility constraint between beam, storage volume is constrained with non-compatibility.
It should be understood that the virtual memory manager 1000 shown in Figure 10 can be realized being related to placement to deposit in Fig. 3 embodiments of the method Store up each process of volume method.The operation and/or function of the modules in storage manager 1000, respectively in order to realize Fig. 3 In embodiment of the method in corresponding flow.The description in above method embodiment is for details, reference can be made to, to avoid repeating, is fitted herein When omitting in detail description is described in detail.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
Figure 11 shows the schematic block diagram of virtual memory manager 1100 according to embodiments of the present invention.Specifically, such as Shown in Figure 11, the virtual memory manager 1100 includes:Processor 1110 and memory 1120, processor 1110 and memory Can be communicated by internal connecting path between 1120, the memory 1120 can be used for store instruction, the processor 1110 instructions for being used to perform the memory 1130 storage, to perform the method for placing storage volume.
Specifically, processor 1110 is used to obtain the placement request of at least one storage volume, and placement request includes this extremely A few storage volume obligates condition and Preference Constraint condition, and it is for determining that this at least one is deposited that this obligates condition The necessary condition of the storage pool of volume is stored up, the Preference Constraint condition is the virtual memory for determining at least one storage volume The complementary condition in pond;Condition and the Preference Constraint condition are obligated according to this, each at least one storage volume is determined The corresponding storage pool of storage volume;Each storage volume at least one storage volume is placed on corresponding storage pool In.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
It should be understood that in embodiments of the present invention, the processor 1110 can be CPU (Central Processing Unit, referred to as " CPU "), the processor 1110 can also be other general processors, Digital Signal Processing It is device (DSP), application specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) or other PLDs, discrete Door or transistor logic, discrete hardware components etc..General processor can be that microprocessor or the processor also may be used Being any conventional processor etc..
The memory 1120 can include read-only storage and random access memory, and provide instruction to processor 1110 And data.The a part of of memory 1120 can also include nonvolatile RAM.For example, memory 1120 may be used also With the information of storage device type.
In implementation process, each step of the above method can be by the integrated logic circuit of the hardware in processor 1110 Or the instruction of software form is completed.The step of method with reference to disclosed in the embodiment of the present invention, can be embodied directly at hardware Reason device performs completion, or performs completion with the hardware in processor and software module combination.Software module may be located at random Memory, flash memory, read-only storage, the ability such as programmable read only memory or electrically erasable programmable memory, register In the ripe storage medium in domain.The storage medium is located at memory 1120, and processor 1110 reads the information in memory 1120, The step of above method being completed with reference to its hardware.To avoid repeating, it is not detailed herein.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, it is determined that this is at least Each storage volume corresponding storage pool aspect in one storage volume, the processor 1110 specifically for:
Condition and the Preference Constraint condition are obligated according to this, using greedy algorithm, at least one storage volume is solved In each storage volume place storage pool;
Aspect, the processor in each storage volume at least one storage volume is placed on into corresponding storage pool 1110 specifically for:
After at least one storage volume solves the storage pool placed, according to final greedy solving result, will Each storage volume is placed in corresponding storage pool at least one storage volume, and the final greedy solving result includes should One group of placement schemes of at least one storage volume.
Alternatively, as another embodiment, meal is being calculated using greedy, all storage volume solve the virtual memory placed Chi Hou, in the case of without very first time threshold value is reached,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the processor 1110 is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to this, using greedy algorithm, solve this and at least one deposit The storage pool that each storage volume is placed in storage volume, obtains multigroup greedy solving result, in multigroup greedy solving result Each group of greedy solving result includes one group of placement schemes of at least one storage volume;
According to final greediness solving result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the processor 1110 specifically for:
Anti-crushing one group of best solving result of effect in multigroup greedy solving result is defined as into the final greediness to ask Solution result, and according to the final greedy solving result, each storage volume at least one storage volume is placed on corresponding void In plan storage pool.
Alternatively, as another embodiment, anti-crushing effect is best in multigroup greedy solving result by this one group is asked Solution result is defined as final greedy solving result aspect, the processor 1110 specifically for:
Fragment-threshold F and storage according to storage pool are finished threshold value Y, by storage pool in multigroup greedy solving result Remaining space be located at one group of minimum solving result of storage pool number between F and Y and be defined as this and final greedy solve As a result.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, is being calculated using greediness Method, solves the storage pool aspect of each storage volume placement at least one storage volume, and the processor 1110 is specifically used In:
Condition is obligated according to this, the number of the initial candidate storage pool of each storage volume, wherein, the first storage The initial candidate storage pool of volume meet place first storage volume obligate condition;
The ascending order of the number of the candidate's storage pool according at least one storage volume, one by one from this at least one Current candidate storage pool is determined in storage volume in the initial candidate storage pool of each storage volume, first storage volume Current candidate storage pool is somebody's turn to do assuming that meeting after all storage volume before first storage volume are placed on storage pool First storage volume obligates condition;
According to the Preference Constraint condition, from the current candidate storage pool of first storage volume determine place this first The storage pool of storage volume.
Alternatively, as another embodiment, assuming that all storage volume before first storage volume are placed on and virtually deposit After reservoir, the initial candidate storage pool of first storage volume is unsatisfactory for the feelings for obligating condition of first storage volume Under condition,
Condition and the Preference Constraint condition are being obligated according to this, using greedy algorithm, at least one storage is being solved The storage pool aspect that each storage volume is placed in volume, the processor 1110 is additionally operable to:
Release take first storage volume initial candidate virtualization pool before storage volume, and by this before deposit Storage volume is placed in other candidate virtual resource pools of the storage volume,
Using the initial candidate virtualization pool after releasing as each storage volume current candidate storage pool.
Alternatively, as another embodiment, according to the Preference Constraint condition, the current candidate from first storage volume is empty Intend storage pool in determine place first storage volume storage pool aspect, the processor 1110 specifically for:
According to the Preference Constraint condition, to each virtual memory in the current candidate storage pool of first storage volume Pond is scored, and the highest storage pool that scored in the current candidate virtual storage pool is defined as to place each storage The storage pool of volume.
Alternatively, as another embodiment, the processor 1110 is according to below equation to the current time of first storage volume Each storage pool is scored in selecting storage pool:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents the scorings of the first storage volume obj to storage pool p, w_opcobj,iTable Show the first storage volume obj to i-th weight of constraint in the Preference Constraint condition.
Alternatively, as another embodiment, greedy algorithm is being used, storage volume is being solved one by one at least one storage volume During the storage pool placed, there is storage volume at least one storage volume and do not solve the situation for placing storage pool Under,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the processor 1110 is additionally operable to:
Condition and the Preference Constraint condition are obligated according to this, using linear programming algorithm, this is solved and at least one is deposited The storage pool that each storage volume is placed in storage volume;
Aspect, the processor in each storage volume at least one storage volume is placed on into corresponding storage pool 1110 specifically for:
Asked at least one storage volume and solved to after the storage pool placed, according to final programming evaluation result, will Each storage volume is placed in corresponding storage pool at least one storage volume, and the final programming evaluation result includes should One group of placement schemes of at least one storage volume.
Alternately, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, it is determined that this is extremely The corresponding storage pool aspect of each storage volume in a few storage volume, the processor 1110 specifically for:
Condition and the Preference Constraint condition are obligated according to this, using linear programming algorithm, this is solved and at least one is deposited The storage pool that each storage volume is placed in storage volume;
Aspect, the processor in each storage volume at least one storage volume is placed on into corresponding storage pool 1110 specifically for:
Solved to after the storage pool placed at least one storage volume, according to final programming evaluation result, by this Each storage volume is placed in corresponding storage pool at least one storage volume.
Alternatively, as another embodiment, condition and the Preference Constraint condition are being obligated according to this, using linear gauge The method of calculating, solves the storage pool aspect of each storage volume placement at least one storage volume, and the processor 1110 has Body is used for:
Maximum according to object function is solved determines at least one storage volume that each storage volume is corresponding and virtually deposits Reservoir, wherein, the object function represents that storage pool meets the score of Preference Constraint condition, and the bound for objective function is should Obligate condition,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage Roll up corresponding xthnThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet obtaining for Preference Constraint condition Point, M represents that this obligates the number of condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
Alternatively, as another embodiment, linear programming algorithm is being used, all storage volume solve the virtual of placement After storage pool, in the case of without the second time threshold is reached,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the processor 1110 is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to this, using linear programming algorithm, solve this at least one The storage pool that each storage volume is placed in individual storage volume, obtains multigroup programming evaluation result, multigroup programming evaluation knot Each group of solving result includes one group of placement schemes of at least one storage volume in fruit;
According to final programming evaluation result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the processor 1110 specifically for:
Preference will be met in multigroup solving result constrain best one group of solving result and be defined as the final planning and ask Solution result, and according to final programming evaluation result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool.
Alternatively, it is every at least one storage volume using linear programming algorithm, is not solved as another embodiment In the case of one storage pool of storage volume placement,
Condition and the Preference Constraint condition are being obligated according to this, each storage volume at least one storage volume is being determined Corresponding storage pool aspect, the processor 1110 is additionally operable to:
According to the 3rd constraints, using greedy algorithm, each storage volume is placed in solving at least one storage volume Storage pool, wherein, the 3rd constraints obligates the remaining constraint after partially restrained is removed in condition including this Condition;
Aspect, the processor in each storage volume at least one storage volume is placed on into corresponding storage pool 1110 specifically for:
After all storage volume solve the storage pool placed, solving result is obscured according to final, by this at least Each storage volume is placed in corresponding storage pool in one storage volume, this finally obscure solving result include this at least one One group of placement schemes of individual storage volume.
Alternatively, as another embodiment, according to the 3rd constraints, using greedy algorithm, solve this at least one In individual storage volume each storage volume place storage pool aspect, the processor 1110 specifically for:
According to the order that the number of the storage pool for obligating condition for meeting storage volume is ascending, to this at least One storage volume is ranked up;
According to loosening step-length N, according to the sequence of at least one storage volume, by the pressure for removing N number of storage volume successively about Remaining constraints is pre-conditioned as the 3rd after the first constraints in beam condition, and is removing N number of storage every time Volume the constraints obligated in condition after, according to the 3rd constraints, using greedy algorithm, solve this at least one The storage pool that each storage volume is placed in storage volume, until all storage volume solve the storage pool placed.
Alternatively, as another embodiment, after all storage volume solve the storage pool placed, do not arrive In the case of the 3rd time threshold,
Condition and the Preference Constraint condition are obligated according to this in the virtual memory manager, determines that this at least one is deposited The corresponding storage pool aspect of each storage volume in storage volume, the processor 1110 is additionally operable to:
Repeat according to the 3rd constraints, using greedy algorithm, solve each storage at least one storage volume The storage pool placed is rolled up, multigroup fuzzy solving result is obtained, each group of fuzzy solution knot in multigroup fuzzy solving result Fruit includes one group of placement schemes of at least one storage volume;
According to finally fuzzy solving result, each storage volume at least one storage volume is placed on corresponding virtual In storage pool aspect, the processor 1110 specifically for:
Constraints scoring one group of solving result of highest in multigroup fuzzy solving result is defined as this final fuzzy Solving result, and solving result is finally obscured according to this, each storage volume at least one storage volume is placed on corresponding In storage pool.
Alternatively, as another embodiment, this obligate condition and the Preference Constraint condition include respectively it is following in At least one constraint:Storage volume storage media types constraint, storage volume storage size constraint, storage volume performance about Compatibility constraint between beam, storage volume is constrained with non-compatibility.
It should be understood that the virtual memory manager 1100 shown in Figure 11 can be realized being related to placement to deposit in Fig. 3 embodiments of the method Store up each process of volume method.The operation and/or function of the modules in storage manager 1100, respectively in order to realize Fig. 3 In embodiment of the method in corresponding flow.The description in above method embodiment is for details, reference can be made to, to avoid repeating, is fitted herein When omitting in detail description is described in detail.
Therefore, virtual memory manager obligates condition and Preference Constraint bar according to storage volume in the embodiment of the present invention Each storage volume is placed in corresponding storage pool in part just at least one storage volume, disclosure satisfy that different storage volume Performance requirement, realization reasonably multiple storage volume are placed on storage pool.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text means relevant with embodiment Special characteristic, structure or characteristic are included at least one embodiment of the present invention.Therefore, occur everywhere in entire disclosure " in one embodiment " or " in one embodiment " not necessarily refers to identical embodiment.Additionally, these specific feature, knots Structure or characteristic can be combined in one or more embodiments in any suitable manner.It should be understood that in various implementations of the invention In example, the size of the sequence number of above-mentioned each process is not meant to the priority of execution sequence, and the execution sequence of each process should be with its work( Can determine with internal logic, the implementation process without tackling the embodiment of the present invention constitutes any restriction.
In addition, the terms " system " and " network " are often used interchangeably herein.The terms " and/ Or ", only a kind of incidence relation for describing affiliated partner, represents there may be three kinds of relations, for example, A and/or B, can be with table Show:Individualism A, while there is A and B, individualism B these three situations.In addition, character "/" herein, before and after typicallying represent Affiliated partner is a kind of relation of "or".
It should be understood that in embodiments of the present invention, " B corresponding with A " represents that B is associated with A, and B can be determined according to A.But It should also be understood that determining that B is not meant to determine B only according to A according to A, B can also be determined according to A and/or other information.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Unit and algorithm steps, can be realized, with electronic hardware, computer software or the combination of the two in order to clearly demonstrate hardware With the interchangeability of software, the composition and step of each example are generally described according to function in the above description.This A little functions are performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specially Industry technical staff can realize described function to each specific application using distinct methods, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that, for convenience of description and succinctly, foregoing description is The specific work process of system, device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the division of unit, It is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.In addition, shown or discussed Coupling each other or direct-coupling or communication connection can be by the INDIRECT COUPLING or logical of some interfaces, device or unit Letter connection, or electricity, machinery or other forms connections.
The unit illustrated as separating component can be or may not be physically separate, be shown as unit Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks On unit.Some or all of unit therein can be according to the actual needs selected to realize the mesh of embodiment of the present invention scheme 's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, or two or more units are integrated in a unit.It is above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can be with Realized with hardware, or firmware is realized, or combinations thereof mode is realized.When implemented in software, can be by above-mentioned functions Storage is transmitted in computer-readable medium or as one or more instructions on computer-readable medium or code.Meter Calculation machine computer-readable recording medium includes computer-readable storage medium and communication media, and wherein communication media includes being easy to from a place to another Any medium of individual place transmission computer program.Storage medium can be any usable medium that computer can be accessed.With As a example by this but it is not limited to:Computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disc storages, disk Storage medium or other magnetic storage apparatus or can be used in carrying or store the expectation with instruction or data structure form Program code and can be by any other medium of computer access.In addition.Any connection can be appropriate as computer Computer-readable recording medium.If for example, software is to use coaxial cable, optical fiber cable, twisted-pair feeder, Digital Subscriber Line (DSL) or such as The wireless technology of infrared ray, radio and microwave etc is transmitted from website, server or other remote sources, then coaxial electrical The wireless technology of cable, optical fiber cable, twisted-pair feeder, DSL or such as infrared ray, wireless and microwave etc is included in affiliated medium In fixing.As used in the present invention, disk (Disk) and dish (disc) include that compression laser disc (CD), laser disc, laser disc, numeral are logical With laser disc (DVD), floppy disk and Blu-ray Disc, the replicate data of the usual magnetic of which disk, and dish is then with laser come optical duplication Data.Above combination above should also be as being included within the protection domain of computer-readable medium.
In a word, the preferred embodiment of technical solution of the present invention is the foregoing is only, is not intended to limit of the invention Protection domain.All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., should be included in Within protection scope of the present invention.

Claims (32)

1. it is a kind of place storage volume method, it is characterised in that be applied in memory virtualization system, the Storage Virtualization system System includes multiple storage pools, and methods described includes:
Virtual memory manager obtains the placement request of at least one storage volume, and described placement asks to include that described at least one deposits What storage was rolled up obligates condition and Preference Constraint condition, and the condition of obligating is for determining at least one storage volume Storage pool necessary condition, the Preference Constraint condition is the virtual memory for determining at least one storage volume The complementary condition in pond;
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume in storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In.
2. method according to claim 1, it is characterised in that
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume in storage volume, including:
The virtual memory manager obligates condition and the Preference Constraint condition according to, using greedy algorithm, asks Solve the storage pool of each storage volume placement at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After at least one storage volume solves the storage pool placed, the virtual memory manager is according to final Greedy solving result, each storage volume at least one storage volume is placed in corresponding storage pool.
3. method according to claim 2, it is characterised in that using greedy algorithm, all storage volume are solved puts After the storage pool put, in the case of without very first time threshold value is reached,
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume, also includes in storage volume:
The virtual memory manager repeats to obligate condition and the Preference Constraint condition according to, is calculated using greediness Method, solves the storage pool of each storage volume placement at least one storage volume, obtains multigroup greedy solving result, Each group of greedy solving result includes one group of placement schemes of at least one storage volume in multigroup greedy solving result;
The virtual memory manager puts each storage volume at least one storage volume according to final greediness solving result Put in corresponding storage pool, including:
The virtual memory manager is true by anti-crushing one group of best solving result of effect in multigroup greedy solving result It is set to the final greedy solving result, and according to the final greedy solving result, will be every at least one storage volume Individual storage volume is placed in corresponding storage pool.
4. method according to claim 3, it is characterised in that
The virtual memory manager is true by anti-crushing one group of best solving result of effect in multigroup greedy solving result It is set to the final greedy solving result, including:
The virtual memory manager is finished threshold value Y according to the fragment-threshold F of storage pool and storage, by multigroup greedy solution The remaining space of storage pool is located at one group of solving result determination of the storage pool number minimum between F and Y in result It is the final greedy solving result.
5. the method according to any one of claim 2 to 4, it is characterised in that
The virtual memory manager obligates condition and the Preference Constraint condition according to, using greedy algorithm, asks The storage pool of each storage volume placement at least one storage volume is solved, including:
The virtual memory manager obligates condition according to, determines the initial candidate virtual memory of each storage volume Pond, wherein, the initial candidate storage pool of the first storage volume meet place first storage volume obligate condition;
The ascending order of the number of the candidate's storage pool according at least one storage volume, one by one from described at least one Current candidate storage pool, first storage volume are determined in storage volume in the initial candidate storage pool of each storage volume Current candidate storage pool assuming that full after all storage volume before first storage volume are placed on storage pool Foot first storage volume obligates condition;
According to the Preference Constraint condition, determine to place described the from the current candidate storage pool of first storage volume The storage pool of one storage volume.
6. method according to claim 5, it is characterised in that
After assuming that all storage volume before first storage volume are placed on storage pool, at the beginning of first storage volume Beginning candidate virtual storage pool be unsatisfactory for first storage volume obligate condition in the case of,
The virtual memory manager obligates condition and the Preference Constraint condition according to, using greedy algorithm, asks The storage pool of each storage volume placement at least one storage volume is solved, is also included:
The virtual memory manager releases the storage before taking the initial candidate virtualization pool of first storage volume Volume, and will be described before storage volume be placed in other candidate virtual resource pools of the storage volume,
Using the initial candidate virtualization pool after releasing as each storage volume current candidate storage pool.
7. the method according to claim 5 or 6, it is characterised in that
It is described according to the Preference Constraint condition, from the current candidate storage pool of first storage volume determine place institute The storage pool of the first storage volume is stated, including:
According to the Preference Constraint condition, to each virtual memory in the current candidate storage pool of first storage volume Pond is scored, and the highest storage pool that scored in the current candidate storage pool is defined as placing described first The storage pool of storage volume.
8. method according to claim 7, it is characterised in that
The virtual memory manager is each in the current candidate storage pool according to below equation to first storage volume Individual storage pool is scored:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents scorings of the first storage volume obj to storage pool p, w_opcobj,iRepresent The first storage volume obj is to i-th weight of constraint in the Preference Constraint condition.
9. the method according to any one of claim 2 to 8, it is characterised in that
Greedy algorithm is being used, when solving the storage pool that storage volume is placed one by one at least one storage volume, institute State and exist at least one storage volume in the case that storage volume do not solve the storage pool placed,
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume, also includes in storage volume:
The virtual memory manager obligates condition and the Preference Constraint condition according to, using linear plan algorithm Method, solves the storage pool of each storage volume placement at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After at least one storage volume solves the storage pool placed, the virtual memory manager is according to final Programming evaluation result, each storage volume at least one storage volume is placed in corresponding storage pool.
10. method according to claim 1, it is characterised in that
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume in storage volume, including:
The virtual memory manager obligates condition and the Preference Constraint condition according to, using linear plan algorithm Method, solves the storage pool of each storage volume placement at least one storage volume;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
Solved to after the storage pool placed at least one storage volume, the virtual memory manager is according to final rule Solving result is drawn, each storage volume at least one storage volume is placed in corresponding storage pool.
11. method according to claim 9 or 10, it is characterised in that
The virtual memory manager obligates condition and the Preference Constraint condition according to, using linear plan algorithm Method, solves the storage pool of each storage volume placement at least one storage volume, including:
Each is deposited during the virtual memory manager determines at least one storage volume according to the maximum for solving object function The corresponding storage pool of storage volume, wherein, the object function represents that storage pool meets the score of Preference Constraint condition, the mesh The constraints of scalar functions obligates condition for described,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage volume pair The xth answerednThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet the score of Preference Constraint condition, M tables Show the number for obligating condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
12. method according to any one of claim 9 to 11, it is characterised in that
After using linear programming algorithm, all storage volume to solve the storage pool placed, when without reaching second Between in the case of threshold value,
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume, also includes in storage volume:
The virtual memory manager repeats to obligate condition and the Preference Constraint condition according to, using linear programming Algorithm, solves the storage pool of each storage volume placement at least one storage volume, obtains multigroup programming evaluation knot Really, each group of solving result includes one group of placement schemes of at least one storage volume in multigroup programming evaluation result;
The virtual memory manager puts each storage volume at least one storage volume according to final programming evaluation result Put in corresponding storage pool, including:
The virtual memory manager will meet one group of best solving result of Preference constraint in multigroup solving result true Be set to the final programming evaluation result, and according to final programming evaluation result, by least one storage volume each deposit Storage volume is placed in corresponding storage pool.
13. method according to any one of claim 9 to 12, it is characterised in that
Linear programming algorithm is being used, the virtual memory of each storage volume placement at least one storage volume is not being solved In the case of pond,
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume, also includes in storage volume:
The virtual memory manager according to the 3rd constraints, using greedy algorithm, in solving at least one storage volume The storage pool that each storage volume is placed, wherein, the 3rd constraints is removed during condition is obligated including described in Remaining constraints after partially restrained;
Each storage volume at least one storage volume is placed on corresponding storage pool by the virtual memory manager In, including:
After all storage volume solve the storage pool placed, the virtual memory manager is according to final fuzzy solution As a result, each storage volume at least one storage volume is placed in corresponding storage pool.
14. methods according to claim 13, it is characterised in that
The virtual memory manager, using greedy algorithm, solves at least one storage according to the 3rd constraints The storage pool that each storage volume is placed in volume, including:
The virtual memory manager is ascending according to the number of the storage pool for obligating condition for meeting storage volume Order, at least one storage volume is ranked up;
The virtual memory manager, according to the sequence of at least one storage volume, will successively remove N according to step-length N is loosened Remaining constraints is pre-conditioned as the 3rd after first constraints obligated in condition of individual storage volume, and every After the N number of constraints obligated in condition of storage volume of secondary removal, according to the 3rd constraints, calculated using greediness Method, solves the storage pool of each storage volume placement at least one storage volume, until all storage volume are equal one by one Solve the storage pool placed.
15. methods according to claim 14, it is characterised in that
After all storage volume solve the storage pool placed, in the case of without the 3rd time threshold is reached,
The virtual memory manager obligates condition and the Preference Constraint condition according to, determines described at least one The corresponding storage pool of each storage volume, also includes in storage volume,
The virtual memory manager is repeated according to the 3rd constraints, using greedy algorithm, solve one by one described at least The storage pool that each storage volume is placed in one storage volume, obtains multigroup fuzzy solving result, and multigroup the obscuring is asked Each group of fuzzy solving result includes one group of placement schemes of at least one storage volume in solution result;
The virtual memory manager puts each storage volume at least one storage volume according to final fuzzy solving result Put in corresponding storage pool, including:
The virtual memory manager by multigroup fuzzy solving result constraints scoring one group of solving result of highest It is defined as the finally fuzzy solving result, and according to the finally fuzzy solving result, by least one storage volume Each storage volume is placed in corresponding storage pool.
16. method according to any one of claim 1 to 15, it is characterised in that
It is described obligate condition and the Preference Constraint condition include respectively it is following at least one constraint:Storage volume is deposited Storage media type constraint, the storage size constraint of storage volume, the compatibility constraint between the performance constraints of storage volume, storage volume Constrained with non-compatibility.
A kind of 17. virtual memory managers, it is characterised in that including:
Acquiring unit, the placement request for obtaining at least one storage volume, described placement asks to include that described at least one deposits What storage was rolled up obligates condition and Preference Constraint condition, and the condition of obligating is for determining at least one storage volume Storage pool necessary condition, the Preference Constraint condition is the virtual memory for determining at least one storage volume The complementary condition in pond;
Determining unit, for obligating condition and the Preference Constraint condition according to, determines at least one storage The corresponding storage pool of each storage volume in volume;
Placement unit, for each storage volume at least one storage volume to be placed in corresponding storage pool.
18. virtual memory managers according to claim 17, it is characterised in that
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Roll up corresponding storage pool aspect, the determining unit specifically for:
Condition and the Preference Constraint condition are obligated according to described, using greedy algorithm, at least one storage is solved The storage pool that each storage volume is placed in volume;
Wherein, the aspect in each storage volume at least one storage volume is placed on into corresponding storage pool, described Placement unit specifically for:
After at least one storage volume solves the storage pool placed, according to final greedy solving result, by institute Each storage volume is placed in corresponding storage pool in stating at least one storage volume.
19. virtual memory managers according to claim 18, it is characterised in that using greedy algorithm, all storages Volume is solved to after the storage pool placed, in the case of without very first time threshold value is reached,
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Corresponding storage pool aspect is rolled up, the determining unit is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to, using greedy algorithm, solve described at least one The storage pool that each storage volume is placed in storage volume, obtains multigroup greedy solving result, and multigroup greedy solution is tied Each group of greedy solving result includes one group of placement schemes of at least one storage volume in fruit;
According to final greediness solving result, each storage volume at least one storage volume is placed on and corresponding is virtually deposited In reservoir aspect, the placement unit specifically for:
Anti-crushing one group of best solving result of effect in multigroup greedy solving result is defined as into the final greediness to ask Solution result, and according to the final greedy solving result, each storage volume at least one storage volume is placed on correspondence Storage pool in.
20. virtual memory managers according to claim 19, it is characterised in that
Anti-crushing one group of best solving result of effect in multigroup greedy solving result is being defined as the final greediness Solving result aspect, the placement unit specifically for:
Fragment-threshold F and storage according to storage pool are finished threshold value Y, by storage pool in multigroup greedy solving result One group of solving result that remaining space is located at the storage pool number minimum between F and Y is defined as the final greedy solution As a result.
21. virtual memory manager according to any one of claim 18 to 20, it is characterised in that
Condition and the Preference Constraint condition are being obligated according to, using greedy algorithm, described at least one is being solved and is deposited Storage volume in each storage volume place storage pool aspect, the determining unit specifically for:
Condition is obligated according to described, the initial candidate storage pool of each storage volume is determined, wherein, the first storage volume Initial candidate storage pool meet place first storage volume obligate condition;
The ascending order of the number of the candidate's storage pool according at least one storage volume, one by one from described at least one Current candidate storage pool, first storage volume are determined in storage volume in the initial candidate storage pool of each storage volume Current candidate storage pool assuming that full after all storage volume before first storage volume are placed on storage pool Foot first storage volume obligates condition;
According to the Preference Constraint condition, determine to place described the from the current candidate storage pool of first storage volume The storage pool of one storage volume.
22. virtual memory managers according to claim 21, it is characterised in that
After assuming that all storage volume before first storage volume are placed on storage pool, at the beginning of first storage volume Beginning candidate virtual storage pool be unsatisfactory for first storage volume obligate condition in the case of,
Condition and the Preference Constraint condition are being obligated according to, using greedy algorithm, described at least one is being solved and is deposited The storage pool aspect that each storage volume is placed in storage volume, the determining unit is additionally operable to:
Release the storage volume before taking the initial candidate virtualization pool of first storage volume, and will be described before deposit Storage volume is placed in other candidate virtual resource pools of the storage volume,
Using the initial candidate virtualization pool after releasing as each storage volume current candidate storage pool.
23. virtual memory manager according to claim 21 or 22, it is characterised in that
According to the Preference Constraint condition, determining to place described from the current candidate storage pool of first storage volume First storage volume storage pool aspect, the determining unit specifically for:
According to the Preference Constraint condition, to each virtual memory in the current candidate storage pool of first storage volume Pond is scored, and the highest storage pool that scored in the current candidate storage pool is defined as into each described in placement The storage pool of storage volume.
24. virtual memory managers according to claim 23, it is characterised in that
Each is virtual in current candidate storage pool of the placement unit according to below equation to first storage volume Storage pool is scored:
score_opcobj(p)=∑ w_opcobj,i,
Wherein, score_opcobjP () represents scorings of the first storage volume obj to storage pool p, w_opcobj,iRepresent The first storage volume obj is to i-th weight of constraint in the Preference Constraint condition.
25. virtual memory manager according to any one of claim 18 to 24, it is characterised in that
Greedy algorithm is being used, when solving the storage pool that storage volume is placed one by one at least one storage volume, institute State at least one storage volume and exist in the case that storage volume do not solve placement storage pool,
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Corresponding storage pool aspect is rolled up, the determining unit is additionally operable to:
Condition and the Preference Constraint condition are obligated according to described, using linear programming algorithm, described at least one is solved The storage pool that each storage volume is placed in storage volume;
The aspect in each storage volume at least one storage volume is placed on into corresponding storage pool, it is described to place single Unit specifically for:
After at least one storage volume solves the storage pool placed, according to final programming evaluation result, by institute Each storage volume is placed in corresponding storage pool in stating at least one storage volume.
26. virtual memory managers according to claim 17, it is characterised in that
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Roll up corresponding storage pool aspect, the determining unit specifically for:
Condition and the Preference Constraint condition are obligated according to described, using linear programming algorithm, described at least one is solved The storage pool that each storage volume is placed in storage volume;
The aspect in each storage volume at least one storage volume is placed on into corresponding storage pool, it is described to place single Unit specifically for:
Solved to after the storage pool placed at least one storage volume, according to final programming evaluation result, will be described Each storage volume is placed in corresponding storage pool at least one storage volume.
27. virtual memory manager according to claim 25 or 26, it is characterised in that
Obligating condition and the Preference Constraint condition according to described, using linear programming algorithm, at least one described in solution In individual storage volume each storage volume place storage pool aspect, the determining unit specifically for:
Maximum according to object function is solved determines the corresponding virtual memory of each storage volume at least one storage volume Pond, wherein, the object function represents that storage pool meets the score of Preference Constraint condition, and the bound for objective function is It is described to obligate condition,
Wherein, the object function number is:
f(x1)+f(x2)+…f(xn)…+f(xN)=y
Constraints includes:
g(z1), g (z2) ..., g (zm) ... g (zM);
Wherein, N represents the number of storage volume, xnRepresent the n-th storage pool, 1≤n≤N;f(xn) represent n-th storage volume pair The xth answerednThe Preference Constraint score of individual storage pool;Y represents storage pool x1To xnMeet the score of Preference Constraint condition, M tables Show the number for obligating condition, g (zm) represent m-th and obligate condition, 1≤m≤M.
28. virtual memory manager according to any one of claim 25 to 27, it is characterised in that
After using linear programming algorithm, all storage volume to solve the storage pool placed, when without reaching second Between in the case of threshold value,
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Corresponding storage pool aspect is rolled up, the determining unit is additionally operable to:
Repeat to obligate condition and the Preference Constraint condition according to described, using linear programming algorithm, described in solution at least The storage pool that each storage volume is placed in one storage volume, obtains multigroup programming evaluation result, and multigroup planning is asked Each group of solving result includes one group of placement schemes of at least one storage volume in solution result;
According to final programming evaluation result, each storage volume at least one storage volume is placed on and corresponding is virtually deposited In reservoir aspect, the placement unit specifically for:
Preference will be met in multigroup solving result constrain best one group of solving result and be defined as the final planning and ask Solution result, and according to final programming evaluation result, each storage volume at least one storage volume is placed on corresponding void In plan storage pool.
29. virtual memory manager according to any one of claim 25 to 28, it is characterised in that
Linear programming algorithm is being used, the virtual memory of each storage volume placement at least one storage volume is not being solved In the case of pond,
Condition and the Preference Constraint condition are being obligated according to, each storage at least one storage volume is being determined Corresponding storage pool aspect is rolled up, the determining unit is additionally operable to:
According to the 3rd constraints, using greedy algorithm, each storage volume is placed in solution at least one storage volume Storage pool, wherein, the 3rd constraints removes the residue after partially restrained about during condition is obligated including described in Beam condition;
The aspect in each storage volume at least one storage volume is placed on into corresponding storage pool, it is described to place single Unit specifically for:
After all storage volume solve the storage pool placed, according to final fuzzy solving result, at least one by described in Each storage volume is placed in corresponding storage pool in individual storage volume, the finally fuzzy solving result include it is described at least One the one of storage volume group of placement schemes.
30. virtual memory managers according to claim 29, it is characterised in that
According to the 3rd constraints, using greedy algorithm, each storage volume at least one storage volume is solved Placement storage pool aspect, the determining unit specifically for:
According to the order that the number of the storage pool for obligating condition for meeting storage volume is ascending, to described at least one Individual storage volume is ranked up;
According to step-length N is loosened, according to the sequence of at least one storage volume, obligating for N number of storage volume will be successively removed Remaining constraints is pre-conditioned as the 3rd after the first constraints in condition, and is removing N number of storage volume every time The constraints obligated in condition after, according to the 3rd constraints, using greedy algorithm, solve described at least one The storage pool that each storage volume is placed in individual storage volume, until all storage volume solve the virtual memory placed Pond.
31. virtual memory managers according to claim 30, it is characterised in that
After all storage volume solve the storage pool placed, in the case of without the 3rd time threshold is reached,
Condition and the Preference Constraint condition are obligated according in the virtual memory manager, it is determined that described at least one The corresponding storage pool aspect of each storage volume in individual storage volume, the determining unit is additionally operable to:
Repeat according to the 3rd constraints, using greedy algorithm, solve each storage at least one storage volume The storage pool placed is rolled up, multigroup fuzzy solving result is obtained, each group of fuzzy solution in multigroup fuzzy solving result Result includes one group of placement schemes of at least one storage volume;
According to finally fuzzy solving result, each storage volume at least one storage volume is placed on and corresponding is virtually deposited In reservoir aspect, the placement unit specifically for:
Constraints scoring one group of solving result of highest in multigroup fuzzy solving result is defined as described final fuzzy Solving result, and according to the finally fuzzy solving result, it is right that each storage volume at least one storage volume is placed on In the storage pool answered.
32. virtual memory manager according to any one of claim 17 to 31, it is characterised in that
It is described obligate condition and the Preference Constraint condition include respectively it is following at least one constraint:Storage volume is deposited Storage media type constraint, the storage size constraint of storage volume, the compatibility constraint between the performance constraints of storage volume, storage volume Constrained with non-compatibility.
CN201611228589.6A 2016-12-27 2016-12-27 The method and apparatus for placing storage volume Active CN106843751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611228589.6A CN106843751B (en) 2016-12-27 2016-12-27 The method and apparatus for placing storage volume

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611228589.6A CN106843751B (en) 2016-12-27 2016-12-27 The method and apparatus for placing storage volume

Publications (2)

Publication Number Publication Date
CN106843751A true CN106843751A (en) 2017-06-13
CN106843751B CN106843751B (en) 2019-11-29

Family

ID=59113235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611228589.6A Active CN106843751B (en) 2016-12-27 2016-12-27 The method and apparatus for placing storage volume

Country Status (1)

Country Link
CN (1) CN106843751B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107797766A (en) * 2017-09-27 2018-03-13 郑州云海信息技术有限公司 A kind of method and apparatus for creating volume
CN109086467A (en) * 2017-06-14 2018-12-25 上海复旦微电子集团股份有限公司 I/O cell layout method and device, medium and the equipment of programmable logic device
CN109977035A (en) * 2019-03-18 2019-07-05 新华三技术有限公司成都分公司 Disk space distribution method, device, storage equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1766852A (en) * 2004-10-28 2006-05-03 富士通株式会社 Virtual storage manager, method and apparatus
CN101510143A (en) * 2009-03-13 2009-08-19 杭州华三通信技术有限公司 Storage space dynamic assignment method, system and storage apparatus
CN102334093A (en) * 2009-03-18 2012-01-25 株式会社日立制作所 Memory controller and virtual volume control method
US20150095555A1 (en) * 2013-09-27 2015-04-02 Avalanche Technology, Inc. Method of thin provisioning in a solid state disk array
CN104750538A (en) * 2013-12-27 2015-07-01 伊姆西公司 Virtual storage pool providing method and system for target application
CN105262796A (en) * 2015-09-17 2016-01-20 北京汉柏科技有限公司 Cloud platform storage resource management system and disposition framework thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1766852A (en) * 2004-10-28 2006-05-03 富士通株式会社 Virtual storage manager, method and apparatus
CN101510143A (en) * 2009-03-13 2009-08-19 杭州华三通信技术有限公司 Storage space dynamic assignment method, system and storage apparatus
CN102334093A (en) * 2009-03-18 2012-01-25 株式会社日立制作所 Memory controller and virtual volume control method
US20150095555A1 (en) * 2013-09-27 2015-04-02 Avalanche Technology, Inc. Method of thin provisioning in a solid state disk array
CN104750538A (en) * 2013-12-27 2015-07-01 伊姆西公司 Virtual storage pool providing method and system for target application
CN105262796A (en) * 2015-09-17 2016-01-20 北京汉柏科技有限公司 Cloud platform storage resource management system and disposition framework thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086467A (en) * 2017-06-14 2018-12-25 上海复旦微电子集团股份有限公司 I/O cell layout method and device, medium and the equipment of programmable logic device
CN107797766A (en) * 2017-09-27 2018-03-13 郑州云海信息技术有限公司 A kind of method and apparatus for creating volume
CN109977035A (en) * 2019-03-18 2019-07-05 新华三技术有限公司成都分公司 Disk space distribution method, device, storage equipment and storage medium

Also Published As

Publication number Publication date
CN106843751B (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN105808634B (en) Distributed mapping reduction network
CN104038540B (en) Method and system for automatically selecting application proxy server
CN102835068B (en) Method and apparatus for managing reallocation of system resources
CN109783224A (en) Method for allocating tasks, device and terminal device based on load allotment
CN107291545A (en) The method for scheduling task and equipment of multi-user in computing cluster
CN109471705A (en) Method, equipment and system, the computer equipment of task schedule
CN105468435A (en) NFV dynamic resource distribution method
CN106843751B (en) The method and apparatus for placing storage volume
CN110008024A (en) Container dispatching method and device based on Delayed Decision under a kind of Multi-dimensional constraint
CN109684074A (en) Physical machine resource allocation methods and terminal device
CN102835067A (en) Method and apparatus for hierarchical management of system resources
CN109933405A (en) Virtual machine creation method and device, electronic equipment, storage medium
DE112019000421B4 (en) WORKLOAD MANAGEMENT WITH DATA ACCESS DISCOVERY IN A COMPUTING CLUSTER
CN110502321A (en) A kind of resource regulating method and system
CN110221915A (en) Node scheduling method and apparatus
CN110402432A (en) Availability management in distributed computing system
CN103701894A (en) Method and system for dispatching dynamic resource
CN106406821A (en) Data processing request sorting method and device
CN107665143A (en) Method for managing resource, apparatus and system
CN109324890A (en) Method for managing resource, device and computer readable storage medium
CN112052082B (en) Task attribute optimization method, device, server and storage medium
CN107220184A (en) The management method and device of a kind of LUN memory cell
CN115220916B (en) Automatic calculation scheduling method, device and system of video intelligent analysis platform
US9565101B2 (en) Risk mitigation in data center networks
CN105847358A (en) Method for realizing big data node distribution in cloud computing environment and system thereof

Legal Events

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

Effective date of registration: 20220905

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right