[go: up one dir, main page]

CN108255432A - Write operation control method, system, device and storage medium based on bedding storage - Google Patents

Write operation control method, system, device and storage medium based on bedding storage Download PDF

Info

Publication number
CN108255432A
CN108255432A CN201810030038.1A CN201810030038A CN108255432A CN 108255432 A CN108255432 A CN 108255432A CN 201810030038 A CN201810030038 A CN 201810030038A CN 108255432 A CN108255432 A CN 108255432A
Authority
CN
China
Prior art keywords
written
write operation
write
data
ponds
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810030038.1A
Other languages
Chinese (zh)
Inventor
贺计文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810030038.1A priority Critical patent/CN108255432A/en
Publication of CN108255432A publication Critical patent/CN108255432A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools

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)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a kind of write operation control method, system, device and storage medium based on bedding storage, including:When receiving write operation requests, the type in the corresponding base ponds of data to be written is judged;If pond is deleted in base ponds to entangle, the type of the corresponding write operation of write operation requests is judged, when write operation is write for covering, be written into data write-in cache ponds, and base ponds are written in data to be written in the form of entangling and delete;If base ponds are copy pond, data write-in cache ponds are written into, and base ponds are written in data to be written in the form of copy.When reaching the preset standard of base ponds type and write operation type in the application, so that this part data to be written preserved in cache ponds and base ponds are consistent, reduce Data Migration pressure when cache ponds reach water level using space, file system is made to keep a smoother performance, improves user experience.

Description

基于分层存储的写操作控制方法、系统、装置及存储介质Write operation control method, system, device and storage medium based on hierarchical storage

技术领域technical field

本发明涉及存储技术领域,特别是涉及一种基于分层存储的写操作控制方法、系统、装置及存储介质。The present invention relates to the field of storage technology, in particular to a method, system, device and storage medium for controlling writing operations based on hierarchical storage.

背景技术Background technique

随着类似于SSD(Solid State Drives,固态硬盘)这样的高性能存储设备的出现,分层存储技术在企业存储市场中变得越来越重要。分层存储通过使用性能高的存储设备作为缓存池(cache池)存放热点数据、性能低容量高的存储设备作为后备池(base池)存放冷数据来提升分布式文件系统整体的性能。在writeback模式中,对于写请求,客户端将数据写入缓存池就返回,缓存池的使用空间达到预设的水位阈值时,执行数据迁移操作,将缓存池中存储的变冷的数据刷到后备池,然后把它们从缓存池中移除。With the emergence of high-performance storage devices such as SSDs (Solid State Drives, solid state drives), tiered storage technologies are becoming more and more important in the enterprise storage market. Hierarchical storage improves the overall performance of the distributed file system by using high-performance storage devices as cache pools (cache pools) to store hot data, and low-performance high-capacity storage devices as backup pools (base pools) to store cold data. In writeback mode, for a write request, the client writes the data into the cache pool and returns it. When the used space of the cache pool reaches the preset water level threshold, the data migration operation is performed to flush the cooled data stored in the cache pool to backing pool, and remove them from the buffer pool.

可见,现有技术中,对于writeback模式,初始写入时,分布式文件系统的性能很高,然而当缓存池的使用空间到达水位时,数据要迁移到后备池,数据迁移压力较大,再加上客户端的读写压力,严重降低了访问性能。It can be seen that in the prior art, for the writeback mode, the performance of the distributed file system is very high during the initial write, but when the used space of the cache pool reaches the water level, the data must be migrated to the backup pool, and the data migration pressure is high, and then Coupled with the read and write pressure of the client, the access performance is seriously reduced.

因此如何提供一种解决上述技术问题的方案是本领域技术人员目前需要解决的问题。Therefore, how to provide a solution to the above-mentioned technical problems is a problem that those skilled in the art need to solve at present.

发明内容Contents of the invention

本发明的目的是提供一种基于分层存储的写操作控制方法、系统、装置及存储介质,达到base池类型和写操作类型的预设标准时,使得cache池和base池中保存的这部分待写入数据是一致的,降低了cache池使用空间到达水位时的数据迁移压力,使文件系统保持一个较平滑的性能,提升了用户体验。The object of the present invention is to provide a write operation control method, system, device, and storage medium based on hierarchical storage. When the preset standards of the base pool type and the write operation type are reached, the cache pool and the base pool save the part to be stored. The written data is consistent, which reduces the data migration pressure when the cache pool usage space reaches the water level, maintains a smoother performance of the file system, and improves the user experience.

为解决上述技术问题,本发明提供了一种基于分层存储的写操作控制方法,包括:In order to solve the above technical problems, the present invention provides a write operation control method based on hierarchical storage, including:

在接收到写操作请求时,判断待写入数据对应的base池的类型;When receiving a write operation request, determine the type of the base pool corresponding to the data to be written;

如果所述base池为纠删池,则判断所述写操作请求对应的写操作的类型,当所述写操作为覆盖写时,将所述待写入数据写入cache池,并把所述待写入数据以纠删的形式写入所述base池;If the base pool is an erasure pool, then judge the type of the write operation corresponding to the write operation request, and when the write operation is overwriting, write the data to be written into the cache pool, and write the The data to be written is written to the base pool in the form of erasure correction;

如果所述base池为副本池,则将所述待写入数据写入cache池,并把所述待写入数据以副本的形式写入所述base池。If the base pool is a copy pool, write the data to be written into the cache pool, and write the data to be written into the base pool in the form of a copy.

优选地,所述判断所述写操作请求对应的写操作的类型的过程具体为:Preferably, the process of judging the type of the write operation corresponding to the write operation request is specifically:

在do_op调用init_op_flags函数获取所述写操作请求对应的写操作的类型。Call the init_op_flags function in do_op to obtain the type of the write operation corresponding to the write operation request.

优选地,所述把所述待写入数据以纠删或副本的形式写入所述base池的过程具体为:Preferably, the process of writing the data to be written into the base pool in the form of erasure correction or copy is specifically:

调用do_proxy_write函数直接把所述待写入数据以纠删或副本的形式写入所述base池。Call the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure correction or copy.

优选地,所述调用do_proxy_write函数直接把所述待写入数据以纠删或副本的形式写入所述base池之前,该方法还包括:Preferably, before calling the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure correction or copy, the method also includes:

调用maybe_handle_cache函数封装maybe_handle_cache_detail函数;Call the maybe_handle_cache function to encapsulate the maybe_handle_cache_detail function;

调用所述maybe_handle_cache_detail函数引入代理写入模式。Call the maybe_handle_cache_detail function to introduce proxy write mode.

为解决上述技术问题,本发明还提供了一种基于分层存储的写操作控制系统,包括:In order to solve the above technical problems, the present invention also provides a write operation control system based on hierarchical storage, including:

判断模块,用于在接收到写操作请求时,判断待写入数据对应的base池的类型;如果所述base池为纠删池,则触发纠删代理写入单元,如果所述base池为副本池,则触发副本代理写入单元;Judging module, used to judge the type of the base pool corresponding to the data to be written when receiving the write operation request; if the base pool is an erasure correction pool, then trigger the erasure correction proxy write unit, if the base pool is Replica pool, trigger the replica agent to write to the unit;

所述纠删代理写入单元,用于判断所述写操作请求对应的写操作的类型,当所述写操作为覆盖写时,将所述待写入数据写入cache池,并把所述待写入数据以纠删的形式写入所述base池;The erasure correction proxy writing unit is used to judge the type of the write operation corresponding to the write operation request, and when the write operation is overwriting, write the data to be written into the cache pool, and write the The data to be written is written to the base pool in the form of erasure correction;

所述副本代理写入单元,用于将所述待写入数据写入cache池,并把所述待写入数据以副本的形式写入所述base池。The copy proxy writing unit is configured to write the data to be written into the cache pool, and write the data to be written into the base pool in the form of a copy.

优选地,所述纠删代理写入单元具体用于在do_op调用init_op_flags函数获取所述写操作请求对应的写操作的类型。Preferably, the erasure correction proxy writing unit is specifically configured to call the init_op_flags function in the do_op to obtain the type of the write operation corresponding to the write operation request.

优选地,所述纠删代理写入单元或所述副本代理写入单元具体用于调用do_proxy_write函数直接把所述待写入数据以纠删或副本的形式写入所述base池。Preferably, the erasure correction proxy write unit or the copy proxy write unit is specifically configured to call the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure correction or copy.

优选地,该系统还包括调用单元,用于调用maybe_handle_cache函数封装maybe_handle_cache_detail函数;调用所述maybe_handle_cache_detail函数引入代理写入模式。Preferably, the system further includes a calling unit, for calling the maybe_handle_cache function to encapsulate the maybe_handle_cache_detail function; calling the maybe_handle_cache_detail function to introduce the agent writing mode.

为解决上述技术问题,本发明还提供了一种基于分层存储的写操作控制装置,包括:In order to solve the above technical problems, the present invention also provides a write operation control device based on hierarchical storage, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现上述任一项所述写操作控制方法的步骤。A processor, configured to implement the steps of any one of the writing operation control methods described above when executing the computer program.

为解决上述技术问题,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述写操作控制方法的步骤。In order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned write operations can be realized The steps of the control method.

本发明提供了一种基于分层存储的写操作控制方法,包括:在接收到写操作请求时,判断待写入数据对应的base池的类型;如果base池为纠删池,则判断写操作请求对应的写操作的类型,当写操作为覆盖写时,将待写入数据写入cache池,并把待写入数据以纠删的形式写入base池;如果base池为副本池,则将待写入数据写入cache池,并把待写入数据以副本的形式写入base池。The present invention provides a write operation control method based on hierarchical storage, comprising: when receiving a write operation request, judging the type of the base pool corresponding to the data to be written; if the base pool is an erasure pool, judging the write operation The type of write operation corresponding to the request. When the write operation is an overwrite, write the data to be written into the cache pool, and write the data to be written into the base pool in the form of erasure; if the base pool is a copy pool, then Write the data to be written into the cache pool, and write the data to be written into the base pool in the form of a copy.

相比于现有技术中分布式文件系统初始性能高后续性能低,本申请中客户端向cache池发起写操作,达到base池类型和写操作类型的预设标准时,将待写入数据写入cache池,同时把待写入数据写入base池,使得cache池和base池中保存的这部分数据是一致的,从而降低了cache池使用空间到达水位时的数据迁移压力,使分布式文件系统保持一个较平滑的性能,提升了用户体验。Compared with the distributed file system in the prior art, the initial performance is high and the follow-up performance is low. In this application, the client initiates a write operation to the cache pool. When the preset standards for the base pool type and write operation type are reached, the data to be written is written to cache pool, and write the data to be written into the base pool at the same time, so that the data stored in the cache pool and the base pool are consistent, thereby reducing the data migration pressure when the space used by the cache pool reaches the water level, and making the distributed file system Maintain a smoother performance and improve user experience.

本发明还提供了一种基于分层存储的写操作控制系统、装置及存储介质,与上述写操作控制方法具有相同的有益效果。The present invention also provides a write operation control system, device and storage medium based on layered storage, which have the same beneficial effect as the above write operation control method.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the prior art and the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本发明提供的一种基于分层存储的写操作控制方法的过程流程图;Fig. 1 is a process flow chart of a write operation control method based on hierarchical storage provided by the present invention;

图2为本发明提供的一种基于分层存储的写操作控制系统的结构示意图。FIG. 2 is a schematic structural diagram of a write operation control system based on hierarchical storage provided by the present invention.

具体实施方式Detailed ways

本发明的核心是提供一种基于分层存储的写操作控制方法、系统、装置及存储介质,达到base池类型和写操作类型的预设标准时,使得cache池和base池中保存的这部分待写入数据是一致的,降低了cache池使用空间到达水位时的数据迁移压力,使文件系统保持一个较平滑的性能,提升了用户体验。The core of the present invention is to provide a write operation control method, system, device, and storage medium based on layered storage. The written data is consistent, which reduces the data migration pressure when the cache pool usage space reaches the water level, maintains a smoother performance of the file system, and improves the user experience.

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

请参照图1,图1为本发明提供的一种基于分层存储的写操作控制方法的过程流程图,该方法包括:Please refer to FIG. 1. FIG. 1 is a process flow diagram of a method for controlling write operations based on hierarchical storage provided by the present invention. The method includes:

步骤S11:在接收到写操作请求时,判断待写入数据对应的base池的类型;Step S11: When a write operation request is received, determine the type of the base pool corresponding to the data to be written;

需要说明的是,分层存储,又称为分级存储,可将存储空间划分为不同的存储级别,根据分层存储管理策略将数据存放在不同的存储级别上,满足用户对处理速度、传输带宽和存储容量的多样需求,以达到合理利用存储空间、提升存储系统访问性能、降低总体部署成本的目的。It should be noted that hierarchical storage, also known as hierarchical storage, can divide the storage space into different storage levels, and store data in different storage levels according to the hierarchical storage management strategy to meet the user's requirements for processing speed and transmission bandwidth. In order to achieve the purpose of rationally utilizing storage space, improving storage system access performance, and reducing overall deployment costs.

配置分层功能时需要建立不同的磁盘池,来配置不同类型的存储介质。基于此,分层存储的分布式文件系统至少需要3个池子,1个元数据池,1个后备池,1个缓存池,其中,1个池子对应一种冗余规则,一般元数据池是副本池,后备池是纠删池或者副本池,缓存池是副本池。缓存池作为后备池的缓存,对客户端来说,缓存池是不可见的。When configuring the tiering function, you need to create different disk pools to configure different types of storage media. Based on this, a distributed file system with hierarchical storage needs at least 3 pools, 1 metadata pool, 1 backup pool, and 1 cache pool. Among them, 1 pool corresponds to a redundancy rule, and the general metadata pool is The copy pool, the backup pool is an erasure pool or copy pool, and the buffer pool is a copy pool. The cache pool is used as the cache of the backup pool, and the cache pool is invisible to the client.

另外,这里的分级存储管理策略可以支持读操作请求对应的数据可根据最近访问时间进行升级的机制:对于读操作请求,如果为最近访问时间内的数据,则将数据升级,否则不升级。该机制减少了数据的回迁频率,减少了不必要的数据回迁导致的系统损耗,同时还提升了高性能存储设备的使用寿命。分级存储管理策略还可以支持基于存储空间的高低水位法,高低水位法要求对存储设备的使用空间进行实时监控,判断高性能存储设备的使用空间是否达到一定的水位阈值,当使用空间到达水位阈值时触发执行数据迁移操作。In addition, the hierarchical storage management strategy here can support the mechanism that the data corresponding to the read operation request can be upgraded according to the latest access time: for the read operation request, if the data is within the latest access time, the data will be upgraded, otherwise it will not be upgraded. This mechanism reduces the frequency of data fetching, reduces system loss caused by unnecessary data fetching, and also improves the service life of high-performance storage devices. Hierarchical storage management strategies can also support the high and low water level method based on storage space. The high and low water level method requires real-time monitoring of the space used by storage devices to determine whether the space used by high-performance storage devices has reached a certain water level threshold. When the used space reaches the water level threshold triggers the execution of data migration operations.

步骤S12:如果base池为纠删池,则判断写操作请求对应的写操作的类型,当写操作为覆盖写时,将待写入数据写入cache池,并把待写入数据以纠删的形式写入base池;如果base池为副本池,则将待写入数据写入cache池,并把待写入数据以副本的形式写入base池。Step S12: If the base pool is an erasure pool, determine the type of the write operation corresponding to the write operation request, and when the write operation is an overwrite, write the data to be written into the cache pool, and write the data to be written as an erasure If the base pool is a copy pool, the data to be written is written to the cache pool, and the data to be written is written to the base pool in the form of a copy.

具体地,考虑到纠删有回滚操作,比如纠删4+2,一份数据切分成4份,生成2份校验码,6份数据会写入6个节点的磁盘,6分数据全部写成功才算成功,如果某个节点写入失败,整个写操作就是失败的,必须回滚到写入前的状态,否则就会出现有的节点是新数据,有的节点是旧数据的情况,导致磁盘上保存的数据与实际的数据不一致。Specifically, considering that there is a rollback operation for erasure correction, such as erasure correction 4+2, one piece of data is divided into 4 pieces, 2 pieces of verification code are generated, 6 pieces of data will be written to the disks of 6 nodes, and all 6 pieces of data Successful writing is considered successful. If a node fails to write, the entire write operation will fail and must be rolled back to the state before writing. Otherwise, some nodes will have new data and some nodes will have old data. , resulting in inconsistency between the data saved on the disk and the actual data.

因此,base池是纠删池时,需要判断接收到的写操作请求对应的写操作的类型,当写操作为覆盖写时,将待写入数据写入cache池后返回,并把待写入数据以纠删的形式代理写入base池,可见,cache池和base池中保存的这部分数据是一致的,从而降低了cache池的使用空间到达水位时的数据迁移压力,使得分布式文件系统可以保持一个较平滑的性能。此外,writeback模式下,缓存不命中时,本申请中不再等该对象从base池提升(promote)到cache池中,然后写入cache池,而是直接把数据写入cache池并代理写入base池,降低了写操作的延迟,提高了写操作的性能。如果写操作不是覆盖写,比如是修改写,则沿用现有技术的方法,判断缓存是否命中,缓存命中时,直接修改cache池中的待修改数据,缓存不命中时,将待修改数据从base池提升到cache池,在cache池修改待修改数据。Therefore, when the base pool is an erasure pool, it is necessary to determine the type of the write operation corresponding to the received write operation request. The data is written to the base pool in the form of erasure correction. It can be seen that the data stored in the cache pool and the base pool are consistent, thereby reducing the data migration pressure when the cache pool’s usage space reaches the water level, making the distributed file system A smoother performance can be maintained. In addition, in writeback mode, when the cache misses, this application no longer waits for the object to be promoted from the base pool to the cache pool, and then writes it into the cache pool, but directly writes the data into the cache pool and writes it on behalf of The base pool reduces the latency of write operations and improves the performance of write operations. If the write operation is not overwriting, such as modifying, then use the method of the existing technology to determine whether the cache is hit. When the cache hits, directly modify the data to be modified in the cache pool. The pool is promoted to the cache pool, and the data to be modified is modified in the cache pool.

具体地,副本不需要对数据切片,写入的都是一整份完整的数据,有一份数据写入成功就算成功,没有回滚操作,所以不用区分写操作的类型。基于此,base池是副本池时,直接将待写入数据写入cache池后返回,并把待写入数据以副本的形式代理写入base池。cache池和base池中保存的这部分数据是一致的,降低了cache池的使用空间到达水位时的数据迁移压力,使得分布式文件系统可以保持一个较平滑的性能,缓和了分布式文件系统初始性能高、后续性能低的缺陷。Specifically, the copy does not need to slice the data. What is written is a complete set of data. If one copy of the data is successfully written, it is considered successful. There is no rollback operation, so there is no need to distinguish the type of write operation. Based on this, when the base pool is a copy pool, it directly writes the data to be written into the cache pool and returns it, and writes the data to be written into the base pool as a proxy in the form of a copy. The data stored in the cache pool and the base pool are consistent, which reduces the data migration pressure when the cache pool reaches the water level, enables the distributed file system to maintain a smoother performance, and eases the initial impact of the distributed file system. The defect of high performance and low follow-up performance.

本发明提供了一种基于分层存储的写操作控制方法,包括:在接收到写操作请求时,判断待写入数据对应的base池的类型;如果base池为纠删池,则判断写操作请求对应的写操作的类型,当写操作为覆盖写时,将待写入数据写入cache池,并把待写入数据以纠删的形式写入base池;如果base池为副本池,则将待写入数据写入cache池,并把待写入数据以副本的形式写入base池。The present invention provides a write operation control method based on hierarchical storage, comprising: when receiving a write operation request, judging the type of the base pool corresponding to the data to be written; if the base pool is an erasure pool, judging the write operation The type of write operation corresponding to the request. When the write operation is an overwrite, write the data to be written into the cache pool, and write the data to be written into the base pool in the form of erasure; if the base pool is a copy pool, then Write the data to be written into the cache pool, and write the data to be written into the base pool in the form of a copy.

相比于现有技术中分布式文件系统初始性能高后续性能低,本申请中客户端向cache池发起写操作,达到base池类型和写操作类型的预设标准时,将待写入数据写入cache池,同时把待写入数据写入base池,使得cache池和base池中保存的这部分数据是一致的,从而降低了cache池使用空间到达水位时的数据迁移压力,使分布式文件系统保持一个较平滑的性能,提升了用户体验。Compared with the distributed file system in the prior art, the initial performance is high and the follow-up performance is low. In this application, the client initiates a write operation to the cache pool. When the preset standards for the base pool type and write operation type are reached, the data to be written is written to cache pool, and write the data to be written into the base pool at the same time, so that the data stored in the cache pool and the base pool are consistent, thereby reducing the data migration pressure when the space used by the cache pool reaches the water level, and making the distributed file system Maintain a smoother performance and improve user experience.

在上述实施例的基础上:On the basis of above-mentioned embodiment:

作为一种优选地实施例,判断写操作请求对应的写操作的类型的过程具体为:As a preferred embodiment, the process of judging the type of the write operation corresponding to the write operation request is specifically as follows:

在do_op调用init_op_flags函数获取写操作请求对应的写操作的类型。Call the init_op_flags function in do_op to obtain the type of write operation corresponding to the write operation request.

具体地,本申请中判断写操作请求对应的写操作的类型时,直接在do_op调用init_op_flags函数来确定写操作请求对应的写操作是否是覆盖写,函数调用结果可以明确的显示写操作类型,以便进行相应的后续操作,且实现简单,开发难度较低,缩短了开发时间,从而降低了企业生产成本。Specifically, when judging the type of the write operation corresponding to the write operation request in this application, the init_op_flags function is directly called in do_op to determine whether the write operation corresponding to the write operation request is an overwrite, and the result of the function call can clearly display the write operation type, so that The corresponding follow-up operations are carried out, and the implementation is simple, the development difficulty is relatively low, and the development time is shortened, thereby reducing the production cost of the enterprise.

作为一种优选地实施例,把待写入数据以纠删或副本的形式写入base池的过程具体为:As a preferred embodiment, the process of writing the data to be written into the base pool in the form of erasure correction or copy is specifically as follows:

调用do_proxy_write函数直接把待写入数据以纠删或副本的形式写入base池。Call the do_proxy_write function to directly write the data to be written to the base pool in the form of erasure correction or copy.

具体地,如果base池为纠删池,且写操作为覆盖写,则调用do_proxy_write函数直接把待写入数据以纠删的形式写入base池。如果base池为副本池,则调用do_proxy_write函数直接把待写入数据以副本的形式写入base池。这样调用do_proxy_write函数实现代理写入模式,比较灵活,适用范围广泛。Specifically, if the base pool is an erasure pool, and the write operation is an overwrite, call the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure correction. If the base pool is a copy pool, call the do_proxy_write function to directly write the data to be written into the base pool in the form of a copy. In this way, the do_proxy_write function is called to implement the proxy write mode, which is more flexible and has a wide range of applications.

作为一种优选地实施例,调用do_proxy_write函数直接把待写入数据以纠删或副本的形式写入base池之前,该方法还包括:As a preferred embodiment, before calling the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure or copy, the method also includes:

调用maybe_handle_cache函数封装maybe_handle_cache_detail函数;Call the maybe_handle_cache function to encapsulate the maybe_handle_cache_detail function;

调用maybe_handle_cache_detail函数引入代理写入模式。Call the maybe_handle_cache_detail function to introduce proxy write mode.

具体地,为了更好地实现代理写入,本申请中调用do_proxy_write函数直接把待写入数据以纠删或副本的形式写入base池之前,还会进行一些初始化工作,具体地,调用maybe_handle_cache函数封装maybe_handle_cache_detail函数,然后调用maybe_handle_cache_detail函数(代理写的入口函数)引入代理写入模式。Specifically, in order to better realize proxy writing, before calling the do_proxy_write function in this application to directly write the data to be written into the base pool in the form of erasure or copy, some initialization work will be performed, specifically, calling the maybe_handle_cache function Encapsulate the maybe_handle_cache_detail function, and then call the maybe_handle_cache_detail function (the entry function written by the agent) to introduce the agent write mode.

请参照图2,图2为本发明提供的一种基于分层存储的写操作控制系统的结构示意图,该系统包括:Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of a write operation control system based on hierarchical storage provided by the present invention. The system includes:

判断模块1,用于在接收到写操作请求时,判断待写入数据对应的base池的类型;如果base池为纠删池,则触发纠删代理写入单元2,如果base池为副本池,则触发副本代理写入单元3;The judging module 1 is used to judge the type of the base pool corresponding to the data to be written when a write operation request is received; if the base pool is an erasure pool, trigger the erasure proxy writing unit 2; if the base pool is a copy pool , then trigger the copy agent to write to unit 3;

纠删代理写入单元2,用于判断写操作请求对应的写操作的类型,当写操作为覆盖写时,将待写入数据写入cache池,并把待写入数据以纠删的形式写入base池;The erasure correction proxy writing unit 2 is used to determine the type of the write operation corresponding to the write operation request. When the write operation is an overwrite, write the data to be written into the cache pool, and write the data to be written in the form of erasure Write to the base pool;

副本代理写入单元3,用于将待写入数据写入cache池,并把待写入数据以副本的形式写入base池。The copy proxy writing unit 3 is used to write the data to be written into the cache pool, and write the data to be written into the base pool in the form of a copy.

作为一种优选地实施例,纠删代理写入单元2具体用于在do_op调用init_op_flags函数获取写操作请求对应的写操作的类型。As a preferred embodiment, the erasure correction proxy writing unit 2 is specifically configured to call the init_op_flags function in the do_op to obtain the type of the write operation corresponding to the write operation request.

作为一种优选地实施例,纠删代理写入单元2或副本代理写入单元3具体用于调用do_proxy_write函数直接把待写入数据以纠删或副本的形式写入base池。As a preferred embodiment, the erasure correction proxy writing unit 2 or the copy proxy writing unit 3 is specifically configured to call the do_proxy_write function to directly write the data to be written into the base pool in the form of erasure correction or copy.

作为一种优选地实施例,该系统还包括调用单元,用于调用maybe_handle_cache函数封装maybe_handle_cache_detail函数;调用maybe_handle_cache_detail函数引入代理写入模式。As a preferred embodiment, the system further includes a calling unit for calling the maybe_handle_cache function to encapsulate the maybe_handle_cache_detail function; calling the maybe_handle_cache_detail function to introduce the agent writing mode.

对于本发明提供的系统的介绍请参照上述方法实施例,本发明在此不再赘述。For the introduction of the system provided by the present invention, please refer to the foregoing method embodiments, and the present invention will not be repeated here.

本发明还提供一种基于分层存储的写操作控制装置,包括:The present invention also provides a write operation control device based on hierarchical storage, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行计算机程序时实现上述任一项写操作控制方法的步骤。A processor, configured to implement the steps of any one of the above writing operation control methods when executing the computer program.

对于本发明提供的装置的介绍请参照上述方法实施例,本发明在此不再赘述。For the introduction of the device provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.

本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述任一项写操作控制方法的步骤。The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above-mentioned writing operation control methods are realized.

对于本发明提供的计算机可读存储介质的介绍请参照上述方法实施例,本发明在此不再赘述。For the introduction of the computer-readable storage medium provided by the present invention, please refer to the foregoing method embodiments, and the present invention will not be repeated here.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统、装置及存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the systems, devices and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and for relevant details, please refer to the description of the methods.

还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其他实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. a kind of write operation control method based on bedding storage, which is characterized in that including:
When receiving write operation requests, the type in the corresponding base ponds of data to be written is judged;
If pond is deleted in the base ponds to entangle, judge the type of the corresponding write operation of the write operation requests, behaviour is write when described When being write as covering, by the data write-in cache ponds to be written, and institute is written in the data to be written in the form of entangling and delete State base ponds;
If the base ponds are copy pond, the data to be written are written into cache ponds, and the data to be written with The base ponds are written in the form of copy.
2. write operation control method according to claim 1, which is characterized in that described to judge that the write operation requests correspond to The process of type of write operation be specially:
The type of the corresponding write operation of the init_op_flags functions acquisition write operation requests is called in do_op.
3. write operation control method according to claim 1, which is characterized in that described that the data to be written are deleted with entangling Or the process in the form write-in base ponds of copy is specially:
Call do_proxy_write functions directly the data to be written by entangle delete or copy in the form of the write-in base Pond.
4. write operation control method according to claim 3, which is characterized in that the calling do_proxy_write functions Directly the data to be written by entangle delete or copy in the form of before the write-in base ponds, this method further includes:
Call maybe_handle_cache functions encapsulation maybe_handle_cache_detail functions;
The maybe_handle_cache_detail functions introducing is called to act on behalf of write mode.
5. a kind of write operation control system based on bedding storage, which is characterized in that including:
Judgment module, for when receiving write operation requests, judging the type in the corresponding base ponds of data to be written;If institute It states base ponds and deletes pond to entangle, then triggering, which entangles to delete, acts on behalf of writing unit, if the base ponds are copy pond, triggers replica agent Writing unit;
It is described entangle to delete act on behalf of writing unit, for judging the type of the corresponding write operation of the write operation requests, behaviour is write when described When being write as covering, by the data write-in cache ponds to be written, and institute is written in the data to be written in the form of entangling and delete State base ponds;
The replica agent writing unit, for by the data to be written write-in cache ponds, and the data to be written with The base ponds are written in the form of copy.
6. write operation control system according to claim 5, which is characterized in that it is described entangle to delete act on behalf of writing unit and specifically use In the type that the corresponding write operation of the init_op_flags functions acquisition write operation requests is called in do_op.
7. write operation control system according to claim 5, which is characterized in that it is described entangle to delete act on behalf of writing unit or described Replica agent writing unit is specifically used for calling do_proxy_write functions that directly the data to be written are deleted or secondary to entangle The base ponds are written in this form.
8. write operation control system according to claim 7, which is characterized in that the system further includes call unit, is used for Call maybe_handle_cache functions encapsulation maybe_handle_cache_detail functions;Call the maybe_ Write mode is acted on behalf of in the introducing of handle_cache_detail functions.
9. a kind of write operation control device based on bedding storage, which is characterized in that including:
Memory, for storing computer program;
Processor realizes the write operation control method as described in any one of Claims 1-4 during for performing the computer program The step of.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, realizing the write operation control method as described in any one of Claims 1-4 when the computer program is executed by processor Step.
CN201810030038.1A 2018-01-12 2018-01-12 Write operation control method, system, device and storage medium based on bedding storage Pending CN108255432A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810030038.1A CN108255432A (en) 2018-01-12 2018-01-12 Write operation control method, system, device and storage medium based on bedding storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810030038.1A CN108255432A (en) 2018-01-12 2018-01-12 Write operation control method, system, device and storage medium based on bedding storage

Publications (1)

Publication Number Publication Date
CN108255432A true CN108255432A (en) 2018-07-06

Family

ID=62726343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810030038.1A Pending CN108255432A (en) 2018-01-12 2018-01-12 Write operation control method, system, device and storage medium based on bedding storage

Country Status (1)

Country Link
CN (1) CN108255432A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115437581A (en) * 2022-11-08 2022-12-06 浪潮电子信息产业股份有限公司 A data processing method, device, equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779180A (en) * 2012-06-29 2012-11-14 华为技术有限公司 Operation processing method of data storage system and data storage system
CN105183384A (en) * 2015-09-10 2015-12-23 浪潮(北京)电子信息产业有限公司 Direct erasure correction implementation method and device
CN105630418A (en) * 2015-12-24 2016-06-01 曙光信息产业(北京)有限公司 Data storage method and device
CN105659213A (en) * 2013-10-18 2016-06-08 日立数据系统工程英国有限公司 Target-driven independent data integrity and redundancy recovery in a shared-nothing distributed storage system
US20160211869A1 (en) * 2015-01-20 2016-07-21 International Business Machines Corporation Multiple Erasure Codes for Distributed Storage
CN106227731A (en) * 2016-07-06 2016-12-14 联想(北京)有限公司 A kind of data processing method, device and distributed file system
CN106649891A (en) * 2017-02-24 2017-05-10 深圳市中博睿存信息技术有限公司 Distributed data storage method and system
CN106708653A (en) * 2016-12-29 2017-05-24 广州中国科学院软件应用技术研究所 Mixed tax administration data security protecting method based on erasure code and multi-copy
CN106775462A (en) * 2016-11-30 2017-05-31 郑州云海信息技术有限公司 A kind of method and apparatus that memory copying is reduced during read-write

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779180A (en) * 2012-06-29 2012-11-14 华为技术有限公司 Operation processing method of data storage system and data storage system
CN105659213A (en) * 2013-10-18 2016-06-08 日立数据系统工程英国有限公司 Target-driven independent data integrity and redundancy recovery in a shared-nothing distributed storage system
US20160211869A1 (en) * 2015-01-20 2016-07-21 International Business Machines Corporation Multiple Erasure Codes for Distributed Storage
CN105183384A (en) * 2015-09-10 2015-12-23 浪潮(北京)电子信息产业有限公司 Direct erasure correction implementation method and device
CN105630418A (en) * 2015-12-24 2016-06-01 曙光信息产业(北京)有限公司 Data storage method and device
CN106227731A (en) * 2016-07-06 2016-12-14 联想(北京)有限公司 A kind of data processing method, device and distributed file system
CN106775462A (en) * 2016-11-30 2017-05-31 郑州云海信息技术有限公司 A kind of method and apparatus that memory copying is reduced during read-write
CN106708653A (en) * 2016-12-29 2017-05-24 广州中国科学院软件应用技术研究所 Mixed tax administration data security protecting method based on erasure code and multi-copy
CN106649891A (en) * 2017-02-24 2017-05-10 深圳市中博睿存信息技术有限公司 Distributed data storage method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115437581A (en) * 2022-11-08 2022-12-06 浪潮电子信息产业股份有限公司 A data processing method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20200034304A1 (en) Techniques to perform power fail-safe caching without atomic metadata
US11194710B2 (en) Garbage collection—automatic data placement
TWI388983B (en) A method and system for facilitating fast wake-up of a flash memory system
US10241711B2 (en) Multiversioned nonvolatile memory hierarchy for persistent memory
US20140006687A1 (en) Data Cache Apparatus, Data Storage System and Method
US20150089121A1 (en) Managing A Cache On Storage Devices Supporting Compression
US8578089B2 (en) Storage device cache
US20080082743A1 (en) Method and apparatus for caching memory content on a computing system to facilitate instant-on resuming from a hibernation state
JP2003067248A (en) Method and system of caching memory devices
CN104182184A (en) Distributed block storing and cloning method
US20130145095A1 (en) Melthod and system for integrating the functions of a cache system with a storage tiering system
CN105872040A (en) Method for optimizing write performance of distributed block storage system by utilizing cache of gateway nodes
TW201011538A (en) Managing cache data and metadata
CN105138469B (en) A kind of data read-write method and mainboard
US20190187936A1 (en) Shingled magnetic recording trim operation
CN111736767B (en) Method and equipment for writing cache of distributed object storage system
WO2009092254A1 (en) Method, device and system for recovering data of cache
CN115576501B (en) Node updating method, system and related device of RAID card
WO2024046213A1 (en) Method and apparatus for caching blocks of redundant array of independent disks, and device and readable medium
CN103049396A (en) Method and device for flushing data
CN101968755A (en) Application load change adaptive snapshot generating method
CN110502188A (en) A kind of date storage method and device based on data base read-write performance
CN110673978A (en) A data recovery method and related device after a power failure of a dual-control cluster
CN115328407A (en) Cache disk replacement method, device, device, and storage medium
CN103617009A (en) Method and device for writing data to disk through cache during starting up

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180706