Method for processing snapshots and distributed block storage system
AssigneeZte Corporation
InventorsGuangyan Zhang, Shengmei Luo, Tao Du, Hongzhang Yang
Life of this patent
Estimating the term…
Abstract
A method for processing snapshots and a distributed block storage system, the method including: acquiring the number of read operations and the number of read/write operations for a data block in a distributed block storage system; on the basis of the number of read operations and the number of read/write operations, determining a target snapshot manner, wherein the target snapshot manner includes copying while writing or re-orienting while writing; on the basis of the target snapshot manner, performing a snapshot operation on the data block in the distributed block storage system.
Claims11
A method for processing snapshots, which is applied to a distributed block storage system, the method comprising:
- acquiring number of read operations and number of read/write operations for data block in the distributed block storage system;
- determining a target snapshot manner based on the number of read operations and the number of read/write operations, wherein the target snapshot manner comprises Copy On Write or Redirect On Write;
- and
- performing a snapshot operation on the data block in the distributed block storage system based on the target snapshot manner,
- wherein the step of determining the target snapshot manner based on the number of read operations and the number of read/write operations comprises:
- determining whether a preset parameter value of the number of read operations and the number of read/write operations is larger than or equal to a first preset threshold value, wherein the preset parameter value is a ratio of the number of read operations and the number of read/write operations or a difference between the number of read operations and the number of read/write operations;
- determining the target snapshot manner as Copy On Write, when the preset parameter value of the number of read operations and the number of read/write operations is larger than or equal to the first preset threshold value;
- and
- determining the target snapshot manner as Redirect On Write, when the preset parameter value of the number of read operations and the number of read/write operations is less than the first preset threshold value, and
- before the step of determining the target snapshot manner as Redirect On Write, the method further comprising:
- determining whether the preset parameter value of the number of read operations and the number of read/write operations is larger than a second preset threshold value, wherein the second preset threshold value is less than the first preset threshold value;
- determining whether a front-end load value is larger than a preset load threshold value, when the preset parameter value of the number of read operations and the number of read/write operations is larger than the second preset threshold value, wherein the front-end load value is a load value of a data server storing the data block;
- determining the target snapshot manner as Copy On Write, when the front-end load value is less than or equal to the preset load threshold value;
- and
- performing the step of determining the target snapshot manner as Redirect On Write, when the front-end load value is larger than the preset load threshold value or when the preset parameter value of the number of read operations and the number of read/write operations is less than or equal to the second preset threshold value.
A distributed block storage system, comprising:
- a processor configured to execute computer-executable instructions comprising:
- a data acquiring module configured to acquire number of read operations and number of read/write operations for data block in the distributed block storage system;
- a snapshot manner determining module configured to determine a target snapshot manner based on the number of read operations and the number of read/write operations, wherein the target snapshot manner comprises Copy On Write or Redirect On Write;
- and
- a processing module configured to perform a snapshot operation on the data block in the distributed block storage system based on the target snapshot manner,
- wherein the snapshot manner determining module comprises:
- a first judging unit configured to determine whether a preset parameter value of the number of read operations and the number of read/write operations is larger than or equal to a first preset threshold value, wherein the preset parameter value is a ratio of the number of read operations and the number of read/write operations or a difference between the number of read operations and the number of read/write operations;
- a first determining unit configured to determine the target snapshot manner as Copy On Write, when the preset parameter value of the number of read operations and the number of read/write operations is larger than or equal to the first preset threshold value;
- and
- a second determining unit configured to determine the target snapshot manner as Redirect On Write, when the preset parameter value of the number of read operations and the number of read/write operations is less than the first preset threshold value, and
- wherein the snapshot manner determining module further comprises:
- a second judging unit configured to determine whether the preset parameter value of the number of read operations and the number of read/write operations is larger than a second preset threshold value, wherein the second preset threshold value is less than the first preset threshold value;
- a third judging unit configured to determine whether a front-end load value is larger than a preset load threshold value, when the preset parameter value of the number of read operations and the number of read/write operations is larger than the second preset threshold value, wherein the front-end load value is a load value of a data server storing the data block;
- a third determining unit configured to determine the target snapshot manner as Copy On Write, when the front-end load value is less than or equal to the preset load threshold value;
- and
- a performing unit configured to perform a step of determining the target snapshot manner as Redirect On Write, when the front-end load value is larger than the preset load threshold value or when the preset parameter value of the number of read operations and the number of read/write operations is less than or equal to the second preset threshold value.
Dependencies are inferred from the claim text.