CN109343793A - Data migration method and device - Google Patents

Data migration method and device Download PDF

Info

Publication number
CN109343793A
CN109343793A CN201811054720.0A CN201811054720A CN109343793A CN 109343793 A CN109343793 A CN 109343793A CN 201811054720 A CN201811054720 A CN 201811054720A CN 109343793 A CN109343793 A CN 109343793A
Authority
CN
China
Prior art keywords
migration
amount
migrated
data segment
server
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
CN201811054720.0A
Other languages
Chinese (zh)
Other versions
CN109343793B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811054720.0A priority Critical patent/CN109343793B/en
Priority to CN202111188799.8A priority patent/CN113961145A/en
Publication of CN109343793A publication Critical patent/CN109343793A/en
Application granted granted Critical
Publication of CN109343793B publication Critical patent/CN109343793B/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This specification one or more embodiment discloses a kind of data migration method and device, to improve the migration success rate and migration performance of data segment.The described method includes: determining the first quantity of the data segment to be migrated when migrating the data segment to be migrated in first server to second server;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined;Wherein, the migration strategy includes at least migration number and/or single the amount of migration;The data segment to be migrated is migrated to the second server according to the migration strategy.

Description

Data migration method and device
Technical field
This specification is related to technical field of data processing more particularly to a kind of data migration method and device.
Background technique
In the cache cluster that tradition solves data balancing by Hash slot principle, often according to server total amount The data segment that single server should store is calculated with Hash slot total amount, and each server can safeguard a itself managed The data segment of reason.The data segment that every server needs to safeguard can be recalculated when newly-increased server, and according to calculated result Data segment is adjusted, after the migration for completing data segment, legacy server safeguards the data segment after the data segment for needing to migrate and migration, The data segment that the maintenance of new demand servicing device needs to move into.
In the prior art, the data segment that the mode of data mean allocation safeguards server is generallyd use to migrate. For example it is assumed that cluster server quantity is n, the data segment quantity of each server maintenance is h/n before migration, when server needs When dilatation, it is assumed that increase t server, then the data segment quantity of each server maintenance is h/ (n+t), original each clothes The data segment quantity that business device needs to migrate is (h/n)-h/ (n+t).In the transition process of data segment, if moving with data segment Move the growth of quantity, it is easy to which the significant change for causing server stability indicator even results in server and stops response.
Summary of the invention
The purpose of this specification one or more embodiment is to provide a kind of data migration method and device, to improve number According to the migration success rate and migration performance of section.
In order to solve the above technical problems, this specification one or more embodiment is achieved in that
On the one hand, this specification one or more embodiment provides a kind of data migration method, comprising:
When migrating the data segment to be migrated in first server to second server, the data segment to be migrated is determined The first quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined; Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
In one embodiment, the preset condition includes at least one of the following:
The maximum the amount of migration is less than or equal to the first preset threshold;
When migrating the maximum the amount of migration data segment to be migrated, specified ginseng relevant to the first server Several changing values is no more than the second preset threshold.
In one embodiment, described according to first quantity and the maximum the amount of migration, it determines for described wait move Move the migration strategy of data segment, comprising:
If first quantity is less than or equal to the maximum the amount of migration, it is determined that the migration strategy is directly will be described Data segment to be migrated is migrated to the second server;
It is true according to first quantity and the maximum the amount of migration if first quantity is greater than the maximum the amount of migration The migration number and/or single the amount of migration of the fixed data segment to be migrated.
In one embodiment, described according to first quantity and the maximum the amount of migration is determined to the number to be migrated According to the migration number and/or single the amount of migration of section, comprising:
Calculate the quotient and/or remainder of first quantity and the maximum the amount of migration;
The migration number is determined according to the quotient and/or remainder.
In one embodiment, described according to first quantity and the maximum the amount of migration is determined to the number to be migrated It is described to be migrated the data segment to be migrated to the second service according to the migration strategy after the migration number of section Device, comprising:
Create the migration time migration task several, for migrating the data segment to be migrated;
Determine the corresponding single the amount of migration of each migration task, the single the amount of migration be less than or equal to it is described most Big the amount of migration;
According to the single the amount of migration, the migration task is executed respectively.
On the other hand, this specification one or more embodiment provides a kind of data migration device, comprising:
First determining module, for when migrating the data segment to be migrated in first server to second server, really First quantity of the fixed data segment to be migrated;And determine that the corresponding maximum for meeting preset condition of the first server is moved Shifting amount;
Second determining module, for determining for described to be migrated according to first quantity and the maximum the amount of migration The migration strategy of data segment;Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
Transferring module, for being migrated the data segment to be migrated to the second server according to the migration strategy.
In one embodiment, the preset condition includes at least one of the following:
The maximum the amount of migration is less than or equal to the first preset threshold;
When migrating the maximum the amount of migration data segment to be migrated, specified ginseng relevant to the first server Several changing values is no more than the second preset threshold.
In one embodiment, second determining module includes:
First determination unit, if being less than or equal to the maximum the amount of migration for first quantity, it is determined that described to move Strategy is moved directly to migrate the data segment to be migrated to the second server;
Second determination unit, if being greater than the maximum the amount of migration for first quantity, according to first quantity And the maximum the amount of migration determines migration number and/or the single migration of the data segment to be migrated.
In one embodiment, second determination unit is also used to:
Calculate the quotient and/or remainder of first quantity and the maximum the amount of migration;
The migration number is determined according to the quotient and/or remainder.
In one embodiment, the transferring module includes:
Creating unit, for described according to first quantity and the maximum the amount of migration is determined to the data to be migrated After the migration number of section, the migration time migration task several, for migrating the data segment to be migrated is created;
Third determination unit, for determining the corresponding single the amount of migration of each migration task, the single migration Amount is less than or equal to the maximum the amount of migration;
Execution unit, for executing the migration task respectively according to the single the amount of migration.
In another aspect, this specification one or more embodiment provides a kind of Data Migration equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
When migrating the data segment to be migrated in first server to second server, the data segment to be migrated is determined The first quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined; Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
In another aspect, the embodiment of the present application provides a kind of storage medium, for storing computer executable instructions, it is described can It executes instruction and realizes following below scheme when executed:
When migrating the data segment to be migrated in first server to second server, the data segment to be migrated is determined The first quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined; Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
It, can be by the number to be migrated in first server using the technical solution of this specification one or more embodiment When migrating according to section to second server, determines the first quantity of data segment to be migrated and first server is corresponding meets default item The maximum the amount of migration of part, and then the migration strategy for being directed to data segment to be migrated is determined according to the first quantity and maximum the amount of migration, and Data segment to be migrated is migrated to second server according to migration strategy.Wherein, migration strategy include at least migration number and/or Single the amount of migration.As it can be seen that the technical solution in migrating data section, is not simple disposable complete all data segments of migration, But the quantity of data segment to be migrated and the maximum the amount of migration of server are fully considered, therefore can be avoided because of disposable migration Caused server performance is unstable when all data segments, even stops the problem of response, thus improve the migration of data segment at Power.
Further, which can create multiple migration tasks, and the single the amount of migration of each migration task is equal Less than or equal to the maximum the amount of migration of server, therefore can be avoided the migration in same migration task is more than maximum the amount of migration Caused server performance is unstable when data segment, even stops the problem of response, and the task amount due to individually migrating task Become smaller, therefore more migration tasks can be opened, to promote the migration performance of data segment.
Detailed description of the invention
In order to illustrate more clearly of this specification one or more embodiment or technical solution in the prior art, below will A brief introduction will be made to the drawings that need to be used in the embodiment or the description of the prior art, it should be apparent that, it is described below Attached drawing is only some embodiments recorded in this specification one or more embodiment, and those of ordinary skill in the art are come It says, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the schematic flow chart according to a kind of data migration method of one embodiment of this specification;
Fig. 2 is the schematic flow chart according to a kind of data migration method of one specific embodiment of this specification;
Fig. 3 is the schematic block diagram according to a kind of data migration device of one embodiment of this specification;
Fig. 4 is the schematic block diagram according to a kind of Data Migration equipment of one embodiment of this specification.
Specific embodiment
This specification one or more embodiment provides a kind of data migration method and device, to improve moving for data segment Move into power and migration performance.
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment, Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than Whole embodiments.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creativeness The model of this specification one or more embodiment protection all should belong in every other embodiment obtained under the premise of labour It encloses.
Fig. 1 be according to a kind of schematic flow chart of data migration method of one embodiment of this specification, as shown in Figure 1, This method comprises:
S102 determines data to be migrated when migrating the data segment to be migrated in first server to second server First quantity of section;And determine the corresponding maximum the amount of migration for meeting preset condition of first server.
S104 determines the migration strategy for being directed to data segment to be migrated according to the first quantity and maximum the amount of migration.
Wherein, migration strategy includes at least migration number and/or single the amount of migration.
S106 migrates data segment to be migrated to second server according to migration strategy.
It, can be by the number to be migrated in first server using the technical solution of this specification one or more embodiment When migrating according to section to second server, determines the first quantity of data segment to be migrated and first server is corresponding meets default item The maximum the amount of migration of part, and then the migration strategy for being directed to data segment to be migrated is determined according to the first quantity and maximum the amount of migration, and Data segment to be migrated is migrated to second server according to migration strategy.Wherein, migration strategy include at least migration number and/or Single the amount of migration.As it can be seen that the technical solution in migrating data section, is not simple disposable complete all data segments of migration, But the quantity of data segment to be migrated and the maximum the amount of migration of server are fully considered, therefore can be avoided because of disposable migration Caused server performance is unstable when all data segments, even stops the problem of response, thus improve the migration of data segment at Power.
The data migration method that above-described embodiment described in detail below improves.
When migrating the data segment to be migrated in first server to second server, firstly, determining data to be migrated First quantity of section, and, determine the corresponding maximum the amount of migration for meeting preset condition of first server.Wherein, preset condition Including at least one in (1)-(2):
(1) maximum the amount of migration is less than or equal to the first preset threshold.Wherein, the setting about the first preset threshold, can also With reference to parameter relevant to first server, that is, if when the first preset threshold data segment of migration, it should not be to first server The stability of performance impacts, and can be appointed by reference to the speed of service of first server, memory size, response in transition process The variation of the parameters such as the duration of business is to determine whether that the stability to the performance of first server impacts.
(2) when migrating maximum the amount of migration data segment to be migrated, the variation of specified parameter relevant to first server Value is no more than the second preset threshold.Wherein, specified parameter can be the speed of service of first server, memory size, response times Any one or more parameters for influencing server stability such as the duration of business.
The setting of the above-mentioned preset condition for (1)-(2), can avoid the transport number of data segment to a certain extent Measure stability that is larger and influencing server performance.
In one embodiment, the first quantity of data segment to be migrated can be determined according to such as under type: if cluster server Quantity is n, and the data segment quantity of each server maintenance is h/n before migration, when server needs dilatation, it is assumed that increase t Server, then the data segment quantity of each server maintenance is h/ (n+t), then the number that original each server needs to migrate It is (h/n)-h/ (n+t) according to segment number, that is, the first quantity of data segment to be migrated is (h/n)-h/ (n+t).
It is moved in the corresponding maximum for meeting preset condition of the first quantity and first server for determining data segment to be migrated After shifting amount, the migration strategy for being directed to data segment to be migrated is determined according to the first quantity and maximum the amount of migration.Wherein, migration strategy It may include migration number and/or single the amount of migration.
In one embodiment, if the first quantity of data segment to be migrated is less than or equal to maximum the amount of migration, it is determined that move Strategy is moved directly to migrate data segment to be migrated to second server.In the present embodiment, the first quantity of data segment to be migrated Less than or equal to maximum the amount of migration, illustrating can't be right when disposably migrating all data segments to be migrated to second server The stability of the performance of first server impacts.
If the first quantity of data segment to be migrated is greater than maximum the amount of migration, determined according to the first quantity and maximum the amount of migration The migration number and/or single the amount of migration of data segment to be migrated.In the present embodiment, the first quantity of data segment to be migrated is greater than most Big the amount of migration, and while disposably migrating maximum the amount of migration data segment to be migrated, can make the stability of the performance of first server It at influence, therefore in this case, needs to treat migrating data section and is repeatedly migrated, and single the amount of migration is less than or equal to most Big the amount of migration.
In one embodiment, the migration number for treating migrating data section is determined according to the first quantity and maximum the amount of migration When, the quotient and/or remainder of the first quantity and maximum the amount of migration can be calculated, and then determine to treat according to quotient and/or remainder and move Move the migration number of data segment.Specifically, the quotient of first quantity and maximum the amount of migration is to be migrated if remainder is 0 The migration number of data segment, and single the amount of migration is maximum the amount of migration;If remainder is not zero, the first quantity and maximum the amount of migration Quotient add 1 value to be to treat the migration number of migrating data section, and wherein primary single the amount of migration and remainder phase to be moved Deng other single the amount of migration time to be moved are maximum the amount of migration.
For example, cluster server quantity is n, the data segment quantity of each server maintenance is h/n, first service before migration The maximum the amount of migration of device is q.When server needs dilatation, it is assumed that increase t server, then the number of each server maintenance It is h/ (n+t) according to segment number, then the data segment quantity that original each server needs to migrate is (h/n)-h/ (n+t), that is, to First quantity of migrating data section is (h/n)-h/ (n+t).
It, can be directly a to be migrated by (h/n)-h/ (n+t) as q > (h/n)-h/ (n+t) or q=(h/n)-h/ (n+t) Data segment is migrated to second server.
As q < (h/n)-h/ (n+t), the quotient and/or remainder of the first quantity and maximum the amount of migration are calculated, that is, is calculated The value of [(h/n)-h/ (n+t)]/q.If the value of [(h/n)-h/ (n+t)]/q is integer, i.e. remainder is zero, then can determine to be migrated The migration number of data segment is [(h/n)-h/ (n+t)]/q, and single the amount of migration is q;If the value of [(h/n)-h/ (n+t)]/q is not Integer, i.e. remainder are not zero (assuming that remainder is x), then can determine that the migration number of data segment to be migrated is [(h/n)-h/ (n+ T)]/q+1, wherein once single the amount of migration to be moved is x, other single the amount of migration to be moved is q.
In one embodiment, the single the amount of migration for treating migrating data section is determined according to the first quantity and maximum the amount of migration When, it may be determined that the single the amount of migration of migrating data section is treated as the value less than or equal to maximum the amount of migration.Optionally, determination is treated The single the amount of migration of migrating data section is equal to maximum the amount of migration, then can migrate maximum every time when migrating data segment to be migrated The amount of migration data segment to be migrated, until migrating all data segments to be migrated to second server.
After determining migration strategy, data segment to be migrated is migrated to second server according to migration strategy.It can specifically press Migrating data section is treated according to following steps to be migrated:
Firstly, creation migrates time migration task several, for migrating data segment to be migrated.
Secondly, determining the corresponding single the amount of migration of each migration task.
Wherein, single the amount of migration is less than or equal to maximum the amount of migration, and maximum the amount of migration meets in following preset condition extremely One item missing:
(1) maximum the amount of migration is less than or equal to the first preset threshold.Wherein, the setting about the first preset threshold can be joined Examine parameter relevant to first server, that is, if when the first preset threshold data segment of migration, it should not be to the property of first server The stability of energy impacts, can be by reference to the speed of service of first server, memory size, response task in transition process The parameters such as duration variation to determine whether that the stability to the performance of first server impacts.
(2) when migrating maximum the amount of migration data segment to be migrated, the variation of specified parameter relevant to first server Value is no more than the second preset threshold.Wherein, specified parameter can be the speed of service of first server, memory size, response times Any one or more parameters for influencing server stability such as the duration of business.
Finally, executing migration task respectively according to identified single the amount of migration.
In the step, migration task can be successively executed according to specified sequence, specifically, can be suitable according to the creation of migration task Sequence successively executes migration task;Alternatively, according to the corresponding single the amount of migration of each migration task number successively execute migration task, If multiple migration tasks correspond to identical single the amount of migration, multiple migration tasks can be successively executed according to random sequence.
The present embodiment can create multiple migration tasks, and the single the amount of migration of each migration task is respectively less than or is equal to clothes It is engaged in the maximum the amount of migration of device, therefore can be avoided in same migration task when migration is more than the data segment of maximum the amount of migration and cause Server performance it is unstable, even stop the problem of response, can and since the task amount for individually migrating task becomes smaller More migration tasks are opened, to promote the migration performance of data segment.
Fig. 2 is according to a kind of schematic flow chart of data migration method of one specific embodiment of this specification, such as Fig. 2 institute Show, this method comprises:
S201 determines data to be migrated when migrating the data segment to be migrated in first server to second server The corresponding maximum the amount of migration of the quantity and first server of section.
Wherein, maximum the amount of migration meets at least one in following preset condition:
(1) maximum the amount of migration is less than or equal to the first preset threshold.Wherein, the setting about the first preset threshold can be joined Examine parameter relevant to first server, that is, if when the first preset threshold data segment of migration, it should not be to the property of first server The stability of energy impacts, can be by reference to the speed of service of first server, memory size, response task in transition process The parameters such as duration variation to determine whether that the stability to the performance of first server impacts.
(2) when migrating maximum the amount of migration data segment to be migrated, the variation of specified parameter relevant to first server Value is no more than the second preset threshold.Wherein, specified parameter can be the speed of service of first server, memory size, response times Any one or more parameters for influencing server stability such as the duration of business.
The step can determine the quantity of data segment to be migrated as follows: if cluster server quantity is n, before migration The data segment quantity of each server maintenance is h/n, when server needs dilatation, it is assumed that increase t server, then each The data segment quantity of server maintenance is h/ (n+t), then the data segment quantity that original each server needs to migrate is (h/ N)-h/ (n+t), that is, the quantity of data segment to be migrated is (h/n)-h/ (n+t).
S202, judges whether the quantity of data segment to be migrated is greater than the corresponding maximum the amount of migration of first server.If so, Execute S203;If it is not, then executing S208.
S203 calculates the quantity of data segment to be migrated and the quotient and/or remainder of maximum the amount of migration.
Quantity based on above-mentioned calculated data segment to be migrated is (h/n)-h/ (n+t), it is assumed that first server is corresponding Maximum the amount of migration be q, then the quotient of the quantity of data segment to be migrated and maximum the amount of migration is [(h/n)-h/ (n+t)]/q.
S204 determines the migration number for treating migrating data section according to quotient and/or remainder.
The quotient of quantity and maximum the amount of migration based on above-mentioned data segment to be migrated is [(h/n)-h/ (n+t)]/q, if The value of [(h/n)-h/ (n+t)]/q is integer, i.e. remainder is zero, then can determine that the migration number of data segment to be migrated is [(h/ n)-h/(n+t)]/q;If the value of [(h/n)-h/ (n+t)]/q is not integer, i.e., remainder is not zero (assuming that remainder is x), then may be used The migration number for determining data segment to be migrated is [(h/n)-h/ (n+t)]/q+1.
S205, creation migrate time migration task several, for migrating data segment to be migrated.
S206 determines the corresponding single the amount of migration of each migration task.
Wherein, single the amount of migration is less than or equal to the corresponding maximum the amount of migration of first server.
The example above is continued to use, if the migration number of data segment to be migrated is [(h/n)-h/ (n+t)]/q, single the amount of migration For q;If the migration number of data segment to be migrated is [(h/n)-h/ (n+t)]/q+1, wherein once single the amount of migration to be moved For x, other single the amount of migration to be moved is q.
S207 executes each migration task according to identified single the amount of migration respectively.
S208 directly migrates data segment to be migrated to second server.
In the present embodiment, it can be determined when migrating the data segment to be migrated in first server to second server The corresponding maximum the amount of migration of the quantity and first server of data segment to be migrated, and then according to the quantity of data segment to be migrated and most Big the amount of migration determines the migration number for being directed to data segment to be migrated, and is migrated data segment to be migrated to second according to migration number Server.As it can be seen that the technical solution in migrating data section, is not simple disposable complete all data segments of migration, but It has fully considered the quantity of data segment to be migrated and the maximum the amount of migration of first server, therefore can be avoided because of disposable migration Caused first server performance is unstable when all data segments, even stops the problem of response, to improve moving for data segment Move into power.
To sum up, the specific embodiment of this theme is described.Other embodiments are in the appended claims In range.In some cases, the movement recorded in detail in the claims can execute and still in a different order Desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or continuous suitable Sequence, to realize desired result.In some embodiments, multitasking and parallel processing can be advantageous.
The above are the data migration methods that this specification one or more embodiment provides, and are based on same thinking, this theory Bright book one or more embodiment also provides a kind of data migration device.
Fig. 3 is according to a kind of schematic flow chart of data migration device of one specific embodiment of this specification, such as Fig. 3 institute Show, data migration device 300 includes:
First determining module 310, for when migrating the data segment to be migrated in first server to second server, Determine the first quantity of data segment to be migrated;And determine the corresponding maximum the amount of migration for meeting preset condition of first server;
Second determining module 320, for determining moving for data segment to be migrated according to the first quantity and maximum the amount of migration Move strategy;Wherein, migration strategy includes at least migration number and/or single the amount of migration;
Transferring module 330, for being migrated data segment to be migrated to second server according to migration strategy.
In one embodiment, preset condition includes at least one of the following:
Maximum the amount of migration is less than or equal to the first preset threshold;
When migrating maximum the amount of migration data segment to be migrated, the changing value of specified parameter relevant to first server is not More than the second preset threshold.
In one embodiment, the second determining module 320 includes:
First determination unit, if being less than or equal to maximum the amount of migration for the first quantity, it is determined that migration strategy is direct Data segment to be migrated is migrated to second server;
Second determination unit, if being greater than maximum the amount of migration for the first quantity, according to the first quantity and maximum the amount of migration Determine migration number and/or the single migration of data segment to be migrated.
In one embodiment, the second determination unit is also used to:
Calculate the quotient and/or remainder of the first quantity and maximum the amount of migration;
Migration number is determined according to quotient and/or remainder.
In one embodiment, transferring module 330 includes:
Creating unit, for determined according to the first quantity and maximum the amount of migration treat migrating data section migration number it Afterwards, creation migrates time migration task several, for migrating data segment to be migrated;
Third determination unit, for determining the corresponding single the amount of migration of each migration task, single the amount of migration be less than or Equal to maximum the amount of migration;
Execution unit, for executing migration task respectively according to single the amount of migration.
It, can be by the data segment to be migrated in first server using the device of this specification one or more embodiment When migrating to second server, the first quantity of data segment to be migrated and the corresponding preset condition that meets of first server are determined Maximum the amount of migration, and then the migration strategy for being directed to data segment to be migrated is determined according to the first quantity and maximum the amount of migration, and according to Migration strategy migrates data segment to be migrated to second server.Wherein, migration strategy includes at least migration number and/or single The amount of migration.As it can be seen that the technical solution in migrating data section, is not simple disposable complete all data segments of migration, but It has fully considered the quantity of data segment to be migrated and the maximum the amount of migration of server, therefore can be avoided because disposable migration is all Caused server performance is unstable when data segment, even stops the problem of response, to improve the migration success rate of data segment.
It should be understood that above-mentioned data migration device can be used to realize Data Migration side above Method, datail description therein should be described with method part above it is similar, it is cumbersome to avoid, do not repeat separately herein.
Based on same thinking, this specification one or more embodiment also provides a kind of Data Migration equipment, such as Fig. 4 institute Show.Data Migration equipment can generate bigger difference because configuration or performance are different, may include one or more Processor 401 and memory 402 can store one or more storage application programs or data in memory 402.Its In, memory 402 can be of short duration storage or persistent storage.Be stored in memory 402 application program may include one or More than one module (diagram is not shown), each module may include executable to the series of computation machine in Data Migration equipment Instruction.Further, processor 401 can be set to communicate with memory 402, execute memory in Data Migration equipment Series of computation machine executable instruction in 402.Data Migration equipment can also include one or more power supplys 403, one A or more than one wired or wireless network interface 404, one or more input/output interfaces 405, one or one with Upper keyboard 406.
Specifically in the present embodiment, Data Migration equipment includes memory and one or more program, In one perhaps more than one program is stored in memory and one or more than one program may include one or one With upper module, and each module may include and being configured to the series of computation machine executable instruction in Data Migration equipment With by one or more than one processor execute this or more than one program include can for carrying out following computer It executes instruction:
When migrating the data segment to be migrated in first server to second server, the data segment to be migrated is determined The first quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined; Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
Optionally, the preset condition includes at least one of the following:
The maximum the amount of migration is less than or equal to the first preset threshold;
When migrating the maximum the amount of migration data segment to be migrated, specified ginseng relevant to the first server Several changing values is no more than the second preset threshold.
Optionally, computer executable instructions when executed, can also make processor:
If first quantity is less than or equal to the maximum the amount of migration, it is determined that the migration strategy is directly will be described Data segment to be migrated is migrated to the second server;
It is true according to first quantity and the maximum the amount of migration if first quantity is greater than the maximum the amount of migration The migration number and/or single the amount of migration of the fixed data segment to be migrated.
Optionally, computer executable instructions when executed, can also make processor:
Calculate the quotient and/or remainder of first quantity and the maximum the amount of migration;
The migration number is determined according to the quotient and/or remainder.
Optionally, computer executable instructions when executed, can also make processor:
It is described according to first quantity and the maximum the amount of migration determines the migration number to the data segment to be migrated Later, the migration time migration task several, for migrating the data segment to be migrated is created;
Determine the corresponding single the amount of migration of each migration task, the single the amount of migration be less than or equal to it is described most Big the amount of migration;
According to the single the amount of migration, the migration task is executed respectively.
This specification one or more embodiment also proposed a kind of computer readable storage medium, this is computer-readable to deposit Storage media stores one or more programs, which includes instruction, and it is included multiple application programs which, which works as, Electronic equipment when executing, the electronic equipment can be made to execute above-mentioned data migration method, and be specifically used for executing:
When migrating the data segment to be migrated in first server to second server, the data segment to be migrated is determined The first quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined; Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when specification one or more embodiment.
It should be understood by those skilled in the art that, this specification one or more embodiment can provide for method, system or Computer program product.Therefore, complete hardware embodiment can be used in this specification one or more embodiment, complete software is implemented The form of example or embodiment combining software and hardware aspects.Moreover, this specification one or more embodiment can be used one It is a or it is multiple wherein include computer usable program code computer-usable storage medium (including but not limited to disk storage Device, CD-ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more embodiment is referring to according to the method for the embodiment of the present application, equipment (system) and meter The flowchart and/or the block diagram of calculation machine program product describes.It should be understood that can be realized by computer program instructions flow chart and/ Or the combination of the process and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can These computer program instructions are provided at general purpose computer, special purpose computer, Embedded Processor or other programmable datas The processor of equipment is managed to generate a machine, so that holding by the processor of computer or other programmable data processing devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
This specification one or more embodiment can computer executable instructions it is general on It hereinafter describes, such as program module.Generally, program module includes executing particular task or realization particular abstract data type Routine, programs, objects, component, data structure etc..The application can also be practiced in a distributed computing environment, at these In distributed computing environment, by executing task by the connected remote processing devices of communication network.In distributed computing In environment, program module can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above is only this specification one or more embodiments, are not limited to this specification.For this field For technical staff, this specification one or more embodiment can have various modifications and variations.It is all in this specification one or Any modification, equivalent replacement, improvement and so within the spirit and principle of multiple embodiments, should be included in this specification one Within the scope of the claims of a or multiple embodiments.

Claims (12)

1. a kind of data migration method, comprising:
When migrating the data segment to be migrated in first server to second server, the of the data segment to be migrated is determined One quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined;Wherein, The migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
2. according to the method described in claim 1, the preset condition includes at least one of the following:
The maximum the amount of migration is less than or equal to the first preset threshold;
When migrating the maximum the amount of migration data segment to be migrated, specified parameter relevant to the first server Changing value is no more than the second preset threshold.
3. determining and being directed to institute according to the method described in claim 1, described according to first quantity and the maximum the amount of migration State the migration strategy of data segment to be migrated, comprising:
If first quantity is less than or equal to the maximum the amount of migration, it is determined that the migration strategy is directly by described wait move Data segment is moved to migrate to the second server;
If first quantity is greater than the maximum the amount of migration, institute is determined according to first quantity and the maximum the amount of migration State the migration number and/or single the amount of migration of data segment to be migrated.
4. according to the method described in claim 3, described according to first quantity and the maximum the amount of migration is determined to described The migration number and/or single the amount of migration of data segment to be migrated, comprising:
Calculate the quotient and/or remainder of first quantity and the maximum the amount of migration;
The migration number is determined according to the quotient and/or remainder.
It is described according to first quantity and the maximum the amount of migration is determined to institute 5. the method according to claim 3 or 4 It is described to be migrated the data segment to be migrated to described according to the migration strategy after the migration number for stating data segment to be migrated Second server, comprising:
Create the migration time migration task several, for migrating the data segment to be migrated;
Determine that the corresponding single the amount of migration of each migration task, the single the amount of migration are less than or equal to the maximum and move Shifting amount;
According to the single the amount of migration, the migration task is executed respectively.
6. a kind of data migration device, comprising:
First determining module, for determining institute when migrating the data segment to be migrated in first server to second server State the first quantity of data segment to be migrated;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
Second determining module, for determining and being directed to the data to be migrated according to first quantity and the maximum the amount of migration The migration strategy of section;Wherein, the migration strategy includes at least migration number and/or single the amount of migration;
Transferring module, for being migrated the data segment to be migrated to the second server according to the migration strategy.
7. device according to claim 6, the preset condition is included at least one of the following:
The maximum the amount of migration is less than or equal to the first preset threshold;
When migrating the maximum the amount of migration data segment to be migrated, specified parameter relevant to the first server Changing value is no more than the second preset threshold.
8. device according to claim 6, second determining module include:
First determination unit, if being less than or equal to the maximum the amount of migration for first quantity, it is determined that the migration plan Slightly directly the data segment to be migrated is migrated to the second server;
Second determination unit, if being greater than the maximum the amount of migration for first quantity, according to first quantity and institute State migration number and/or single migration that maximum the amount of migration determines the data segment to be migrated.
9. device according to claim 8, second determination unit is also used to:
Calculate the quotient and/or remainder of first quantity and the maximum the amount of migration;
The migration number is determined according to the quotient and/or remainder.
10. device according to claim 8 or claim 9, the transferring module include:
Creating unit, for described according to first quantity and the maximum the amount of migration is determined to the data segment to be migrated After migrating number, the migration time migration task several, for migrating the data segment to be migrated is created;
Third determination unit, for determining that the corresponding single the amount of migration of each migration task, the single the amount of migration are small In or equal to the maximum the amount of migration;
Execution unit, for executing the migration task respectively according to the single the amount of migration.
11. a kind of Data Migration equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
When migrating the data segment to be migrated in first server to second server, the of the data segment to be migrated is determined One quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined;Wherein, The migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
12. a kind of storage medium, for storing computer executable instructions, the executable instruction is realized following when executed Process:
When migrating the data segment to be migrated in first server to second server, the of the data segment to be migrated is determined One quantity;And determine the corresponding maximum the amount of migration for meeting preset condition of the first server;
According to first quantity and the maximum the amount of migration, the migration strategy for being directed to the data segment to be migrated is determined;Wherein, The migration strategy includes at least migration number and/or single the amount of migration;
The data segment to be migrated is migrated to the second server according to the migration strategy.
CN201811054720.0A 2018-09-11 2018-09-11 Data migration method and device Active CN109343793B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811054720.0A CN109343793B (en) 2018-09-11 2018-09-11 Data migration method and device
CN202111188799.8A CN113961145A (en) 2018-09-11 2018-09-11 Data migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811054720.0A CN109343793B (en) 2018-09-11 2018-09-11 Data migration method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111188799.8A Division CN113961145A (en) 2018-09-11 2018-09-11 Data migration method and device

Publications (2)

Publication Number Publication Date
CN109343793A true CN109343793A (en) 2019-02-15
CN109343793B CN109343793B (en) 2021-09-07

Family

ID=65304856

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111188799.8A Pending CN113961145A (en) 2018-09-11 2018-09-11 Data migration method and device
CN201811054720.0A Active CN109343793B (en) 2018-09-11 2018-09-11 Data migration method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202111188799.8A Pending CN113961145A (en) 2018-09-11 2018-09-11 Data migration method and device

Country Status (1)

Country Link
CN (2) CN113961145A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555014A (en) * 2019-09-06 2019-12-10 中国联合网络通信集团有限公司 Data migration method and system, electronic device and storage medium
CN111142788A (en) * 2019-11-29 2020-05-12 浪潮电子信息产业股份有限公司 Data migration method and device and computer readable storage medium
CN111857544A (en) * 2019-04-26 2020-10-30 鸿富锦精密电子(天津)有限公司 Storage resource management device and management method
CN111930724A (en) * 2020-10-14 2020-11-13 腾讯科技(深圳)有限公司 Data migration method and device, storage medium and electronic equipment
CN114546995A (en) * 2022-04-25 2022-05-27 孔智科技(徐州)有限公司 Dynamic data migration method and system based on graph database

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102286A1 (en) * 2010-10-26 2012-04-26 Holt Keith W Methods and structure for online migration of data in storage systems comprising a plurality of storage devices
CN103024034A (en) * 2012-12-11 2013-04-03 华为技术有限公司 Scheduling method and device
CN103500073A (en) * 2013-10-08 2014-01-08 浪潮(北京)电子信息产业有限公司 Method and device for data block migration
US20140059359A1 (en) * 2012-08-21 2014-02-27 Micron Technology, Inc. Power management
CN105242967A (en) * 2015-09-29 2016-01-13 上海新储集成电路有限公司 Method for carrying out data migration on hybrid memory in multi-core system based on DVFS technology
CN105843820A (en) * 2015-01-16 2016-08-10 阿里巴巴集团控股有限公司 Data migration method and device
CN106293509A (en) * 2016-07-12 2017-01-04 乐视控股(北京)有限公司 Date storage method and system
CN106502576A (en) * 2015-09-06 2017-03-15 中兴通讯股份有限公司 Migration strategy method of adjustment, capacity change suggesting method and device
US20180088807A1 (en) * 2016-09-23 2018-03-29 EMC IP Holding Company LLC Method and device for migrating data
CN108469982A (en) * 2018-03-12 2018-08-31 华中科技大学 A kind of online moving method of container

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446790B (en) * 2014-07-15 2019-10-18 华为技术有限公司 A kind of virtual machine migration method and device
CN107229657A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 Data migration method and device
CN108228672B (en) * 2016-12-22 2022-05-03 阿里巴巴集团控股有限公司 Metadata migration method, device, system and equipment
CN107391031B (en) * 2017-06-27 2020-05-08 北京邮电大学 Data migration method and device in computing system based on hybrid storage

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102286A1 (en) * 2010-10-26 2012-04-26 Holt Keith W Methods and structure for online migration of data in storage systems comprising a plurality of storage devices
US20140059359A1 (en) * 2012-08-21 2014-02-27 Micron Technology, Inc. Power management
CN103024034A (en) * 2012-12-11 2013-04-03 华为技术有限公司 Scheduling method and device
CN103500073A (en) * 2013-10-08 2014-01-08 浪潮(北京)电子信息产业有限公司 Method and device for data block migration
CN105843820A (en) * 2015-01-16 2016-08-10 阿里巴巴集团控股有限公司 Data migration method and device
CN106502576A (en) * 2015-09-06 2017-03-15 中兴通讯股份有限公司 Migration strategy method of adjustment, capacity change suggesting method and device
CN105242967A (en) * 2015-09-29 2016-01-13 上海新储集成电路有限公司 Method for carrying out data migration on hybrid memory in multi-core system based on DVFS technology
CN106293509A (en) * 2016-07-12 2017-01-04 乐视控股(北京)有限公司 Date storage method and system
US20180088807A1 (en) * 2016-09-23 2018-03-29 EMC IP Holding Company LLC Method and device for migrating data
CN108469982A (en) * 2018-03-12 2018-08-31 华中科技大学 A kind of online moving method of container

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857544A (en) * 2019-04-26 2020-10-30 鸿富锦精密电子(天津)有限公司 Storage resource management device and management method
CN111857544B (en) * 2019-04-26 2024-05-17 富联精密电子(天津)有限公司 Storage resource management device and management method
CN110555014A (en) * 2019-09-06 2019-12-10 中国联合网络通信集团有限公司 Data migration method and system, electronic device and storage medium
CN110555014B (en) * 2019-09-06 2022-04-15 中国联合网络通信集团有限公司 Data migration method and system, electronic device and storage medium
CN111142788A (en) * 2019-11-29 2020-05-12 浪潮电子信息产业股份有限公司 Data migration method and device and computer readable storage medium
CN111142788B (en) * 2019-11-29 2021-10-15 浪潮电子信息产业股份有限公司 Data migration method and device and computer readable storage medium
CN111930724A (en) * 2020-10-14 2020-11-13 腾讯科技(深圳)有限公司 Data migration method and device, storage medium and electronic equipment
CN111930724B (en) * 2020-10-14 2021-03-16 腾讯科技(深圳)有限公司 Data migration method and device, storage medium and electronic equipment
CN114546995A (en) * 2022-04-25 2022-05-27 孔智科技(徐州)有限公司 Dynamic data migration method and system based on graph database
CN114546995B (en) * 2022-04-25 2022-07-15 孔智科技(徐州)有限公司 Dynamic data migration method and system based on graph database

Also Published As

Publication number Publication date
CN113961145A (en) 2022-01-21
CN109343793B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN109343793A (en) Data migration method and device
CN109005125A (en) Dynamic current limiting method, apparatus and system
CN109144699A (en) Distributed task dispatching method, apparatus and system
CN107391526A (en) A kind of data processing method and equipment based on block chain
CN110134668A (en) Data migration method, device and equipment applied to block chain
CN106201673B (en) A kind of seismic data processing technique and device
CN110262847A (en) Application program launching accelerated method, device and machine readable storage medium
CN109407964A (en) A kind of moving method of data, device and equipment
CN109510852A (en) The method and device of gray scale publication
CN109857516A (en) Cluster moving method and device based on container
CN113516246A (en) Parameter optimization method, quantum chip control method and device
CN109003090A (en) risk control method and device
CN109272400A (en) Method for processing resource and device
CN106657182A (en) Cloud file processing method and cloud file processing device
CN110515734A (en) The load processing method and device of data processing task
CN110245978A (en) Policy evaluation, policy selection method and device in tactful group
CN108399089A (en) The display methods and device of view interface
CN109388644A (en) A kind of data-updating method and device
CN109409527A (en) Data processing method, device, system and storage medium
CN110083602A (en) A kind of method and device of data storage and data processing based on hive table
CN108804210A (en) A kind of resource allocation method and device of cloud platform
CN109101514A (en) Data lead-in method and device
CN109885425A (en) Backup method, back-up device, storage medium and the processor of data
CN108921375A (en) A kind of data processing method and device
CN109086362A (en) The management method of multimode project

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
TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant