WO2020140623A1 - 电子装置、元数据处理方法和计算机可读存储介质 - Google Patents

电子装置、元数据处理方法和计算机可读存储介质 Download PDF

Info

Publication number
WO2020140623A1
WO2020140623A1 PCT/CN2019/118015 CN2019118015W WO2020140623A1 WO 2020140623 A1 WO2020140623 A1 WO 2020140623A1 CN 2019118015 W CN2019118015 W CN 2019118015W WO 2020140623 A1 WO2020140623 A1 WO 2020140623A1
Authority
WO
WIPO (PCT)
Prior art keywords
merged
volume
volumes
data
preset
Prior art date
Application number
PCT/CN2019/118015
Other languages
English (en)
French (fr)
Inventor
宋小兵
姜文峰
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020140623A1 publication Critical patent/WO2020140623A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Definitions

  • the present application relates to the field of distributed storage technology, in particular to an electronic device, a metadata processing method, and a computer-readable storage medium.
  • CEPH distributed file system is a distributed storage system with large capacity, high performance and strong reliability.
  • CEPH provides a snapshot function.
  • the snapshot is a completely available copy of the specified data set, and the copy includes an image of the corresponding data at a certain time point (that is, the time point at which the copy starts).
  • the snapshot can be a copy of the data represented by it, or a copy of the data represented by it.
  • the snapshot function can be used to restore the data in time to restore the data to the state at the time point of the snapshot.
  • the snapshot is only readable, not writeable. For this reason, CEPH also provides a function: cloning function, which clones a clone volume formed by a snapshot operation to be both readable and writable.
  • CEPH's snapshot and cloning operations are as follows:
  • An imageA in CEPH (image, a volume in the CEPH cluster, which is the external representation of CEPH block device resources) includes several data slices (including data slice 1 and data slice 2), and the original volume of image A (ie base image, a volume that has not undergone any snapshot operations), perform a snapshot operation to create snapshot volume 1 (that is, snap1), and then update the data of data slice 1 and data slice 2 from the data slice 1 of the original volume And 2 read the data and copy it to the snapshot volume 1, and save the storage location information of the data slices 1 and 2 in the metadata of the snapshot volume 1, and update the data slices 1 and 2 in the original volume to obtain the new data slice 1 -1 and 2-1.
  • snapshot volume 2 ie, snap2
  • the snapshot operation will read data from image data slice 1-1 and copy to the snapshot In volume 2, the storage location information of the data piece 1-1 is also saved in the metadata of the snapshot volume 2, and the data piece 1-1 in image A is updated to obtain the data piece 1-2.
  • a snapshot chain corresponding to image A ie, snapshot volumes arranged in chronological order
  • clone operation ie, clone operation
  • the main purpose of the present application is to provide an electronic device, a metadata processing method, and a computer-readable storage medium, aimed at increasing the data query speed of a cloned volume.
  • the present application proposes an electronic device including a memory and a processor, and a metadata processing program is stored on the memory, and the metadata processing program is executed by the processor to implement the following steps : First acquisition step: real-time or timed, or when receiving a merge instruction, obtain the performance data of the clone volume to be processed; query step: according to the performance data of each clone volume to be processed, query the pending data that meets the preset merge conditions Clone volume; second obtaining step: when inquired, use all the clone volumes to be processed that meet the preset merge conditions as the volume to be merged, and obtain the metadata and data to be merged of each volume to be merged; the first merge Steps: According to the preset merge rule, perform the merge operation on the metadata of each volume to be merged and the data to be merged separately, and store the merged metadata in the preset storage space.
  • the present application also proposes a metadata processing method.
  • the method includes the following steps: a first acquisition step: real-time or timing, or when a merge instruction is received, to obtain performance data of the clone volume to be processed; Step: According to the performance data of each clone volume to be processed, query the clone volume to be processed that meets the preset merge condition; second acquisition step: when the query is obtained, use all clone volumes to be processed that meet the preset merge condition as The volumes to be merged, and obtain the metadata and data to be merged of each volume to be merged; the first merge step: according to the preset merge rule, merge the metadata and data to be merged of each volume to be merged, and The merged metadata is stored in the preset storage space.
  • the present application also proposes a computer-readable storage medium that stores a metadata processing program, and the metadata processing program may be executed by at least one processor, so that all The at least one processor executes the steps of the metadata processing method according to any one of the above.
  • This application obtains the performance data of the clone volume to be processed in real time or timing, or when receiving the merge instruction; according to the performance data of each clone volume to be processed, query the clone volume to be processed that meets the preset merge conditions; , Take all the clone volumes to be processed that meet the preset merge conditions as the volumes to be merged, and obtain the metadata and data to be merged for each volume to be merged; The data and the data to be merged are merged, and the merged metadata is stored in a preset storage space.
  • this application merges the metadata of the clone volume to be processed that satisfies the preset merge conditions, and stores the merged metadata in the preset storage space, and queries the clone of the merged metadata
  • FIG. 1 is a schematic diagram of an operating environment of an embodiment of an application metadata processing program
  • FIG. 2 is a program module diagram of an embodiment of an application metadata processing program
  • FIG. 3 is a schematic flowchart of an embodiment of a metadata processing method of the present application.
  • This application proposes a metadata processing program.
  • FIG. 1 is a schematic diagram of an operating environment of an embodiment of the metadata processing program 10 of the present application.
  • the metadata processing program 10 is installed and runs in the electronic device 1.
  • the electronic device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a server.
  • the electronic device 1 may include, but is not limited to, a memory 11 and a processor 12 that communicate with each other through a program bus.
  • FIG. 1 shows only the electronic device 1 having components 11 and 12, but it should be understood that not all components shown are required to be implemented, and more or fewer components may be implemented instead.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Cards, flash cards, etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 is used to store application software installed in the electronic device 1 and various types of data, such as program codes of the metadata processing program 10. The memory 11 may also be used to temporarily store data that has been output or will be output.
  • the processor 12 may be a central processing unit (CPU), microprocessor, or other data processing chip, which is used to run program codes or process data stored in the memory 11, such as performing metadata processing Procedure 10 etc.
  • CPU central processing unit
  • microprocessor microprocessor
  • other data processing chip which is used to run program codes or process data stored in the memory 11, such as performing metadata processing Procedure 10 etc.
  • FIG. 2 is a program module diagram of an embodiment of the metadata processing program 10 of the present application.
  • the metadata processing program 10 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and are processed by one or more processors (the processor 12 in this embodiment) Executed to complete this application.
  • the metadata processing program 10 may be divided into a first acquisition module 101, a query module 102, a second acquisition module 103, and a merge module 104.
  • the module referred to in this application refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the metadata processing program 10 in the electronic device 1 than the program, where:
  • the first obtaining module 101 is used to obtain the performance data of the clone volume to be processed in real time or timing, or when a merge instruction is received.
  • the performance data of the clone volume to be processed includes the loading time of the clone volume to be processed, the number of read/write operations per second (Input/output Operations Per Second, IOPS), the read/write operation delay, and the expected access frequency.
  • the expected access frequency may be set by the user in advance, for example, the number of times of daily access to the clone volume to be processed is predicted in advance, and the predicted value is used as the expected access frequency.
  • the query module 102 is configured to query the clone volume to be processed that meets the preset merge condition according to the performance data of each clone volume to be processed.
  • the calculation parameters of each clone volume to be processed may be the same or different.
  • the calculation parameters include a loading time threshold, a loading time adjustment coefficient, a threshold value of the number of read and write operations per second, an adjustment coefficient of the number of read and write operations per second, a read and write operation delay threshold, and a read and write operation delay adjustment coefficient.
  • the above preset formula can be set according to needs, for example, the preset formula includes:
  • S represents the score score
  • A represents the loading time
  • w1 represents the loading time adjustment factor
  • B represents the number of read and write operations per second
  • w2 represents each Read and write operation times adjustment factor in seconds
  • C represents read and write operation delay
  • w3 represents read and write operation delay adjustment coefficient
  • F represents expected access frequency.
  • the second obtaining module 103 is configured to, when found, use all clone volumes to be processed that meet the preset merge conditions as the volumes to be merged, and obtain metadata and data to be merged for each volume to be merged.
  • the step of obtaining the data to be merged of each volume to be merged includes:
  • the data piece identification information of all data pieces contained in a volume to be merged is obtained from the data piece identification information list of the volume to be merged.
  • the metadata of each snapshot volume in the snapshot chain on which the volume to be merged depends and the metadata of the original volume corresponding to the volume to be merged are searched for the corresponding Store location information.
  • the found storage location information corresponding to all the to-be-processed identification information of the volume to be merged is used as the data to be merged of the volume to be merged.
  • the merging module 104 is configured to perform a merging operation on the metadata of each volume to be merged and the data to be merged according to a preset merging rule, and store the merged metadata in a preset storage space.
  • the preset merge rule includes steps S41-S46 (not shown in the figure), where:
  • step S41 according to the metadata and the data to be merged of each volume to be merged, the increase amount and the increase ratio of the merged data of each volume to be merged are calculated.
  • the data volume of the data to be merged and the data volume of the metadata of each volume to be merged are separately counted.
  • the increase of the merged data of a volume to be merged is the data volume of the data to be merged of the volume to be merged, and the merge of the volume to be merged
  • the data increase ratio is the ratio between the increase in the combined data of the volume to be merged and the amount of metadata.
  • step S42 the volume to be merged with which the increase ratio of the merged data is less than a preset ratio is selected.
  • step S43 sort the processed volumes to be merged to obtain a queue of volumes to be merged.
  • step S43 includes:
  • the second sorting index of the volumes to be merged obtained by each screening is calculated according to the first sorting index of the volumes to be merged obtained by each screening and the preset index threshold of the first sorting index. For example, the time difference between the load time of the volume to be merged and the load time threshold is calculated, and the time difference is used as the second ranking index of the volume to be merged.
  • Step S44 Select the volumes to be merged one by one according to the order of the volume queue to be merged, after selecting a volume to be merged, obtain the remaining capacity of the preset storage space, and calculate the remaining capacity and the selected The difference between the increase in the combined data of the volumes to be combined.
  • Step S45 when the difference is greater than or equal to a preset threshold, merge the metadata of the selected volume to be merged with the data of the selected volume to be merged, and use the difference as the preset New remaining capacity of storage space.
  • step S46 it is determined whether there is an unselected volume to be merged in the queue to be merged. When it exists, it returns to step S44, and when it does not exist, the flow ends.
  • This application obtains the performance data of the clone volume to be processed; according to the performance data of each clone volume to be processed, finds the clone volume to be processed that meets the preset merge conditions; Process the cloned volume as the volume to be merged, obtain the metadata and data of each volume to be merged, and then perform the merge operation on the metadata and data of each volume to be merged separately, and store the merged metadata To the preset storage space.
  • this application merges the metadata of the clone volume to be processed that satisfies the preset merge conditions, and stores the merged metadata in the preset storage space, and queries the clone of the merged metadata
  • the metadata processing program 10 further includes a monitoring module (not shown in the figure) for:
  • the remaining capacity of the preset storage space is monitored in real time or periodically, and when the remaining capacity of the preset storage space is less than or equal to a preset capacity threshold, a prompt message is issued.
  • the remaining capacity of the preset storage space is monitored in real time or periodically to effectively prevent the failure of the merge operation due to insufficient remaining capacity.
  • this application proposes a metadata processing method.
  • FIG. 3 is a schematic flowchart of an embodiment of a metadata processing method of the present application.
  • the method includes:
  • step S10 the performance data of the clone volume to be processed is acquired in real time or at a time, or when the merge instruction is received.
  • the performance data of the clone volume to be processed includes the loading time of the clone volume to be processed, the number of read/write operations per second (Input/output Operations Per Second, IOPS), the read/write operation delay, and the expected access frequency.
  • the expected access frequency may be set by the user in advance. For example, the number of times the clone volume to be processed is accessed in advance is predicted in advance, and the predicted value is used as the expected access frequency.
  • Step S20 according to the performance data of each clone volume to be processed, query the clone volume to be processed that meets the preset merge condition.
  • the calculation parameters of each clone volume to be processed may be the same or different.
  • the calculation parameters include a loading time threshold, a loading time adjustment coefficient, a threshold value of the number of read and write operations per second, an adjustment coefficient of the number of read and write operations per second, a read and write operation delay threshold, and a read and write operation delay adjustment coefficient.
  • the above preset formula can be set according to needs, for example, the preset formula includes:
  • S represents the score score
  • A represents the loading time
  • w1 represents the loading time adjustment factor
  • B represents the number of read and write operations per second
  • w2 represents each Read and write operation times adjustment factor in seconds
  • C represents read and write operation delay
  • w3 represents read and write operation delay adjustment coefficient
  • F represents expected access frequency.
  • Step S30 when inquired, use all the clone volumes to be processed that meet the preset merge conditions as the volumes to be merged, and obtain metadata and data to be merged for each volume to be merged.
  • the step of obtaining the data to be merged of each volume to be merged includes:
  • the data piece identification information of all data pieces contained in a volume to be merged is obtained from the data piece identification information list of the volume to be merged.
  • the metadata of each snapshot volume in the snapshot chain on which the volume to be merged depends and the metadata of the original volume corresponding to the volume to be merged are searched for the corresponding Store location information.
  • the found storage location information corresponding to all the to-be-processed identification information of the volume to be merged is used as the data to be merged of the volume to be merged.
  • Step S40 Perform a merge operation on the metadata of each volume to be merged and the data to be merged according to a preset merge rule, and store the merged metadata in a preset storage space.
  • the preset merge rule includes steps S41-S46 (not shown in the figure), where:
  • step S41 according to the metadata and the data to be merged of each volume to be merged, the increase amount and the increase ratio of the merged data of each volume to be merged are calculated.
  • the data volume of the data to be merged and the data volume of the metadata of each volume to be merged are separately counted.
  • the increase of the merged data of a volume to be merged is the data volume of the data to be merged of the volume to be merged, and the merge of the volume to be merged
  • the data increase ratio is the ratio between the increase in the combined data of the volume to be merged and the amount of metadata.
  • step S42 the volume to be merged with which the increase ratio of the merged data is less than a preset ratio is selected.
  • step S43 sort the processed volumes to be merged to obtain a queue of volumes to be merged.
  • step S43 includes:
  • the second sorting index of the volumes to be merged obtained by each screening is calculated according to the first sorting index of the volumes to be merged obtained by each screening and the preset index threshold of the first sorting index. For example, the time difference between the load time of the volume to be merged and the load time threshold is calculated, and the time difference is used as the second ranking index of the volume to be merged.
  • Step S44 Select the volumes to be merged one by one according to the order of the volume queue to be merged, after selecting a volume to be merged, obtain the remaining capacity of the preset storage space, and calculate the remaining capacity and the selected The difference between the increase in the combined data of the volumes to be combined.
  • Step S45 when the difference is greater than or equal to a preset threshold, merge the metadata of the selected volume to be merged with the data of the selected volume to be merged, and use the difference as the preset New remaining capacity of storage space.
  • step S46 it is determined whether there is an unselected volume to be merged in the queue to be merged. When it exists, it returns to step S44, and when it does not exist, the flow ends.
  • This application obtains the performance data of the clone volume to be processed; according to the performance data of each clone volume to be processed, finds the clone volume to be processed that meets the preset merge conditions; Process the cloned volume as the volume to be merged, obtain the metadata and data of each volume to be merged, and then perform the merge operation on the metadata and data of each volume to be merged separately, and store the merged metadata To the preset storage space.
  • this application merges the metadata of the clone volume to be processed that satisfies the preset merge conditions, and stores the merged metadata in the preset storage space, and queries the clone of the merged metadata
  • the method further includes:
  • the remaining capacity of the preset storage space is monitored in real time or periodically, and when the remaining capacity of the preset storage space is less than or equal to a preset capacity threshold, a prompt message is issued.
  • the remaining capacity of the preset storage space is monitored in real time or periodically to effectively prevent the failure of the merge operation due to insufficient remaining capacity.
  • the present application also provides a computer-readable storage medium that stores a metadata processing program, and the metadata processing program may be executed by at least one processor to enable the at least one processing
  • the device executes the metadata processing method in any of the above embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种电子装置、元数据处理方法和计算机可读存储介质。所述方法包括获取待处理克隆卷的性能数据,并根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷,当查询到时,将所有满足预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据,再按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,且将合并后的元数据存储至预设存储空间中。相较于现有技术,提高了克隆卷的数据查询速度。

Description

电子装置、元数据处理方法和计算机可读存储介质
本申请要求于2019年1月4日提交中国专利局,申请号为201910007216.3、发明名称为“电子装置、元数据处理方法和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及分布式存储技术领域,特别涉及一种电子装置、元数据处理方法和计算机可读存储介质。
背景技术
CEPH分布式文件系统是一种容量大、性能高、可靠性强的分布式存储系统。为防范数据丢失,CEPH提供快照功能。其中,快照是对于指定数据集合的一个完全可用拷贝,该拷贝包括相应数据在某个时间点(即拷贝开始的时间点)的映像。快照可以是其所表示数据的副本,也可以是其所表示数据的复制品,当CEPH的存储设备发生故障时,可利用快照功能及时进行数据恢复,将数据恢复为快照产生时间点的状态。但快照是只可读的,不可写。为此,CEPH还提供一种功能:克隆功能,该功能对一快照进行克隆操作所形成的克隆卷既可读,也可写。
CEPH的快照及克隆操作流程如下:
CEPH中一个imageA(image,CEPH集群中的一个卷,是CEPH块设备资源的对外表现)中包括若干个数据片(其中包括数据片1、数据片2),对该image A的原始卷(即base image,未进行过任何的快照操作的卷)进行一次快照操作,创建快照卷1(即snap1),随后若要更新数据片1和数据片2的数据,则需从原始卷的数据片1和2读取数据并拷贝至快照卷1中,同时在快照卷1的元数据中保存该数据片1、2的存储位置信息,并更新原始卷中数据片1和2,得到新数据片1-1和2-1。接着,对image A进行第二次快照操作,创建快照卷2(即snap2)随后更新数据片1-1的数据,快照操作会从image A的数据片1-1中读取 数据并拷贝至快照卷2中,同时在快照卷2的元数据中保存该数据片1-1的存储位置信息,并更新image A中数据片1-1,得到数据片1-2。在对image A进行多次快照操作后,则形成了该image A对应的快照链(即按时间先后顺序排列的快照卷)。
对快照链中的一个快照卷进行克隆操作(即clone操作),形成一个克隆卷。
若要查询克隆卷中一数据片,则首先需查找克隆卷中该数据片对应的存储位置信息,由于克隆卷的元数据中仅保存克隆卷生成后新写入的数据片对应的存储位置信息,对于其他数据片的存储位置信息则需要从该克隆卷对应的快照链中各个快照卷的元数据及image A的元数据中查找;又由于快照链中各个快照卷的元数据以及image A的元数据均分散存储于分布式存储系统的若干个存储节点中,因此,一次查询过程可能需与多个存储节点交互,造成克隆卷的数据查询速度低下。
可见,如何提高克隆卷的数据查询速度成为一个亟待解决的问题。
发明内容
本申请的主要目的是提供一种电子装置、元数据处理方法和计算机可读存储介质,旨在提高克隆卷的数据查询速度。
为实现上述目的,本申请提出一种电子装置,所述电子装置包括存储器和处理器,所述存储器上存储有元数据处理程序,所述元数据处理程序被所述处理器执行时实现如下步骤:第一获取步骤:实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;查询步骤:根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;第二获取步骤:当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;第一合并步骤:按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
此外,为实现上述目的,本申请还提出一种元数据处理方法,该方法包括步骤:第一获取步骤:实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;查询步骤:根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;第二获取步骤:当查询到时,将所有满 足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;第一合并步骤:按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有元数据处理程序,所述元数据处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如上述任一项所述的元数据处理方法的步骤。
本申请实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。相较于现有技术,本申请将满足预设合并条件的待处理克隆卷的元数据进行合并处理,并将合并后的元数据存储至预设存储空间中,在查询已合并元数据的克隆卷中的数据片时,只需在该克隆卷对应的合并后的元数据中查询该数据片的存储位置信息即可,无需与多个存储节点进行交互,因此,提高了克隆卷的数据查询速度。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。
图1为本申请元数据处理程序一实施例的运行环境示意图;
图2为本申请元数据处理程序一实施例的程序模块图;
图3为本申请元数据处理方法一实施例的流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步 说明。
具体实施方式
以下结合附图对本申请的原理和特征进行描述,所举实例只用于解释本申请,并非用于限定本申请的范围。
本申请提出一种元数据处理程序。
请参阅图1,是本申请元数据处理程序10一实施例的运行环境示意图。
在本实施例中,元数据处理程序10安装并运行于电子装置1中。电子装置1可以是桌上型计算机、笔记本、掌上电脑及服务器等计算设备。该电子装置1可包括,但不仅限于,通过程序总线相互通信的存储器11及处理器12。图1仅示出了具有组件11、12的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
存储器11在一些实施例中可以是电子装置1的内部存储单元,例如该电子装置1的硬盘或内存。存储器11在另一些实施例中也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括电子装置1的内部存储单元也包括外部存储设备。存储器11用于存储安装于电子装置1的应用软件及各类数据,例如元数据处理程序10的程序代码等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行元数据处理程序10等。
请参阅图2,是本申请元数据处理程序10一实施例的程序模块图。在本实施例中,元数据处理程序10可以被分割成一个或多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本申请。例如,在图2中,元数据处理程序10可以被分割成第一获取模块101、查询模块102、第二获取模块103及合并模块104。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述元数据处理程序10在电子装置1中的执行过程,其中:
第一获取模块101,用于实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据。
所述待处理克隆卷的性能数据包括所述待处理克隆卷的加载时间、每秒读写操作次数(Input/output Operations Per Second,IOPS)、读写操作延时、预期被访问频率。其中,所述预期被访问频率可预先由用户设置,例如,预先对待处理克隆卷每日被访问次数进行预测,将该预测值作为所述预期被访问频率。
查询模块102,用于根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷。
首先,获取每一个待处理克隆卷的计算参数。不同的待处理克隆卷的计算参数可以相同,也可以不同。
其中,所述计算参数包括加载时间阈值、加载时间调整系数、每秒读写操作次数阈值、每秒读写操作次数调整系数、读写操作延时阈值、读写操作延时调整系数。
接着,将每一个待处理克隆卷的性能数据及计算参数代入至预设公式进行计算,得到每一个待处理克隆卷的评分分值。
其中,上述预设公式可根据需要设置,例如,所述预设公式包括:
S=[(A-A’)×w1+(B’-B)×w2+(C-C’)×w3]×F
其中,S代表评分分值,A代表加载时间,A’代表加载时间阈值,w1代表加载时间调整系数,B代表每秒读写操作次数,B’代表每秒读写操作次数阈值,w2代表每秒读写操作次数调整系数,C代表读写操作延时,C’代表读写操作延时阈值,w3代表读写操作延时调整系数,F代表预期被访问频率。
最后,查询所有所述评分分值满足预设分值条件的待处理克隆卷,当查询到时,确定查询到的所述待处理克隆卷满足预设合并条件。
第二获取模块103,用于当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据。
所述获取每一个待合并卷的待合并数据的步骤包括:
首先,获取一待合并卷所包含的所有数据片的数据片标识信息。例如,从待合并卷的数据片标识信息列表中获取该待合并卷所包含的所有数据片的数据片标识信息。
然后,查询各个数据片标识信息是否存在于该待合并卷的元数据中,将未存储于该待合并卷的元数据中的数据片标识信息作为待处理标识信息。
接着,在确定出所有待处理标识信息后,在该待合并卷所依赖的快照链中各个快照卷的元数据及该待合并卷对应的原始卷的元数据中查找各个待处理标识信息对应的存储位置信息。
最后,将查找出的该待合并卷的所有待处理标识信息对应的存储位置信息作为该待合并卷的待合并数据。
合并模块104,用于按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
所述预设合并规则包括步骤S41~S46(图中未示出),其中:
步骤S41,根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例。
分别统计每一个待合并卷的待合并数据的数据量及元数据的数据量,一待合并卷的合并数据增加量即为该待合并卷的待合并数据的数据量,一待合并卷的合并数据增加比例即是该待合并卷的合并数据增加量与元数据的数据量之间的比值。
步骤S42,筛选出所述合并数据增加比例小于预设比例的待合并卷。
步骤S43,将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列。
其中,步骤S43包括:
从所述性能数据中选择一参数作为第一排序指标,例如,选择加载时间作为第一排序指标。再根据每一个筛选得到的待合并卷的第一排序指标与所述第一排序指标的预设指标阈值,计算每一个筛选得到的待合并卷的第二排序指标。例如,计算一待合并卷的加载时间与加载时间阈值之间的时间差值,将该时间差值作为待合并卷的第二排序指标。最后,根据每一个筛选得到的待合并卷的第二排序指标的大小顺序(例如,按照加载时间与加载时间阈值之间的差值由大到小的顺序,以优先合并加载慢的待合并卷),对所有筛选得到的待合并卷进行排序处理,得到所述待合并卷队列。
步骤S44,按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值。
步骤S45,当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量。
步骤S46,判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回步骤S44,当不存在时,结束流程。
本申请获取待处理克隆卷的性能数据;根据每一个待处理克隆卷的性能数据,查找满足预设合并条件的待处理克隆卷;当查找到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据,再分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。相较于现有技术,本申请将满足预设合并条件的待处理克隆卷的元数据进行合并处理,并将合并后的元数据存储至预设存储空间中,在查询已合并元数据的克隆卷中的数据片时,只需在该克隆卷对应的合并后的元数据中查询该数据片的存储位置信息即可,无需与多个存储节点进行交互,因此,提高了克隆卷的数据查询速度。
进一步地,在本实施例中,该元数据处理程序10还包括监测模块(图中未示出),用于:
实时或定时监测所述预设存储空间的剩余容量,当所述预设存储空间的剩余容量小于或等于预设容量阈值时,发出提示信息。
本实施例实时或定时对预设存储空间的剩余容量进行监测,有效地防止因剩余容量不足造成合并操作失败。
此外,本申请提出一种元数据处理方法。
如图3所示,图3为本申请元数据处理方法一实施例的流程示意图。
本实施例中,该方法包括:
步骤S10,实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据。
所述待处理克隆卷的性能数据包括所述待处理克隆卷的加载时间、每秒读写操作次数(Input/output Operations Per Second,IOPS)、读写操作延时、预期被访问频率。其中,所述预期被访问频率可预先由用户设置,例如,预 先对待处理克隆卷每日被访问次数进行预测,将该预测值作为所述预期被访问频率。
步骤S20,根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷。
首先,获取每一个待处理克隆卷的计算参数。不同的待处理克隆卷的计算参数可以相同,也可以不同。
其中,所述计算参数包括加载时间阈值、加载时间调整系数、每秒读写操作次数阈值、每秒读写操作次数调整系数、读写操作延时阈值、读写操作延时调整系数。
接着,将每一个待处理克隆卷的性能数据及计算参数代入至预设公式进行计算,得到每一个待处理克隆卷的评分分值。
其中,上述预设公式可根据需要设置,例如,所述预设公式包括:
S=[(A-A’)×w1+(B’-B)×w2+(C-C’)×w3]×F
其中,S代表评分分值,A代表加载时间,A’代表加载时间阈值,w1代表加载时间调整系数,B代表每秒读写操作次数,B’代表每秒读写操作次数阈值,w2代表每秒读写操作次数调整系数,C代表读写操作延时,C’代表读写操作延时阈值,w3代表读写操作延时调整系数,F代表预期被访问频率。
最后,查询所有所述评分分值满足预设分值条件的待处理克隆卷,当查询到时,确定查询到的所述待处理克隆卷满足预设合并条件。
步骤S30,当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据。
所述获取每一个待合并卷的待合并数据的步骤包括:
首先,获取一待合并卷所包含的所有数据片的数据片标识信息。例如,从待合并卷的数据片标识信息列表中获取该待合并卷所包含的所有数据片的数据片标识信息。
然后,查询各个数据片标识信息是否存在于该待合并卷的元数据中,将未存储于该待合并卷的元数据中的数据片标识信息作为待处理标识信息。
接着,在确定出所有待处理标识信息后,在该待合并卷所依赖的快照链中各个快照卷的元数据及该待合并卷对应的原始卷的元数据中查找各个待处理标识信息对应的存储位置信息。
最后,将查找出的该待合并卷的所有待处理标识信息对应的存储位置信息作为该待合并卷的待合并数据。
步骤S40,按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
所述预设合并规则包括步骤S41~S46(图中未示出),其中:
步骤S41,根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例。
分别统计每一个待合并卷的待合并数据的数据量及元数据的数据量,一待合并卷的合并数据增加量即为该待合并卷的待合并数据的数据量,一待合并卷的合并数据增加比例即是该待合并卷的合并数据增加量与元数据的数据量之间的比值。
步骤S42,筛选出所述合并数据增加比例小于预设比例的待合并卷。
步骤S43,将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列。
其中,步骤S43包括:
从所述性能数据中选择一参数作为第一排序指标,例如,选择加载时间作为第一排序指标。再根据每一个筛选得到的待合并卷的第一排序指标与所述第一排序指标的预设指标阈值,计算每一个筛选得到的待合并卷的第二排序指标。例如,计算一待合并卷的加载时间与加载时间阈值之间的时间差值,将该时间差值作为待合并卷的第二排序指标。最后,根据每一个筛选得到的待合并卷的第二排序指标的大小顺序(例如,按照加载时间与加载时间阈值之间的差值由大到小的顺序,以优先合并加载慢的待合并卷),对所有筛选得到的待合并卷进行排序处理,得到所述待合并卷队列。
步骤S44,按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值。
步骤S45,当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量。
步骤S46,判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回步骤S44,当不存在时,结束流程。
本申请获取待处理克隆卷的性能数据;根据每一个待处理克隆卷的性能数据,查找满足预设合并条件的待处理克隆卷;当查找到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据,再分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。相较于现有技术,本申请将满足预设合并条件的待处理克隆卷的元数据进行合并处理,并将合并后的元数据存储至预设存储空间中,在查询已合并元数据的克隆卷中的数据片时,只需在该克隆卷对应的合并后的元数据中查询该数据片的存储位置信息即可,无需与多个存储节点进行交互,因此,提高了克隆卷的数据查询速度。
进一步地,在本实施例中,该方法还包括:
实时或定时监测所述预设存储空间的剩余容量,当所述预设存储空间的剩余容量小于或等于预设容量阈值时,发出提示信息。
本实施例实时或定时对预设存储空间的剩余容量进行监测,有效地防止因剩余容量不足造成合并操作失败。
进一步地,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有元数据处理程序,所述元数据处理程序可被至少一个处理器执行,以使所述至少一个处理器执行上述任一实施例中的元数据处理方法。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是在本申请的发明构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。

Claims (20)

  1. 一种电子装置,所述电子装置包括存储器和处理器,其特征在于,所述存储器上存储有元数据处理程序,所述元数据处理程序被所述处理器执行时实现如下步骤:
    第一获取步骤:实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;
    查询步骤:根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;
    第二获取步骤:当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;
    第一合并步骤:按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
  2. 如权利要求1所述的电子装置,其特征在于,所述待处理克隆卷的性能数据包括所述待处理克隆卷的加载时间、每秒读写操作次数、读写操作延时、预期被访问频率。
  3. 如权利要求2所述的电子装置,其特征在于,所述查询步骤包括:
    获取每一个待处理克隆卷的计算参数,所述计算参数包括加载时间阈值、加载时间调整系数、每秒读写操作次数阈值、每秒读写操作次数调整系数、读写操作延时阈值、读写操作延时调整系数;
    将每一个待处理克隆卷的性能数据及计算参数代入至预设公式进行计算,得到每一个待处理克隆卷的评分分值,所述预设公式包括:
    S=[(A-A’)×w1+(B’-B)×w2+(C-C’)×w3]×F
    其中,S代表评分分值,A代表加载时间,A’代表加载时间阈值,w1代表加载时间调整系数,B代表每秒读写操作次数,B’代表每秒读写操作次数阈值,w2代表每秒读写操作次数调整系数,C代表读写操作延时,C’代表读写操作延时阈值,w3代表读写操作延时调整系数,F代表预期被访问频率;
    查询所有所述评分分值满足预设分值条件的待处理克隆卷,当查询到时,确定查询到的所述待处理克隆卷满足预设合并条件。
  4. 如权利要求1所述的电子装置,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  5. 如权利要求2所述的电子装置,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  6. 如权利要求3所述的电子装置,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  7. 如权利要求4-6任一项所述的电子装置,其特征在于,所述排序步骤包括:
    从所述性能数据中选择一参数作为第一排序指标;
    根据每一个筛选得到的待合并卷的第一排序指标与所述第一排序指标的预设指标阈值,计算每一个筛选得到的待合并卷的第二排序指标;
    根据每一个筛选得到的待合并卷的第二排序指标的大小顺序,对所有筛选得到的待合并卷进行排序处理,得到所述待合并卷队列。
  8. 一种元数据处理方法,其特征在于,该方法包括步骤:
    第一获取步骤:实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;
    查询步骤:根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;
    第二获取步骤:当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;
    第一合并步骤:按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
  9. 如权利要求8所述的元数据处理方法,其特征在于,所述待处理克隆卷的性能数据包括所述待处理克隆卷的加载时间、每秒读写操作次数、读写操作延时、预期被访问频率。
  10. 如权利要求9所述的元数据处理方法,其特征在于,所述查询步骤包括:
    获取每一个待处理克隆卷的计算参数,所述计算参数包括加载时间阈值、加载时间调整系数、每秒读写操作次数阈值、每秒读写操作次数调整系数、读写操作延时阈值、读写操作延时调整系数;
    将每一个待处理克隆卷的性能数据及计算参数代入至预设公式进行计算,得到每一个待处理克隆卷的评分分值,所述预设公式包括:
    S=[(A-A’)×w1+(B’-B)×w2+(C-C’)×w3]×F
    其中,S代表评分分值,A代表加载时间,A’代表加载时间阈值,w1代表加载时间调整系数,B代表每秒读写操作次数,B’代表每秒读写操作次数阈值,w2代表每秒读写操作次数调整系数,C代表读写操作延时,C’代表读写操作延时阈值,w3代表读写操作延时调整系数,F代表预期被访问频率;
    查询所有所述评分分值满足预设分值条件的待处理克隆卷,当查询到时,确定查询到的所述待处理克隆卷满足预设合并条件。
  11. 如权利要求8所述的元数据处理方法,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  12. 如权利要求9所述的元数据处理方法,其特征在于,所述预设合并 规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  13. 如权利要求10所述的元数据处理方法,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  14. 如权利要求11-13任一项所述的元数据处理方法,其特征在于,所述 排序步骤包括:
    从所述性能数据中选择一参数作为第一排序指标;
    根据每一个筛选得到的待合并卷的第一排序指标与所述第一排序指标的预设指标阈值,计算每一个筛选得到的待合并卷的第二排序指标;
    根据每一个筛选得到的待合并卷的第二排序指标的大小顺序,对所有筛选得到的待合并卷进行排序处理,得到所述待合并卷队列。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有元数据处理程序,所述元数据处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:
    第一获取步骤:实时或定时,或在接收到合并指令时,获取待处理克隆卷的性能数据;
    查询步骤:根据每一个待处理克隆卷的性能数据,查询满足预设合并条件的待处理克隆卷;
    第二获取步骤:当查询到时,将所有满足所述预设合并条件的待处理克隆卷作为待合并卷,并获取每一个待合并卷的元数据及待合并数据;
    第一合并步骤:按照预设合并规则,分别对每一个待合并卷的元数据及待合并数据进行合并操作,并将合并后的元数据存储至预设存储空间中。
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述待处理克隆卷的性能数据包括所述待处理克隆卷的加载时间、每秒读写操作次数、读写操作延时、预期被访问频率。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述查询步骤包括:
    获取每一个待处理克隆卷的计算参数,所述计算参数包括加载时间阈值、加载时间调整系数、每秒读写操作次数阈值、每秒读写操作次数调整系数、读写操作延时阈值、读写操作延时调整系数;
    将每一个待处理克隆卷的性能数据及计算参数代入至预设公式进行计算,得到每一个待处理克隆卷的评分分值,所述预设公式包括:
    S=[(A-A’)×w1+(B’-B)×w2+(C-C’)×w3]×F
    其中,S代表评分分值,A代表加载时间,A’代表加载时间阈值,w1代表加载时间调整系数,B代表每秒读写操作次数,B’代表每秒读写操作次数 阈值,w2代表每秒读写操作次数调整系数,C代表读写操作延时,C’代表读写操作延时阈值,w3代表读写操作延时调整系数,F代表预期被访问频率;
    查询所有所述评分分值满足预设分值条件的待处理克隆卷,当查询到时,确定查询到的所述待处理克隆卷满足预设合并条件。
  18. 如权利要求15所述的计算机可读存储介质,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  19. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述预设合并规则包括:
    计算步骤:根据每一个待合并卷的元数据及待合并数据,计算每一个待合并卷的合并数据增加量及合并数据增加比例;
    筛选步骤:筛选出所述合并数据增加比例小于预设比例的待合并卷;
    排序步骤:将筛选得到的所述待合并卷进行排序处理,得到待合并卷队列;
    选择步骤:按照所述待合并卷队列的先后顺序,逐一选择所述待合并卷,在选择一待合并卷后,获取所述预设存储空间的剩余容量,计算所述剩余容量与所选的待合并卷的合并数据增加量之间的差值;
    第二合并步骤:当所述差值大于或等于预设阈值时,将所选的待合并卷 的元数据与所选的待合并卷的待合并数据合并,并将所述差值作为所述预设存储空间的新的剩余容量;
    判断步骤:判断所述待合并卷队列中是否存在未被选择过的待合并卷,当存在时,返回所述选择步骤,当不存在时,结束流程。
  20. 如权利要求19所述的计算机可读存储介质,其特征在于,所述排序步骤包括:
    从所述性能数据中选择一参数作为第一排序指标;
    根据每一个筛选得到的待合并卷的第一排序指标与所述第一排序指标的预设指标阈值,计算每一个筛选得到的待合并卷的第二排序指标;
    根据每一个筛选得到的待合并卷的第二排序指标的大小顺序,对所有筛选得到的待合并卷进行排序处理,得到所述待合并卷队列。
PCT/CN2019/118015 2019-01-04 2019-11-13 电子装置、元数据处理方法和计算机可读存储介质 WO2020140623A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910007216.3A CN109885551B (zh) 2019-01-04 2019-01-04 电子装置、元数据处理方法和计算机可读存储介质
CN201910007216.3 2019-01-04

Publications (1)

Publication Number Publication Date
WO2020140623A1 true WO2020140623A1 (zh) 2020-07-09

Family

ID=66925540

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118015 WO2020140623A1 (zh) 2019-01-04 2019-11-13 电子装置、元数据处理方法和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109885551B (zh)
WO (1) WO2020140623A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885551B (zh) * 2019-01-04 2024-03-12 平安科技(深圳)有限公司 电子装置、元数据处理方法和计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160246683A1 (en) * 2015-02-20 2016-08-25 Netapp Inc. Clone volume merging
CN107291883A (zh) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 一种分布式存储系统的快照方法及装置
US20180364950A1 (en) * 2017-06-20 2018-12-20 Vmware, Inc. Supporting file system clones in any ordered key-value store
CN109885551A (zh) * 2019-01-04 2019-06-14 平安科技(深圳)有限公司 电子装置、元数据处理方法和计算机可读存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004265110A (ja) * 2003-02-28 2004-09-24 Hitachi Ltd メタデータ配置方法、プログラムおよびディスク装置
US7483927B2 (en) * 2005-12-01 2009-01-27 International Business Machines Corporation Method for merging metadata on files in a backup storage
CN101788934A (zh) * 2009-01-23 2010-07-28 英业达集团(天津)电子技术有限公司 逻辑卷管理器的数据操作方法
US9916312B1 (en) * 2014-06-30 2018-03-13 EMC IP Holding Company LLC Coordination of file system creation to ensure more deterministic performance characteristics
US9632724B1 (en) * 2015-10-12 2017-04-25 International Business Machines Corporation Point-in-time copy with chain cloning
CN106469084B (zh) * 2016-08-30 2020-06-26 华为技术有限公司 一种链接克隆母卷管理方法和装置
CN107291391B (zh) * 2017-06-21 2021-03-09 郑州云海信息技术有限公司 一种用于分布式存储系统的数据处理方法和系统
CN108647151B (zh) * 2018-04-26 2021-10-29 郑州云海信息技术有限公司 一种全闪系统元数据落盘方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160246683A1 (en) * 2015-02-20 2016-08-25 Netapp Inc. Clone volume merging
CN107291883A (zh) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 一种分布式存储系统的快照方法及装置
US20180364950A1 (en) * 2017-06-20 2018-12-20 Vmware, Inc. Supporting file system clones in any ordered key-value store
CN109885551A (zh) * 2019-01-04 2019-06-14 平安科技(深圳)有限公司 电子装置、元数据处理方法和计算机可读存储介质

Also Published As

Publication number Publication date
CN109885551A (zh) 2019-06-14
CN109885551B (zh) 2024-03-12

Similar Documents

Publication Publication Date Title
US9575984B2 (en) Similarity analysis method, apparatus, and system
US9189487B2 (en) Method for recording transaction log, and database engine
US10826980B2 (en) Command process load balancing system
US11294920B2 (en) Method and apparatus for accessing time series data in memory
US20130132405A1 (en) Dynamically Associating Different Query Execution Strategies with Selective Portions of a Database Table
WO2015180432A1 (zh) 一种聚簇存储方法及装置
US9087094B2 (en) Processing records in dynamic ranges
US10515078B2 (en) Database management apparatus, database management method, and storage medium
US20070143246A1 (en) Method and apparatus for analyzing the effect of different execution parameters on the performance of a database query
CN108459913B (zh) 数据并行处理方法、装置及服务器
US10049034B2 (en) Information processing apparatus
EP4302200A1 (en) Measuring and improving index quality in a distributed data system
WO2020140623A1 (zh) 电子装置、元数据处理方法和计算机可读存储介质
US20230401215A1 (en) Event Sequences Search
CN111459937B (zh) 数据表关联方法、装置、服务器及存储介质
CN112711564A (zh) 合并处理方法以及相关设备
JP2020135189A (ja) データベース管理システム、及び、データベース管理方法
CN114265637A (zh) 档案管理系统配置方法、系统、电子设备以及存储介质
CN113868267A (zh) 注入时序数据的方法、查询时序数据的方法及数据库系统
US12086041B2 (en) Early database transaction visibility
WO2024119980A1 (zh) 一种数据分析方法及相关设备
CN108733678A (zh) 一种数据搜索的方法、装置和相关设备
CN110209884B (zh) 一种索引校对方法和装置
CN114756626A (zh) 数据处理方法、装置、设备以及存储介质
CN114116614A (zh) 日志存储方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19907593

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19907593

Country of ref document: EP

Kind code of ref document: A1