CN104932988A - Method and system for optimizing hard disk use - Google Patents

Method and system for optimizing hard disk use Download PDF

Info

Publication number
CN104932988A
CN104932988A CN201510378699.XA CN201510378699A CN104932988A CN 104932988 A CN104932988 A CN 104932988A CN 201510378699 A CN201510378699 A CN 201510378699A CN 104932988 A CN104932988 A CN 104932988A
Authority
CN
China
Prior art keywords
space
hard drive
drive space
weights
sizing
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.)
Pending
Application number
CN201510378699.XA
Other languages
Chinese (zh)
Inventor
康暖
陈海滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING OPZOON TECHNOLOGY Co Ltd
Opzoon Technology Co Ltd
Original Assignee
BEIJING OPZOON TECHNOLOGY 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 BEIJING OPZOON TECHNOLOGY Co Ltd filed Critical BEIJING OPZOON TECHNOLOGY Co Ltd
Priority to CN201510378699.XA priority Critical patent/CN104932988A/en
Publication of CN104932988A publication Critical patent/CN104932988A/en
Pending legal-status Critical Current

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a method and a system for optimizing hard disk use. The method comprises the steps as follows: recording a spatial weight of hard-disk space in real time; judging whether the spatial weight is more than an upper limit value of the spatial weight; exchanging the hard-disk space with the hard-disk space whose spatial weight is lower than a lower limiting value of the spatial weight when the spatial weight is more than the upper limit value of the spatial weight. The invention further presents one for optimizing the hard disk use. The method of the invention could be used for exchanging physical space with high use frequency mapped by a user with the physical space with low use frequency mapped by the user when the use frequency of the hard disk reaches to certain judging value by recording the user frequency of the user to the hard disk. The method of the invention could be used for solving the problem that the time of the hard-disk maintenance is increased and the maintenance cost is increased because the use frequency of the hard disk is high in a cloud calculating system.

Description

A kind of method and system optimized hard disk and use
Technical field
The invention belongs to field of hard disks, particularly a kind of method and system optimized hard disk and use.
Background technology
In cloud computing system, when relating to the use of physical hard disk, usually physical hard disk can be invented an overall hard disk and use.When system call hard disk, normally call continuously.
For example, when there being two users in cloud computing system, the frequency of utilization of one of them system is very high, the frequency of utilization of another one system is very low, and these two users have been assigned in different hard disks, so through after a period of time, the loss of the hard disk that frequency of utilization is high can be greater than the loss of the low hard disk of frequency of utilization, the also corresponding reduction of its life-span.In order to solve the loss problem of hard disk, just must change and safeguard by the hard disk high to frequency of utilization, but equally also can bring a problem like this, exactly in a hard disk cluster (comprising multiple hard disk), often occur single hard disk due to frequency of utilization too high, need the situation carrying out changing, this just adds the cost of manual maintenance accordingly, and considerably increases the maintenance times of hard disk.
There is following shortcoming in prior art: 1, hard disk failure manually need change maintenance, adds the cost of manual maintenance, affects the normal use of hard disk simultaneously; 2, hard disk failure adds the maintenance cost of hard disk.
Therefore, be necessary the problems referred to above based on prior art, propose a kind of method optimized hard disk and use, balance the problem of the utilization rate of hard disk in cloud computing system, the maintenance times of hard disk and maintenance cost.
Summary of the invention
The object of this invention is to provide a kind of method and system optimized hard disk and use, the present invention is by carrying out real-time follow-up and record to the space weights of hard drive space and frequency of utilization, and dynamically hard drive space low for frequency of utilization and the high hard drive space of frequency of utilization are exchanged, prevent the appearance of corpse hard disk, improve overall hard disk average service rate, thus extend the serviceable life of hard disk.
For achieving the above object, one aspect of the present invention provides a kind of method optimized hard disk and use, and comprising: step S100, the space weights of real time record hard drive space; Step S200, judges whether described space weights exceed space weights higher limit; Step S300, when described space weights exceed described space weights higher limit, exchanges described hard drive space and space weights lower than the hard drive space of space weights lower limit.
Wherein, described in carry out in the step of exchanging, performing time of exchanging is that execution is exchanged when two hard drive spaces are all in inactive state.
Wherein, after described hard drive space is exchanged, retain the original space weights of described hard drive space.
Wherein, when user to read hard drive space and/or writes, value that the space weights of hard drive space are reordered.
Optionally, based on user, the method that described optimization hard disk uses also comprises applies for that hard drive space is optimized, it comprises: step S10, and real time scan physical hard disk is to obtain the space weights of hard drive space; Step S11, judges that whether described space weights are lower than space weights lower limit; Space weights, when user applies for hard drive space, are preferentially distributed to user's use lower than the hard drive space of space weights lower limit by step S12.
Optionally, the method that described optimization hard disk uses also comprises and being optimized based on distribution hard drive space size, and it comprises: step S20, and when user applies for hard drive space, the hard drive space of distributing the first pre-sizing uses to user; Step S21, judges whether the usage space of user exceedes the hard drive space of the described first pre-sizing; Step S22, when the hard drive space of usage space pre-sizing more than first of user, by data copy in the hard drive space of the second pre-sizing; Step S23, judges whether the usage space of user exceedes the hard drive space of the described second pre-sizing; Step S24, when the hard drive space of usage space pre-sizing more than second of user, by data copy in the hard drive space of the 3rd pre-sizing; Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of the hard drive space < second of the first pre-sizing.
Wherein, when user applies for hard drive space, use if described hard drive space is not assigned to user, the space weights of this hard drive space are subtracted definite value.
Optionally, the periodicity that the method that described optimization hard disk uses also comprises physically based deformation hard disk is repartitioned and is optimized, and it comprises: step S30, the continuous access times of real time record hard drive space; Step S31, when the continuous access times of the hard drive space of the first pre-sizing exceed first threshold, next time, when repartitioning described physical hard disk, is repartitioned according to the hard drive space of the second pre-sizing; Step S32, when the continuous access times of the hard drive space of the second pre-sizing exceed Second Threshold, repartitions according to the hard drive space of the 3rd pre-sizing; Step S33, when the continuous access times of the hard drive space of the 3rd pre-sizing are lower than the 3rd threshold value, repartitions according to the hard drive space of the first pre-sizing; Wherein, first threshold >=Second Threshold >=the 3rd threshold value.
According to a further aspect in the invention, provide a kind of system optimized hard disk and use, comprise the first optimization module, be optimized for the space weights based on hard drive space; Described first optimizes module comprises: weights record cell, for the space weights of real time record hard drive space; First judging unit, for judging whether described space weights exceed space weights higher limit; Exchange unit, when the judged result of the first judging unit be described space weights exceed described space weights higher limit time, for described hard drive space and space weights are exchanged lower than the hard drive space of space weights lower limit.
Wherein, exchanging unit, to carry out the time that hard drive space exchanges be when two hard drive spaces are in inactive state, performs and exchange operation.
Wherein, after hard drive space is exchanged, retain the original space weights of this hard drive space.
Wherein, when user to read hard drive space and/or writes, value that the space weights of hard drive space are reordered.
Optionally, described system also comprises the second optimization module, for applying for that hard drive space is optimized based on user; Described second optimizes module comprises: weights scanning element, for real time scan physical hard disk to obtain the space weights of hard drive space; Space weights for judging that whether described space weights are lower than space weights lower limit, and are sent to hard disk allocation units lower than the judged result of space weights lower limit by the second judging unit; Space weights, when user applies for hard drive space, are distributed to user's use lower than the hard drive space of space weights lower limit for preferential by hard disk allocation units.
Described system also comprises the 3rd and optimizes module, for being optimized based on distribution hard drive space size; Described 3rd optimizes module comprises: the first allocation units, when user applies for hard drive space, use to user for the hard drive space of distributing the first pre-sizing; 3rd judging unit, for judging whether the usage space of user exceedes the hard drive space of the described first pre-sizing; Second allocation units, when the hard drive space of usage space pre-sizing more than first of user, for by data copy in the hard drive space of the second pre-sizing; 4th judging unit, for judging whether the usage space of user exceedes the hard drive space of the described second pre-sizing; 3rd allocation units, when the hard drive space of usage space pre-sizing more than second of user, for by data copy in the hard drive space of the 3rd pre-sizing; Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of the hard drive space < second of the first pre-sizing.
Wherein, when user applies for hard drive space, use if described hard drive space is not assigned to user, the space weights of this hard drive space are subtracted definite value.
Optionally, described system also comprises the 4th and optimizes module, and the periodicity for physically based deformation hard disk is repartitioned and is optimized;
Described 4th optimizes module 4 comprises:
4th record cell, for the continuous access times of real time record hard drive space;
4th division unit, when the continuous access times for the hard drive space when the first pre-sizing exceed first threshold, next time, when repartitioning described physical hard disk, is repartitioned according to the hard drive space of the second pre-sizing;
5th division unit, when the continuous access times for the hard drive space when the second pre-sizing exceed Second Threshold, repartitions according to the hard drive space of the 3rd pre-sizing;
6th division unit, during for the continuous access times of the hard drive space when the 3rd pre-sizing lower than the 3rd threshold value, repartitions according to the hard drive space of the first pre-sizing;
Wherein, first threshold >=Second Threshold >=the 3rd threshold value.
As mentioned above, the present invention is by carrying out real-time follow-up and record to the space weights of hard drive space and frequency of utilization, and dynamically hard drive space low for frequency of utilization and the high hard drive space of frequency of utilization are exchanged, prevent the appearance of corpse hard disk, improve overall hard disk average service rate, thus extend the serviceable life of hard disk.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the method that optimization hard disk of the present invention uses;
Fig. 2 shows in an embodiment of the present invention and applies for that hard drive space optimizes the method flow diagram of hard disk use based on user;
Fig. 3 shows in an embodiment of the present invention based on distributing the hard drive space optimised method flow diagram that hard disk uses;
Fig. 4 shows in an embodiment of the present invention and repartitions based on the periodicity of hard disk the method flow diagram optimized hard disk and use;
Fig. 5 is the structural representation of the system that optimization hard disk of the present invention uses;
Fig. 6 is the structural representation optimizing module according to first of the present invention one preferred implementation;
Fig. 7 is the structural representation optimizing module according to second of the present invention one preferred implementation;
Fig. 8 is the structural representation optimizing module according to the 3rd of the present invention one preferred implementation;
Fig. 9 is the structural representation optimizing module according to the 4th of the present invention one preferred implementation.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with embodiment also with reference to accompanying drawing, the present invention is described in more detail.Should be appreciated that, these describe just exemplary, and do not really want to limit the scope of the invention.In addition, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring concept of the present invention.
Fig. 1 is the schematic flow sheet of the method that optimization hard disk of the present invention uses.
As shown in Figure 1, the method that optimization hard disk of the present invention uses,
Step S100, the space weights of real time record hard drive space.
In the use procedure of physical hard disk, the space weights of real time record hard drive space.Wherein, when user reads and writes hard drive space, value of being reordered by the space weights of this hard drive space, such as, add 1.User can according to actual needs, change arbitrarily this definite value; Such as the space weights of hard drive space are 3000 at present, definite value is 1, after user carries out read-write operation to this hard drive space, (read-write operation of trigger either spatial weights change can be the size, time or number of times etc. that read and write data, as read and write 500MB data after, space weights increase by 1, and after can also being 20 read-writes, space weights increase by 1, in certain the present invention, the change condition of trigger either spatial weights is not limited thereto), the space weights of this hard drive space are 3001.
Step S200, judges whether described space weights exceed space weights higher limit.
According to the record result of step S100, real-time judge space weights enough exceed space weights higher limit.Like this, just can according to being that the hard drive space exceeding space weights higher limit exchanges operation to judged result.
Step S300, when described space weights exceed described space weights higher limit, exchanges described hard drive space and space weights lower than the hard drive space of space weights lower limit.
When the judged result of step S200 is for exceeding space weights higher limit, described hard drive space and space weights are exchanged lower than the hard drive space of space weights lower limit.Such as, when the space weights of a certain hard drive space exceed space weights higher limit (as 10,000), find space weights and exchange lower than the hard drive space in space weights lower limit (such as 10).Wherein, space weights higher limit and space weights lower limit, can be arranged by User Defined.
When the judged result of step S200 is for being no more than space weights higher limit, continue the space weights of real time record hard drive space, whether real-time judge has the space weights of hard drive space to exceed space weights higher limit, then carry out exchanging of hard drive space.
Wherein, described in carry out exchanging operation time be when two hard drive spaces are not in active state, perform and exchange operation.Specifically, when two hard drive spaces are all in active state (being namely in data read and/or write state) or one of them hard drive space is in active state, now do not perform and exchange operation.Only have when two hard drive spaces are all in inactive state, now two hard drive spaces are exchanged.
Wherein, after hard drive space is exchanged, retain the former space weights of this hard drive space.Specifically, after exchanging operation to two hard drive spaces execution, its original space weights do not empty, and namely retain original space weights.Such as, accept above-mentioned example, the space weights 10,000 and 10 of two hard drive spaces after exchanging are retained.
Wherein, the rule change of hard drive space weights is: when user reads this hard drive space and/or writes, value of being reordered by the space weights of hard drive space.Specifically, when user reads a certain hard drive space and/or writes, value of being reordered by the space weights of hard drive space, such as, add 1.If this hard drive space is through exchanging, so when user reads this hard disk and/or writes, then the space weights of this hard drive space current obtain add definite value on the basis of original space weights after.
Wherein, when user applies for hard drive space, if described hard drive space is not assigned to user, then the space weights of described hard drive space are subtracted definite value.Specifically, when there being new user to apply for hard drive space, using if a certain hard drive space is not assigned to user, then the space weights of this hard drive space being subtracted definite value, such as 1.
By the above-mentioned method be optimized hard disk based on hard drive space weights, balance the frequency of utilization of hard disk in cloud computing system, extend the serviceable life of hard disk, reduce the maintenance times of hard disk, thus reduce maintenance cost.
Fig. 2 shows in an embodiment of the present invention and applies for that hard drive space optimizes the method flow diagram of hard disk use based on user.
In the present embodiment, based on user, optional employing applies for that hard drive space is optimized use to hard disk.
As shown in Figure 2, described method of applying for the use of hard drive space optimization hard disk based on user, it comprises:
Step S10, real time scan physical hard disk is to obtain the space weights of hard drive space.
In hard disk use procedure, in real time the space weights obtaining each hard drive space are scanned to physical hard disk.
Step S11, judges that whether described space weights are lower than space weights lower limit.
According to the scanning result of step S10, whether the space weights of the hard drive space that real-time judge scanning obtains are lower than space weights lower limit.
Space weights, when user applies for hard drive space, are preferentially distributed to user's use lower than the hard drive space of space weights lower limit by step S12.
Specifically, when user applies for hard drive space, the hard drive space preferentially space weights being less than space weights lower limit distributes to user's use.
In the present embodiment, apply for that the method that hard drive space optimization hard disk uses can independently perform based on user, preferably, also can be used as performing the method that hard disk is optimized based on hard drive space weights as a kind of supplementary.
Fig. 3 shows in an embodiment of the present invention based on distributing the hard drive space optimised method flow diagram that hard disk uses.
In the present embodiment, optional employing is optimized use based on distribution hard drive space size to hard disk.
As shown in Figure 3, the described method based on distribution hard drive space size, hard disk being optimized to use, it comprises:
When user applies for storage space, for user distributes a hard drive space, the memory space of described hard drive space is the fixed value preset; When the usage space of user exceedes the hard drive space that user has at present, by the data copy of user in other hard drive spaces being greater than described usage space.
A kind of preferred version more specifically:
Step S20, when user applies for hard drive space, the hard drive space of distributing the first pre-sizing uses to user.
In this step, when user applies for hard drive space, first the hard drive space of the pre-sizing of dynamic assignment first uses to user.Wherein, described hard drive space is continuous print hard drive space, because in cloud computing, hard disk, when calling, normally calls continuously.
Step S21, judges whether the usage space of user exceedes the hard drive space of the described first pre-sizing.
In the use procedure of described hard drive space, whether the usage space of real-time judge user exceedes the hard drive space of the described first pre-sizing.
Step S22, when the hard drive space of usage space pre-sizing more than first of user, by data copy in the hard drive space of the second pre-sizing.
When the usage space that the judged result of step S21 is user exceedes the hard drive space of the described first pre-sizing, Data Dynamic in the hard drive space of the first pre-sizing is copied in the hard drive space of the second pre-sizing, which increases the usage space of user writable data.Wherein, the hard drive space of the pre-sizing of the hard drive space < second of the first pre-sizing.
Step S23, judges whether usage space exceedes the hard drive space of the described second pre-sizing.
Same, in the use procedure of physical hard disk, whether the usage space of real-time judge user exceedes the hard drive space of the described second pre-sizing.
Step S24, when the hard drive space of usage space pre-sizing more than second of user, by data copy in the hard drive space of the 3rd pre-sizing.
When the usage space that the judged result of step S23 is user exceedes the hard drive space of the described second pre-sizing, the Data Dynamic in the hard drive space of the second pre-sizing is copied in the hard drive space of the described 3rd pre-sizing.Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the second pre-sizing.
In the present embodiment, independently can perform based on distributing the hard drive space optimised method that hard disk uses, preferably, also can be used as performing the method that hard disk is optimized based on hard drive space weights as a kind of supplementary.
Here is of the present invention one concrete example.
When user applies for hard drive space, such as 100G, first gives the hard drive space of the pre-sizing of user's dynamic assignment first, such as 10G continuous print hard drive space.Use in the process of this 10G continuous print hard drive space user, the usage space of real time record user, when the usage space of user is more than 10G, the Data Dynamic in 10G hard drive space is copied in the hard drive space of the second pre-sizing, such as 30G continuous print hard drive space.Same, use in the process of this 30G continuous print hard drive space user, the usage space of real time record user, when the usage space of user is more than 30G, Data Dynamic in 30G hard drive space is copied in the hard drive space of the 3rd pre-sizing, such as 60G continuous print hard drive space.The method is in order to avoid a continuous print hard drive space is read and write by short data frequently.
In the present invention, in the actual use procedure of physical hard disk, distribute the number of times of hard drive space size, because situation difference can be different.Such as, first time distributes the hard drive space of 50G, and when user's usage space exceeds the space of this 30G, the space distributing 100G uses to user, now, this space enough when, only carried out 2 sub-distribution of hard drive space.Again such as, first time distributes 20G hard drive space and uses to user, when user's usage space exceeds the space of this 20G, the space distributing 25G uses to user, now, when this space is not enough, proceed the 3rd sub-distribution or the 4th distribution, until this hard drive space meets the user demand of user, stop the distribution of hard drive space.
Fig. 4 shows in an embodiment of the present invention and repartitions based on the periodicity of hard disk the method flow diagram optimized hard disk and use.
In the present embodiment, optionally adopt the periodicity based on hard disk to repartition and use is optimized to hard disk.
As shown in Figure 4, the described periodicity based on hard disk repartitions method hard disk being optimized to use, and it comprises:
Step S30, the continuous access times of real time record hard drive space;
In the use procedure of physical hard disk, the continuous access times of real time record hard drive space.
Step S31, when the continuous frequency of utilization of the hard drive space of the first pre-sizing is more than the 3rd threshold value, upper once the physical space of hard disk is divided time, repartition according to the hard drive space of the second pre-sizing.Such as, when the continuous access times of the hard drive space of 1 10G are more than 100 times, when next time divides this physical hard disk, repartition according to the hard drive space of 30G.
Step S32, when the continuous frequency of utilization of the hard drive space of the second pre-sizing is more than the 4th threshold value, upper once the physical space of hard disk is divided time, repartition according to the hard drive space of the 3rd pre-sizing.Such as, accept above-mentioned example, when the continuous access times of the hard drive space of 30G are more than 10 times, when next time divides this physical hard disk, repartition according to the hard drive space of 60G.
Step S33, when the continuous frequency of utilization of the hard drive space of the 3rd pre-sizing is lower than during more than the 5th threshold value, upper once the physical space of hard disk is divided time, repartition according to the hard drive space of the first pre-sizing.Such as, accept above-mentioned example, when the continuous access times of the hard drive space of 60G are lower than 2 times, when next time divides this physical hard disk, repartition according to the hard drive space of 10G, the object of this step prevents corpse hard disk.
Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of hard drive space < second of the first pre-sizing, and arranged by User Defined.3rd threshold value >=the 4th threshold value >=the 5th threshold value, same, arranged by User Defined.
In the present invention, in the actual use procedure of physical hard disk, periodically physical space is repartitioned.Same, the number of times repartitioned, also because situation difference can be different.Reason is identical with distribution hard drive space size, repeats no more herein.
In the present embodiment, the method that the periodicity based on hard disk is repartitioned hard disk is optimized can independently perform, and preferably, also can be used as performing the method that hard disk is optimized based on hard drive space weights as a kind of supplementary.
As mentioned above, describe the method that optimization hard disk of the present invention uses in detail, described optimization method is applied in DISK to Image use procedure.In hard disk use procedure, the space weights of real-time judge hard drive space, if when the space weights that there is hard drive space exceed space weights higher limit, exchange this hard drive space and space weights lower than the hard drive space of space weights lower limit.Adopt this optimization method, balance the frequency of utilization of hard disk in cloud computing system, extend the serviceable life of hard disk, reduce the maintenance times of hard disk, thus reduce maintenance cost.
Fig. 5 is the structural representation of the system that optimization hard disk of the present invention uses.
The system that described optimization hard disk uses comprises the first optimization module 1 and/or the second optimization module 2 and/or the 3rd optimizes module 3 and/or the 4th optimization module 4.Wherein, the first optimization module 1 is optimized based on the space weights of hard drive space.Based on user, second optimizes module 2 applies for that hard drive space is optimized.3rd optimizes module 3 is optimized based on distribution hard drive space size.4th optimizes module 4 repartitions based on the periodicity of hard disk and is optimized.Wherein, the second optimization module 2, the 3rd optimizes module 3 and the 4th optimization module 4 is optional, optimizes module 1 be optimized, to improve the effect of optimization of hard disk use for auxiliary first.
Fig. 6 is the structural representation optimizing module according to first of the present invention one preferred implementation.
As shown in Figure 6, in a preferred implementation of the present invention, first optimizes the method that module uses for the optimization hard disk performed based on space weights.Described first optimizes module comprises weights record cell 100, first judging unit 200 and exchanges unit 300.
Weights record cell 100 is for the space weights of real time record hard drive space.Specifically, weights logging modle is used for the space weights in recording disk space.
First judging unit 200 is connected with described weights record cell 100, for judging whether described space weights exceed space weights higher limit, and judged result is sent to and exchanges unit 300 or weights record cell 100.
Exchange unit 300 to be connected with described first judging unit 200, when the judged result of the first judging unit 200 be described space weights exceed described space weights higher limit time, for described hard drive space and space weights are exchanged lower than the hard drive space of space weights lower limit.
Wherein, exchanging unit 300, to carry out the time that hard drive space exchanges be when two hard drive spaces are in inactive state, performs and exchange operation.
Wherein, after hard drive space is exchanged, retain the former space weights of this hard drive space.Specifically, after exchanging operation to two hard drive spaces execution, its original space weights do not empty, and namely retain original space weights.
Wherein, the rule change of hard drive space weights is: when user reads this hard drive space and/or writes, value of being reordered by the space weights of hard drive space.When user applies for hard drive space, if described hard drive space is not assigned to user, then the space weights of described hard drive space are subtracted definite value.
Fig. 7 is the structural representation optimizing module according to second of the present invention one preferred implementation.
As shown in Figure 7, in a preferred implementation of the present invention, second optimizes module for performing the method for the optimization hard disk applying for hard drive space based on user.Described second optimizes module comprises weights scanning element 10, second judging unit 11 and hard disk allocation units 12.
Weights scanning element 10, for real time scan physical hard disk to obtain the space weights of hard drive space.Specifically, weights scanning element 10 obtains the space weights of hard drive space by real time scan physical hard disk.
Second judging unit 11 is connected with described weights scanning element 10, for judging that whether described space weights are lower than space weights lower limit, and space weights is sent to hard disk allocation units 12 lower than the judged result of space weights lower limit.Specifically, the space weights obtain scanning and space weights lower limit compare, and judge that whether described space weights are lower than space weights lower limit.
Hard disk allocation units 12 are connected with described second judging unit 11, when user applies for hard drive space, for preferential, space weights are distributed to user's use lower than the hard drive space of space weights lower limit.Specifically, when new user applies for hard drive space, the hard drive space priority allocation of space weights lower than space weights lower limit is used to user.
Fig. 8 is the structural representation optimizing module according to the 3rd of the present invention one preferred implementation.
As shown in Figure 8, in a preferred implementation of the present invention, the 3rd optimizes module 3 for performing the method based on the optimization hard disk distributing hard drive space size.Described 3rd optimizes module 3 comprises the first allocation units 20, the 3rd judging unit 21, second allocation units 22, the 4th judging unit 23 and the 3rd allocation units 24.
First allocation units 20, when user applies for hard drive space, use to user for the hard drive space of distributing the first pre-sizing.Specifically, when user applies for hard drive space, the hard drive space that first distribution one is little uses to user.
3rd judging unit 21, for judging whether the usage space of user exceedes the hard drive space of the described first pre-sizing.Use in the process of this hard drive space user, whether the usage space of real-time judge user exceedes the hard drive space of this first pre-sizing.
Second allocation units 22, when the hard drive space of usage space pre-sizing more than first of user, by data copy in the hard drive space of the second pre-sizing.Specifically, when the hard drive space of usage space pre-sizing more than first of user, the Data Dynamic in this hard drive space is copied in the hard drive space of the second pre-sizing.
4th judging unit 23, judges whether the usage space of user exceedes the hard drive space of the described second pre-sizing.In like manner, use in the hard drive space process of the second pre-sizing user, whether the usage space of user described in real-time judge exceedes the hard drive space of this second pre-sizing.
3rd allocation units 24, when the hard drive space of usage space pre-sizing more than second of user, by data copy in the hard drive space of the 3rd pre-sizing.In like manner, when the hard drive space of usage space pre-sizing more than second of user, the Data Dynamic in this hard drive space is copied in the hard drive space of the 3rd pre-sizing.
Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of the hard drive space < second of the first pre-sizing.
Fig. 9 is the structural representation optimizing module according to the 4th of the present invention one preferred implementation.
As shown in Figure 9, in a preferred implementation of the present invention, the method for the optimization hard disk that the 4th optimization module 4 is repartitioned for the periodicity performing physically based deformation hard disk.Described 4th optimizes module 4 comprises the 4th record cell 41, the 4th division unit 42, the 5th division unit 43 and the 6th division unit 44.
4th record cell 41, for the continuous access times of real time record hard drive space.
4th division unit 42 is connected with described 4th record cell 41, when continuous access times for the hard drive space when the first pre-sizing exceed first threshold, next time, when repartitioning described physical hard disk, is repartitioned according to the hard drive space of the second pre-sizing.
5th division unit 43 is connected with described 4th record cell 41, when the continuous access times for the hard drive space when the second pre-sizing exceed Second Threshold, repartitions according to the hard drive space of the 3rd pre-sizing.
6th division unit 44 is connected with described 5th division unit 43, during for the continuous access times of the hard drive space when the 3rd pre-sizing lower than the 3rd threshold value, repartitions according to the hard drive space of the first pre-sizing.Wherein, first threshold >=Second Threshold >=the 3rd threshold value.As mentioned above, describe the system that optimization hard disk of the present invention uses in detail, described optimization method is applied in DISK to Image use procedure.If when the space weights that there is hard drive space exceed space weights higher limit, this hard drive space and space weights are exchanged lower than the hard drive space of space weights lower limit.Adopt this optimization method, balance the frequency of utilization of hard disk in cloud computing system, extend the serviceable life of hard disk, reduce the maintenance times of hard disk, thus reduce maintenance cost.
As mentioned above, the invention provides a kind of method and system optimized hard disk and use, the present invention is by carrying out real-time follow-up and record to the space weights of hard drive space and frequency of utilization, and dynamically hard drive space low for frequency of utilization and the high hard drive space of frequency of utilization are exchanged, prevent the appearance of corpse hard disk, improve overall hard disk average service rate, thus extend the serviceable life of hard disk.
Should be understood that, above-mentioned embodiment of the present invention only for exemplary illustration or explain principle of the present invention, and is not construed as limiting the invention.Therefore, any amendment made when without departing from the spirit and scope of the present invention, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.In addition, claims of the present invention be intended to contain fall into claims scope and border or this scope and border equivalents in whole change and modification.

Claims (16)

1. optimize the method that hard disk uses, described method comprises:
Step S100, the space weights of real time record hard drive space;
Step S200, judges whether described space weights exceed space weights higher limit;
Step S300, when described space weights exceed described space weights higher limit, exchanges described hard drive space and space weights lower than the hard drive space of space weights lower limit.
2. method according to claim 1, is characterized in that, described in carry out in the step of exchanging, performing time of exchanging is exchange when two hard drive spaces are all in inactive state.
3. the method according to any one of claim 1-2, is characterized in that, after described hard drive space is exchanged, retains the former space weights of described hard drive space.
4. the method according to claim 1 or 3, is characterized in that, when user to read hard drive space and/or writes, and value that the space weights of hard drive space are reordered.
5. method according to claim 1, is characterized in that, the method that described optimization hard disk uses also comprises applies for based on user the method that hard drive space is optimized, and it comprises:
Step S10, real time scan physical hard disk is to obtain the space weights of hard drive space;
Step S11, judges that whether described space weights are lower than space weights lower limit;
Space weights, when user applies for hard drive space, are preferentially distributed to user's use lower than the hard drive space of space weights lower limit by step S12.
6. method according to claim 1, is characterized in that, the method that described optimization hard disk uses also comprises the method be optimized based on distribution hard drive space size, and it comprises:
Step S20, when user applies for hard drive space, the hard drive space of distributing the first pre-sizing uses to user;
Step S21, judges whether the usage space of user exceedes the hard drive space of the described first pre-sizing;
Step S22, when the hard drive space of usage space pre-sizing more than first of user, by data copy in the hard drive space of the second pre-sizing;
Step S23, judges whether the usage space of user exceedes the hard drive space of the described second pre-sizing;
Step S24, when the hard drive space of usage space pre-sizing more than second of user, by data copy in the hard drive space of the 3rd pre-sizing;
Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of the hard drive space < second of the first pre-sizing.
7. the method according to any one of claim 5-6, is characterized in that, when user applies for hard drive space, uses, the space weights of this hard drive space are subtracted definite value if described hard drive space is not assigned to user.
8. method according to claim 1, is characterized in that, the periodicity that the method that described optimization hard disk uses also comprises physically based deformation hard disk is repartitioned and is optimized, and it comprises:
Step S30, the continuous access times of real time record hard drive space;
Step S31, when the continuous access times of the hard drive space of the first pre-sizing exceed first threshold, next time, when repartitioning described physical hard disk, is repartitioned according to the hard drive space of the second pre-sizing;
Step S32, when the continuous access times of the hard drive space of the second pre-sizing exceed Second Threshold, repartitions according to the hard drive space of the 3rd pre-sizing;
Step S33, when the continuous access times of the hard drive space of the 3rd pre-sizing are lower than the 3rd threshold value, repartitions according to the hard drive space of the first pre-sizing;
Wherein, first threshold >=Second Threshold >=the 3rd threshold value.
9. optimize the system that hard disk uses, it is characterized in that, described system comprises the first optimization module (1), is optimized for the space weights based on hard drive space;
Described first optimizes module (1) comprising:
Weights record cell (100), for the space weights of real time record hard drive space;
First judging unit (200), for judging whether described space weights exceed space weights higher limit;
Exchange unit (300), when the judged result of the first judging unit (200) be described space weights exceed described space weights higher limit time, for described hard drive space and space weights are exchanged lower than the hard drive space of space weights lower limit.
10. system according to claim 9, wherein, exchanging unit (300), to carry out the time that hard drive space exchanges be when two hard drive spaces are in inactive state, performs and exchange operation.
11. systems according to any one of claim 9-10, wherein, after hard drive space is exchanged, retain the original space weights of this hard drive space.
12. systems according to claim 11, wherein, when user to read hard drive space and/or writes, value that the space weights of hard drive space are reordered.
13. systems according to claim 9, is characterized in that, described system also comprises the second optimization module (2), for applying for that hard drive space is optimized based on user;
Described second optimizes module (2) comprising:
Weights scanning element (10), for real time scan physical hard disk to obtain the space weights of hard drive space;
Space weights for judging that whether described space weights are lower than space weights lower limit, and are sent to hard disk allocation units 12 lower than the judged result of space weights lower limit by the second judging unit (11);
Space weights, when user applies for hard drive space, are distributed to user's use lower than the hard drive space of space weights lower limit for preferential by hard disk allocation units (12).
14. systems according to claim 9, is characterized in that, described system also comprises the 3rd and optimizes module (3), for being optimized based on distribution hard drive space size;
Described 3rd optimizes module (3) comprising:
First allocation units (20), when user applies for hard drive space, use to user for the hard drive space of distributing the first pre-sizing;
3rd judging unit (21), for judging whether the usage space of user exceedes the hard drive space of the described first pre-sizing;
Second allocation units (22), when the hard drive space of usage space pre-sizing more than first of user, for by data copy in the hard drive space of the second pre-sizing;
4th judging unit (23), for judging whether the usage space of user exceedes the hard drive space of the described second pre-sizing;
3rd allocation units (24), when the hard drive space of usage space pre-sizing more than second of user, for by data copy in the hard drive space of the 3rd pre-sizing;
Wherein, the hard drive space of the pre-sizing of hard drive space < the 3rd of the pre-sizing of the hard drive space < second of the first pre-sizing.
15. systems according to any one of claim 13-14, is characterized in that, when user applies for hard drive space, use, the space weights of this hard drive space are subtracted definite value if described hard drive space is not assigned to user.
16. systems according to claim 9, is characterized in that, also comprise the 4th and optimize module (4), the periodicity for physically based deformation hard disk is repartitioned and is optimized;
Described 4th optimizes module (4) comprising:
4th record cell (41), for the continuous access times of real time record hard drive space;
4th division unit (42), when the continuous access times for the hard drive space when the first pre-sizing exceed first threshold, next time, when repartitioning described physical hard disk, is repartitioned according to the hard drive space of the second pre-sizing;
5th division unit (43), when the continuous access times for the hard drive space when the second pre-sizing exceed Second Threshold, repartitions according to the hard drive space of the 3rd pre-sizing;
6th division unit (44), during for the continuous access times of the hard drive space when the 3rd pre-sizing lower than the 3rd threshold value, repartitions according to the hard drive space of the first pre-sizing;
Wherein, first threshold >=Second Threshold >=the 3rd threshold value.
CN201510378699.XA 2015-06-30 2015-06-30 Method and system for optimizing hard disk use Pending CN104932988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510378699.XA CN104932988A (en) 2015-06-30 2015-06-30 Method and system for optimizing hard disk use

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510378699.XA CN104932988A (en) 2015-06-30 2015-06-30 Method and system for optimizing hard disk use

Publications (1)

Publication Number Publication Date
CN104932988A true CN104932988A (en) 2015-09-23

Family

ID=54120159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510378699.XA Pending CN104932988A (en) 2015-06-30 2015-06-30 Method and system for optimizing hard disk use

Country Status (1)

Country Link
CN (1) CN104932988A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419842A (en) * 2008-11-07 2009-04-29 成都市华为赛门铁克科技有限公司 Loss equalizing method, apparatus and system for hard disc
US20100131735A1 (en) * 2008-11-27 2010-05-27 Chi Mei Communication Systems, Inc. System and method for managing a memory system of a mobile device
CN102289412A (en) * 2011-09-07 2011-12-21 上海交通大学 Method and system for balancing static abrasion of solid hard disc
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
CN102592678A (en) * 2011-12-30 2012-07-18 记忆科技(深圳)有限公司 Dynamic window management-based wear equilibrium method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419842A (en) * 2008-11-07 2009-04-29 成都市华为赛门铁克科技有限公司 Loss equalizing method, apparatus and system for hard disc
US20100131735A1 (en) * 2008-11-27 2010-05-27 Chi Mei Communication Systems, Inc. System and method for managing a memory system of a mobile device
CN102289412A (en) * 2011-09-07 2011-12-21 上海交通大学 Method and system for balancing static abrasion of solid hard disc
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
CN102592678A (en) * 2011-12-30 2012-07-18 记忆科技(深圳)有限公司 Dynamic window management-based wear equilibrium method and device

Similar Documents

Publication Publication Date Title
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
CN106681835B (en) The method and resource manager of resource allocation
JP5119077B2 (en) Virtual server resource adjustment system, resource adjustment device, virtual server resource adjustment method, and computer program
US9361034B2 (en) Transferring storage resources between snapshot storage pools and volume storage pools in a distributed network
CN103227838B (en) A kind of multi-load equilibrium treatment apparatus and method
CN101221517B (en) Device, system and method for exchanging resources between partitions of a data processing system
EP2725862A1 (en) Resource allocation method and resource management platform
CN102577241A (en) Method, device and system for scheduling distributed buffer resources
CN103179048A (en) Method and system for changing main machine quality of service (QoS) strategies of cloud data center
CN101800873B (en) Method and device for storing video monitoring data
CN104301257A (en) Resource distribution method, device and equipment
CN104102725A (en) Method and system for dynamically creating duplicates of hotspot data files in HDFS (Hadoop distributed file system)
CN116361006A (en) Method and system for collaborative scheduling of computing network resources oriented to memory computing separation
CN102375893A (en) Distributed file system and method for establishing duplicate copy
US10606478B2 (en) High performance hadoop with new generation instances
CN110225088A (en) A kind of cloud desktop management method and system
CN103617024A (en) Concurrent-data processing method, concurrent-data processing device and concurrent-data system
CN109144666A (en) A kind of method for processing resource and system across cloud platform
CN104932988A (en) Method and system for optimizing hard disk use
CN109522129A (en) A kind of resource method for dynamically balancing, device and relevant device
CN115357368A (en) MapReduce job scheduling method based on heterogeneous environment perception
CN101556575B (en) Method for allotting bandwidth of redundant array of independent disks automatically and device thereof
US10649816B2 (en) Elasticity engine for availability management framework (AMF)
CN112395058A (en) Task regulation and control device, method and system
CN109788007B (en) Cloud platform based on two places and three centers and communication method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150923

WD01 Invention patent application deemed withdrawn after publication