WO2015184710A1 - Method and device for processing magnetic disk hibernation - Google Patents

Method and device for processing magnetic disk hibernation Download PDF

Info

Publication number
WO2015184710A1
WO2015184710A1 PCT/CN2014/087721 CN2014087721W WO2015184710A1 WO 2015184710 A1 WO2015184710 A1 WO 2015184710A1 CN 2014087721 W CN2014087721 W CN 2014087721W WO 2015184710 A1 WO2015184710 A1 WO 2015184710A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk
chunk
sleep
module
access heat
Prior art date
Application number
PCT/CN2014/087721
Other languages
French (fr)
Chinese (zh)
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 WO2015184710A1 publication Critical patent/WO2015184710A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power

Definitions

  • the present invention relates to the field of communications, and in particular to a disk sleep processing method and apparatus.
  • Erasure Coding is a data protection method that divides data into segments, expands, encodes, and stores them in different locations, such as disks, storage nodes, or Other locations. It creates a mathematical function that describes a set of numbers so that they can be checked for accuracy and can be recovered once one of the numbers is lost. Polynomial interpolation or oversampling is the key technique used by erasure codes.
  • EC mode can be used in applications or systems that have large amounts of data and any fault tolerance, such as disk array systems, data grids, distributed storage applications, object storage, or archive storage.
  • any fault tolerance such as disk array systems, data grids, distributed storage applications, object storage, or archive storage.
  • a common use case for erasure codes is object-based cloud storage.
  • the disk array disk hibernation is empirically configured, and the disk sleep is selected at a fixed time when the system read operation is less, so that file access is also performed during the sleep process, which is particularly obvious in the EC mode. Because sleep will greatly increase the amount of file access calculations, causing unnecessary fragmentation repairs a lot of system performance and improving maintenance costs, especially in EC environments.
  • Disk hibernation can only sleep the disk at a fixed time. It is not guaranteed that during the long-term operation, the system is idle for a fixed period of time, or the idle period is not used properly. As a result, the disk hibernation function is basically unavailable. For the EC environment, sleeping disks are also accessed due to different storage rules. This results in a large number of unnecessary fragmentation repairs, which consumes a lot of system performance.
  • the shortcomings of the prior art are particularly serious.
  • the invention provides a disk sleep processing method and device, which can at least solve the defects in the related art that the system performance waste caused by only fixed time sleep and unnecessary fragment repair exists in the disk sleep technology.
  • a disk sleep processing method including: calculating an access heat of accessing each memory block chunk in the first disk; determining whether the access heat of accessing the chunk reaches a predetermined threshold; If the result of the determination is yes, the chunk of the first disk whose access heat exceeds the predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than the first disk; The disk is dormant.
  • sleeping the first disk comprises: sleeping the first disk in a predetermined time by using a predetermined idle sleep.
  • the method further comprises: waking up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, exists in the first disk A chunk that exceeds the predetermined threshold.
  • the waking up the first disk includes: sorting the chunks in the second disk according to the access heat of the chunk; The chunk whose access heat is queued at the end of the queue is migrated to the first disk.
  • the migrating the chunk of the first disk with the access heat exceeding the predetermined threshold to the second disk comprises: counting the chunks in the first disk, sorting according to the access heat; A chunk exceeding the predetermined threshold is migrated to the second disk.
  • a disk dormancy processing apparatus comprising: a statistics module configured to count access heat for accessing each memory block chunk in the first disk; and a determining module configured to determine access to the chunk Whether the access heat reaches a predetermined threshold; the migration module is configured to migrate the chunk of the first disk whose access heat exceeds the predetermined threshold to the second disk if the determination result of the determining module is yes The performance of the second disk is higher than the first disk; and the hibernation module is configured to sleep the first disk.
  • the hibernation module includes: a hibernation unit configured to sleep the first disk in a predetermined time in a predetermined time in a case where the first disk has at least two.
  • the apparatus further comprises: a wake-up module configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and the first disk exceeds the predetermined The chunk of the threshold.
  • a wake-up module configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and the first disk exceeds the predetermined The chunk of the threshold.
  • the waking module includes: a first sorting unit, configured to: in case the second disk reaches the predetermined storage threshold, the chunk in the second disk is in accordance with the access heat of the chunk High Low sorting; the first migration unit is configured to migrate the chunk whose access heat is queued at the end of the queue to the first disk.
  • a first sorting unit configured to: in case the second disk reaches the predetermined storage threshold, the chunk in the second disk is in accordance with the access heat of the chunk High Low sorting
  • the first migration unit is configured to migrate the chunk whose access heat is queued at the end of the queue to the first disk.
  • the migration module includes: a second sorting unit configured to count the chunks in the first disk according to the access heat; and the second migration unit is configured to exceed the predetermined threshold The chunk is migrated to the second disk.
  • the access heat of the access to each memory block chunk in the first disk is statistically determined; whether the access heat of accessing the chunk reaches a predetermined threshold is determined; if the determination result is yes, the first The chunk of the disk whose access heat exceeds the predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than that of the first disk; and the first disk is dormant, which solves the related art, the disk dormancy technology There are only defects in system performance waste caused by fixed time sleep and unnecessary fragmentation repair, thereby achieving the effect of realizing dynamic sleep of the disk and improving the performance of the disk system.
  • FIG. 1 is a flowchart of a disk sleep processing method according to an embodiment of the present invention.
  • FIG. 2 is a block diagram showing the structure of a disk sleep processing apparatus according to an embodiment of the present invention
  • FIG. 3 is a block diagram showing a preferred structure of a sleep module 28 in a disk sleep processing apparatus according to an embodiment of the present invention
  • FIG. 4 is a block diagram showing a preferred structure of a disk sleep processing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a block diagram showing a preferred structure of a wake-up module 42 in a disk sleep processing apparatus according to an embodiment of the present invention
  • FIG. 6 is a block diagram showing a preferred structure of a migration module 26 in a disk sleep processing apparatus according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a hierarchical storage dynamic sleep disk system architecture according to a preferred embodiment of the present invention.
  • FIG. 8 is a schematic diagram of interaction of a dynamic disk sleep method according to a preferred embodiment of the present invention.
  • FIG. 9 is a flow chart of a method for dynamically sleeping a disk in accordance with a preferred embodiment of the present invention.
  • FIG. 10 is a schematic diagram of interaction of a dynamic disk wakeup method according to a preferred embodiment of the present invention.
  • FIG. 11 is a flow chart of a method for dynamically awakening a disk in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of a disk sleep processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 collecting the access heat of accessing each chunk of the chunk in the first disk
  • Step S104 determining whether the access heat of accessing the chunk reaches a predetermined threshold
  • step S106 if the result of the determination is yes, the chunk of the first disk whose access heat exceeds a predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than that of the first disk;
  • Step S108 sleeping on the first disk.
  • the chunks are migrated between disks according to the access heat of the chunks in the disk, so that the chunks with high access can be migrated to the high-performance disks, and the chunks that access the low chunks or even the non-accesses can be concentrated to the hot ones.
  • the disk can further hibernate the less hot disk, which not only solves the defect of system performance waste caused by only fixed-time sleep and unnecessary fragmentation in the disk sleep technology, thereby achieving the realization.
  • the dynamic sleep of the disk improves the performance of the disk system.
  • the first disk is dormant in a predetermined time in a predetermined time.
  • the dormancy of the first disk is to achieve dynamic sleep of the first disk, and when the storage of the hot disk, that is, the storage of the second disk reaches a predetermined storage threshold, or the predetermined threshold is exceeded in the first disk, When the chunk is hibernated, the first disk can be woken up after the first disk is hibernated. On the one hand, the hot disk overload can be effectively avoided, and on the other hand, the idle disk can be obtained. use efficiently.
  • the disk When the disk is dynamically hibernated, it involves the dynamic migration of chunks on the disk. You can use a variety of methods to dynamically migrate a chunk of a disk. Here is a description of how to handle queue priority.
  • the following processing may be adopted when waking up the first disk: the chunks in the second disk are sorted according to the access heat of the chunk (that is, a queue with a certain priority is formed). ); migrate the chunks whose access heat is queued at the end of the queue to the first disk.
  • a similar process may be adopted for migrating a chunk of the first disk whose access heat exceeds a predetermined threshold to the second disk: sorting the chunks in the first disk according to the access heat (that is, forming a priority) Queue); migrating chunks that exceed a predetermined threshold to the second disk.
  • the queue priority processing method can not only improve the processing efficiency, but also is simple and convenient.
  • a disk sleep processing device is also provided, which is used to implement the above embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 2 is a structural block diagram of a disk sleep processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a statistics module 22, a determination module 24, a migration module 26, and a sleep module 28. The device will be described below.
  • the statistic module 22 is configured to count the access heat of accessing the chunks of the first disk; the determining module 24 is connected to the statistic module 22, and is configured to determine whether the access heat of accessing the chunk reaches a predetermined threshold; 26, connected to the foregoing determining module 24, configured to migrate the chunk of the first disk whose access heat exceeds a predetermined threshold to the second disk, wherein the performance of the second disk is higher than the determination result of the determining module is YES
  • the first disk; the hibernation module 28, connected to the migration module 26, is configured to sleep on the first disk.
  • the hibernation module 28 includes a sleep unit 32, and the sleep unit 32 will be described below.
  • the sleep unit 32 is configured to sleep the first disk in a predetermined time in a predetermined time in the case where there are at least two of the first disks.
  • FIG. 4 is a block diagram showing a preferred structure of a disk sleep processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes a wake-up module 42 in addition to all the structures shown in FIG. Be explained.
  • the wake-up module 42 is connected to the above-described hibernation module 28, and is configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and a chunk exceeding a predetermined threshold exists in the first disk.
  • FIG. 5 is a block diagram of a preferred structure of the wake-up module 42 in the disk sleep processing apparatus according to the embodiment of the present invention.
  • the wake-up module 42 includes: a first sorting unit 52 and a first migration unit 54, The wakeup module 42 is described.
  • the first sorting unit 52 is configured to, in the case that the second disk reaches a predetermined storage threshold, sort the chunks in the second disk according to the access heat of the chunk; the first migration unit 54 is connected to the first sort. Unit 52 is configured to migrate the chunks whose access heat is queued at the end of the queue to the first disk.
  • FIG. 6 is a block diagram showing a preferred structure of the migration module 26 in the disk sleep processing apparatus according to the embodiment of the present invention. As shown in FIG. 6, the migration module 26 includes: a second sorting unit 62 and a second migration unit 64. The migration module 26 is described.
  • the second sorting unit 62 is configured to sort the chunks in the first disk according to the access heat; the second migration unit 64 is connected to the second sorting unit 62, and is configured to migrate the chunks exceeding the predetermined threshold to the second Disk.
  • a dynamic sleep of the disk is implemented on the basis of hierarchical storage. Program.
  • the architecture of a disk-based dynamic sleep disk system based on hierarchical storage is described below.
  • FIG. 7 is a schematic diagram of a hierarchical storage dynamic sleep disk system architecture according to a preferred embodiment of the present invention.
  • the system includes: a chunk access statistics module 70 and an IO load reporting module 72. 22), chunk access statistics management module 74 (functioning with the above-mentioned judging module 24), chunk hot and cold scheduling module 76 (functioning with the above-mentioned migration module 26) and disk sleep control module 78 (functioning with the above-described hibernation module 28).
  • the following is an example in which the first disk is a Serial Advanced Technology Attachment (SATA) and the second disk is a Solid State Disk (SSD).
  • SATA Serial Advanced Technology Attachment
  • SSD Solid State Disk
  • the performance of the second disk is higher than that of the first disk, that is, the second disk has higher performance than the first disk in terms of read/write capability, storage capability, and ability to process statistical information.
  • the chunk access statistic module 70 on the FAC side, mainly reports the statistics of the read byte count of the user to the chunk access statistics management module 74.
  • the module reports the access statistics of the user to the file to the chunk access statistical management module 74 when the file is closed and the file is closed.
  • the access statistics of chunk include, chunky (chunk), the number of bytes accessed. Multiple accesses accumulate the number of bytes per access.
  • the chunk access statistics management module 74 calculates the current revenue based on the statistical information reported by the FAC on the FLR side, and modifies the revenue field in the database.
  • the module collects access statistics on the chunk, calculates the access gain to the chunk in the statistical period, and invokes the interface of the database to modify the revenue field of the chunk table chunk.
  • the chunk hot and cold dispatching module 76 calculates the chunk's revenue according to the chunk's historical access revenue and the current access revenue, and constructs a chunk upgrade and downgrade priority queue according to the chunk's access revenue. And notify FLR to carry out the migration of chunks between SSD and SATA.
  • the disk sleep control module 78 is on the FAS side. After the hotspot chunk is successfully migrated, some SATA disks are hibernated. When the SSD space reaches the threshold, when the hotspot chunk needs to be downgraded, the sleeping SATA disk is dynamically woken up.
  • the SSD management module is a support module. You need to add management to the SSD disk, including disk identification, volume creation, volume deletion, and alarm reporting recovery.
  • FIG. 8 is a schematic diagram of interaction of a dynamic sleep mode of a disk according to a preferred embodiment of the present invention.
  • the dynamic sleep method of the disk includes the following process: a cache upgrade request is initiated by a scheduling module of the FLR, and hotspot data of the SATA disk is migrated. Go to the SSD and delete the data on the SATA disk. And modify the chunk location information in the database. After the hotspot migration is completed, the disk that is about to sleep is scanned as a chunk and reported to the chunk-level access statistics module of the FLR. N blocks SATA disks in sequence. After the migration is successful, the chunk is placed in the chunk revenue degradation queue.
  • the migration traffic between the hot and cold chunks is initiated.
  • the database collects the length of the migration queue on the FAS and the queue length of the normal read and write access.
  • the chunk whose read/write queue length is within the threshold and whose migration queue length is within the set threshold initiates the migration process, notifying the FLR that the chunk will be chunked. Migrate from SATA storage to L1 cache. After the migration, sleep N non-hotspot storage SATA disks.
  • FIG. 9 is a flowchart of a method for dynamically sleeping a disk according to a preferred embodiment of the present invention. As shown in FIG. 9, the process includes the following steps:
  • Step S902 starting to classify the chunk
  • Step S904 it is determined whether the threshold of degradation is reached, if the determination result is yes, proceed to step S906, otherwise return to step S902;
  • Step S906 enabling the downgrade process
  • Step S908 obtaining the volume load situation, including: migration queue length, IO read/write queue length;
  • Step S910 determining whether the read/write queue length is less than a preset threshold, if the determination result is yes, proceeding to step S912, otherwise returning to step S902;
  • Step S912 determining whether the migration queue length is less than a predetermined threshold, if the determination result is yes, proceeding to step S914, otherwise returning to step S902;
  • Step S914 taking a chunk from the head of the migration queue
  • Step S916 notifying the FLR to migrate to the level 1 cache destination volume
  • Step S918 it is determined whether the migration is successful, if the determination result is yes, proceed to step S920, otherwise return to step S912;
  • Step S920 deleting the chunk from the migration upgrade queue
  • Step S922 placing the chunk into the degraded priority queue
  • Step S924 modifying the location information of the chunk, and deleting the source chunk;
  • step S928 the SATA disk is hibernated, and the process returns to step S912.
  • FIG. 10 is a schematic diagram of interaction of a dynamic wake-up method of a disk according to a preferred embodiment of the present invention.
  • the dynamic wake-up method of the disk includes the following process: when the SSD disk space reaches a threshold, the chunk needs to be downgraded.
  • the downgrade request is initiated by the FLR debug module, and the FAS responds to the dynamic wakeup of the dormant disk.
  • the sleep disk is woken up.
  • the space In the level 1 cache, the space reaches a set threshold, such as 80%, and then the degradation processing of the hotspot chunk needs to be initiated.
  • the FAS is notified to wake up the dormant disk.
  • the downgrade process removes the low-revenue chunk from the tail end of the chunk demotion queue, migrates from the SSD disk to the SATA disk, deletes the data on the SSD disk, and notifies the FLR to modify the chunk location information.
  • FIG. 11 is a flowchart of a method for dynamically waking up a disk according to a preferred embodiment of the present invention. As shown in FIG. 11, the process includes the following steps:
  • Step S1102 Obtain a list of all level 1 cache volumes
  • Step S1104 taking a volume
  • Step S1106 it is determined whether the volume space usage has reached a predetermined threshold, if the determination result is yes, proceeds to step S1108, otherwise returns to step S1104;
  • Step S1110 waking up the sleeping SATA disk
  • Step S1112 notifying the FLR to migrate the chunk to the SATA from the primary storage volume SSD;
  • Step S1114 it is determined whether the migration is successful, if the determination result is yes, proceed to step S1116, otherwise return to step S1106;
  • Step S1116 deleting the chunk from the tail of the migration queue
  • step S1120 the location information of the database chunk is modified.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above embodiments and the preferred embodiments solve the defects in the related art that the system performance waste caused by only fixed-time sleep and unnecessary fragmentation repair exists in the disk sleep technology, thereby achieving the realization of the disk. Dynamic sleep, improving the performance of the disk system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

A method and device for processing magnetic disk hibernation. The method comprises: counting the access frequency for accessing each storage block (chunk) in a first magnetic disk; judging whether the access frequency for accessing the chunk reaches a predetermined threshold value; in the case where the judgement result is yes, migrating the chunk of which the access frequency exceeds the predetermined threshold value in the first magnetic disk into a second magnetic disk, wherein the performance of the second magnetic disk is higher than that of the first magnetic disk; and conducting hibernation on the first magnetic disk. By means of this solution, the problem in the related art that the system performance is wasted due to hibernation conducted only at a fixed time and unnecessary fragment repair existing in the magnetic disk hibernation technology is solved, thereby achieving the effects of realizing the dynamic hibernation of a magnetic disk and increasing the system performance of the magnetic disk.

Description

磁盘休眠处理方法及装置Disk sleep processing method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种磁盘休眠处理方法及装置。The present invention relates to the field of communications, and in particular to a disk sleep processing method and apparatus.
背景技术Background technique
纠删码(Erasure Coding,简称为EC)是一种数据保护方法,它将数据分割成片段,把冗余数据块扩展、编码,并将其存储在不同的位置,比如,磁盘、存储节点或者其它地理位置。它会创建一个数学函数来描述一组数字,这样就可以检查它们的准确性,而且一旦其中一个数字丢失,还可以恢复。多项式插值(polynomial interpolation)或过采样(oversampling)就是纠删码所使用的关键技术。Erasure Coding (EC) is a data protection method that divides data into segments, expands, encodes, and stores them in different locations, such as disks, storage nodes, or Other locations. It creates a mathematical function that describes a set of numbers so that they can be checked for accuracy and can be recovered once one of the numbers is lost. Polynomial interpolation or oversampling is the key technique used by erasure codes.
EC模式可以用于有大量数据和任何需要容错的应用程序或系统中,比如,磁盘阵列系统、数据网格、分布式存储应用程序、对象存储或归档存储。目前,纠删码的一个常见的使用案例是基于对象的云存储。EC mode can be used in applications or systems that have large amounts of data and any fault tolerance, such as disk array systems, data grids, distributed storage applications, object storage, or archive storage. Currently, a common use case for erasure codes is object-based cloud storage.
在相关技术中,磁盘阵列磁盘休眠是通过经验配置,选择在系统读操作较少的固定时间进行磁盘休眠,这样在休眠过程中也会有文件访问,在EC模式下表现尤为明显。因为休眠会导致文件访问的计算量大大地增加,造成不必要的分片修复耗费了系统大量性能,提高了维护成本,尤其EC环境表现尤为明显。In the related art, the disk array disk hibernation is empirically configured, and the disk sleep is selected at a fixed time when the system read operation is less, so that file access is also performed during the sleep process, which is particularly obvious in the EC mode. Because sleep will greatly increase the amount of file access calculations, causing unnecessary fragmentation repairs a lot of system performance and improving maintenance costs, especially in EC environments.
因此,在相关技术的磁盘休眠方案中,存在以下缺点:磁盘休眠只能在固定时间对磁盘进行休眠。不能保证长期运行过程中,系统一直在固定时间段空闲,或者空闲的时间段没有被合理利用。从而使磁盘休眠功能处于基本不可用状态。对于EC环境,由于存储规律的不同,休眠的磁盘也会被访问到。这样就造成了大量不必要的分片修复,耗费了大量的系统性能。现有技术的缺点表现尤为严重。Therefore, in the disk sleep scheme of the related art, there are the following disadvantages: Disk hibernation can only sleep the disk at a fixed time. It is not guaranteed that during the long-term operation, the system is idle for a fixed period of time, or the idle period is not used properly. As a result, the disk hibernation function is basically unavailable. For the EC environment, sleeping disks are also accessed due to different storage rules. This results in a large number of unnecessary fragmentation repairs, which consumes a lot of system performance. The shortcomings of the prior art are particularly serious.
因此,在相关技术中,磁盘休眠技术中存在的只能固定时间休眠和不必要分片修复造成的系统性能浪费的缺陷。Therefore, in the related art, there is a defect in system performance waste caused by only fixed-time sleep and unnecessary fragmentation repair in the disk sleep technology.
发明内容Summary of the invention
本发明提供了一种磁盘休眠处理方法及装置,以至少解决相关技术中,磁盘休眠技术中存在的只能固定时间休眠和不必要分片修复造成的系统性能浪费的缺陷。 The invention provides a disk sleep processing method and device, which can at least solve the defects in the related art that the system performance waste caused by only fixed time sleep and unnecessary fragment repair exists in the disk sleep technology.
根据本发明的一个方面,提供了一种磁盘休眠处理方法,包括:统计对第一磁盘中各个存储块chunk进行访问的访问热度;判断对chunk进行访问的所述访问热度是否达到预定阈值;在判断结果为是的情况下,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到第二磁盘,其中,所述第二磁盘的性能高于第一磁盘;对所述第一磁盘进行休眠。According to an aspect of the present invention, a disk sleep processing method is provided, including: calculating an access heat of accessing each memory block chunk in the first disk; determining whether the access heat of accessing the chunk reaches a predetermined threshold; If the result of the determination is yes, the chunk of the first disk whose access heat exceeds the predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than the first disk; The disk is dormant.
优选地,在所述第一磁盘存在至少两个的情况下,对所述第一磁盘进行休眠包括:在预定时间内采用预定轮流休眠的方式对所述第一磁盘进行休眠。Preferably, if there are at least two of the first disks, sleeping the first disk comprises: sleeping the first disk in a predetermined time by using a predetermined idle sleep.
优选地,在对所述第一磁盘进行休眠之后,还包括:在满足以下条件至少之一时,唤醒所述第一磁盘:所述第二磁盘达到预定存储阈值、在所述第一磁盘中存在超过所述预定阈值的chunk。Preferably, after the sleeping of the first disk, the method further comprises: waking up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, exists in the first disk A chunk that exceeds the predetermined threshold.
优选地,在所述第二磁盘达到所述预定存储阈值的情况下,唤醒所述第一磁盘包括:对所述第二磁盘中的chunk,依据所述chunk的访问热度的高低进行排序;将访问热度排在队列尾端的chunk迁移到所述第一磁盘。Preferably, if the second disk reaches the predetermined storage threshold, the waking up the first disk includes: sorting the chunks in the second disk according to the access heat of the chunk; The chunk whose access heat is queued at the end of the queue is migrated to the first disk.
优选地,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到所述第二磁盘包括:对统计所述第一磁盘中的所述chunk,依据所述访问热度进行排序;将超过所述预定阈值的chunk迁移到所述第二磁盘。Preferably, the migrating the chunk of the first disk with the access heat exceeding the predetermined threshold to the second disk comprises: counting the chunks in the first disk, sorting according to the access heat; A chunk exceeding the predetermined threshold is migrated to the second disk.
根据本发明的另一方面,提供了一种磁盘休眠处理装置,包括:统计模块,设置为统计对第一磁盘中各个存储块chunk进行访问的访问热度;判断模块,设置为判断对chunk进行访问的所述访问热度是否达到预定阈值;迁移模块,设置为在所述判断模块的判断结果为是的情况下,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到第二磁盘,其中,所述第二磁盘的性能高于第一磁盘;休眠模块,设置为对所述第一磁盘进行休眠。According to another aspect of the present invention, a disk dormancy processing apparatus is provided, comprising: a statistics module configured to count access heat for accessing each memory block chunk in the first disk; and a determining module configured to determine access to the chunk Whether the access heat reaches a predetermined threshold; the migration module is configured to migrate the chunk of the first disk whose access heat exceeds the predetermined threshold to the second disk if the determination result of the determining module is yes The performance of the second disk is higher than the first disk; and the hibernation module is configured to sleep the first disk.
优选地,所述休眠模块包括:休眠单元,设置为在所述第一磁盘存在至少两个的情况下,在预定时间内采用预定轮流休眠的方式对所述第一磁盘进行休眠。Preferably, the hibernation module includes: a hibernation unit configured to sleep the first disk in a predetermined time in a predetermined time in a case where the first disk has at least two.
优选地,该装置还包括:唤醒模块,设置为在满足以下条件至少之一时,唤醒所述第一磁盘:所述第二磁盘达到预定存储阈值、在所述第一磁盘中存在超过所述预定阈值的chunk。Preferably, the apparatus further comprises: a wake-up module configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and the first disk exceeds the predetermined The chunk of the threshold.
优选地,所述唤醒模块包括:第一排序单元,设置为在所述第二磁盘达到所述预定存储阈值的情况下,对所述第二磁盘中的chunk,依据所述chunk的访问热度的高 低进行排序;第一迁移单元,设置为将访问热度排在队列尾端的chunk迁移到所述第一磁盘。Preferably, the waking module includes: a first sorting unit, configured to: in case the second disk reaches the predetermined storage threshold, the chunk in the second disk is in accordance with the access heat of the chunk High Low sorting; the first migration unit is configured to migrate the chunk whose access heat is queued at the end of the queue to the first disk.
优选地,所述迁移模块包括:第二排序单元,设置为对统计所述第一磁盘中的所述chunk,依据所述访问热度进行排序;第二迁移单元,设置为将超过所述预定阈值的chunk迁移到所述第二磁盘。Preferably, the migration module includes: a second sorting unit configured to count the chunks in the first disk according to the access heat; and the second migration unit is configured to exceed the predetermined threshold The chunk is migrated to the second disk.
通过本发明,采用统计对第一磁盘中各个存储块chunk进行访问的访问热度;判断对chunk进行访问的所述访问热度是否达到预定阈值;在判断结果为是的情况下,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到第二磁盘,其中,所述第二磁盘的性能高于第一磁盘;对所述第一磁盘进行休眠,解决了相关技术中,磁盘休眠技术中存在的只能固定时间休眠和不必要分片修复造成的系统性能浪费的缺陷,进而达到了实现磁盘的动态休眠,提高磁盘系统性能的效果。According to the present invention, the access heat of the access to each memory block chunk in the first disk is statistically determined; whether the access heat of accessing the chunk reaches a predetermined threshold is determined; if the determination result is yes, the first The chunk of the disk whose access heat exceeds the predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than that of the first disk; and the first disk is dormant, which solves the related art, the disk dormancy technology There are only defects in system performance waste caused by fixed time sleep and unnecessary fragmentation repair, thereby achieving the effect of realizing dynamic sleep of the disk and improving the performance of the disk system.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的磁盘休眠处理方法的流程图;1 is a flowchart of a disk sleep processing method according to an embodiment of the present invention;
图2是根据本发明实施例的磁盘休眠处理装置的结构框图;2 is a block diagram showing the structure of a disk sleep processing apparatus according to an embodiment of the present invention;
图3是根据本发明实施例的磁盘休眠处理装置中休眠模块28的优选结构框图;3 is a block diagram showing a preferred structure of a sleep module 28 in a disk sleep processing apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的磁盘休眠处理装置的优选结构框图;4 is a block diagram showing a preferred structure of a disk sleep processing apparatus according to an embodiment of the present invention;
图5是根据本发明实施例的磁盘休眠处理装置中唤醒模块42的优选结构框图;FIG. 5 is a block diagram showing a preferred structure of a wake-up module 42 in a disk sleep processing apparatus according to an embodiment of the present invention; FIG.
图6是根据本发明实施例的磁盘休眠处理装置中迁移模块26的优选结构框图;6 is a block diagram showing a preferred structure of a migration module 26 in a disk sleep processing apparatus according to an embodiment of the present invention;
图7是根据本发明优选实施例的分级存储动态休眠磁盘系统架构示意图;7 is a schematic diagram of a hierarchical storage dynamic sleep disk system architecture according to a preferred embodiment of the present invention;
图8是根据本发明优选实施例的磁盘动态休眠方法的交互示意图;FIG. 8 is a schematic diagram of interaction of a dynamic disk sleep method according to a preferred embodiment of the present invention; FIG.
图9是根据本发明优选实施例的磁盘动态休眠方法的流程图;9 is a flow chart of a method for dynamically sleeping a disk in accordance with a preferred embodiment of the present invention;
图10是根据本发明优选实施例的磁盘动态唤醒方法的交互示意图; FIG. 10 is a schematic diagram of interaction of a dynamic disk wakeup method according to a preferred embodiment of the present invention; FIG.
图11是根据本发明优选实施例的磁盘动态唤醒方法的流程图。11 is a flow chart of a method for dynamically awakening a disk in accordance with a preferred embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种磁盘休眠处理方法,图1是根据本发明实施例的磁盘休眠处理方法的流程图,如图1所示,该流程包括如下步骤:A disk sleep processing method is provided in this embodiment. FIG. 1 is a flowchart of a disk sleep processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102,统计对第一磁盘中各个存储块chunk进行访问的访问热度;Step S102, collecting the access heat of accessing each chunk of the chunk in the first disk;
步骤S104,判断对chunk进行访问的访问热度是否达到预定阈值;Step S104, determining whether the access heat of accessing the chunk reaches a predetermined threshold;
步骤S106,在判断结果为是的情况下,将第一磁盘中访问热度超过预定阈值的chunk迁移到第二磁盘,其中,第二磁盘的性能高于第一磁盘;In step S106, if the result of the determination is yes, the chunk of the first disk whose access heat exceeds a predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than that of the first disk;
步骤S108,对第一磁盘进行休眠。Step S108, sleeping on the first disk.
通过上述步骤,依据磁盘中的chunk的访问热度来实现chunk在磁盘间的迁移,使得访问高的chunk能够迁移到性能高的磁盘中,访问低的chunk甚至不访问的chunk可以集中到不热的磁盘,进而可以将该热度不高的磁盘进行休眠,不仅解决了相关技术中,磁盘休眠技术中存在的只能固定时间休眠和不必要分片修复造成的系统性能浪费的缺陷,进而达到了实现磁盘的动态休眠,提高磁盘系统性能的效果。Through the above steps, the chunks are migrated between disks according to the access heat of the chunks in the disk, so that the chunks with high access can be migrated to the high-performance disks, and the chunks that access the low chunks or even the non-accesses can be concentrated to the hot ones. The disk can further hibernate the less hot disk, which not only solves the defect of system performance waste caused by only fixed-time sleep and unnecessary fragmentation in the disk sleep technology, thereby achieving the realization. The dynamic sleep of the disk improves the performance of the disk system.
需要说明的是,在第一磁盘存在至少两个的情况下,对第一磁盘进行休眠时,可以采用以下处理:在预定时间内采用预定轮流休眠的方式对第一磁盘进行休眠。It should be noted that, in the case that there are at least two first disks, when the first disk is dormant, the following processing may be adopted: the first disk is dormant in a predetermined time in a predetermined time.
需要指出的是,对该第一磁盘进行休眠是实现第一磁盘的动态休眠,在热度高的磁盘即第二磁盘的存储达到预定的存储阈值时,或是在第一磁盘中存在超过预定阈值的chunk时,可以在对该第一磁盘进行休眠之后,唤醒该第一磁盘,通过这样的处理,一方面,可以有效避免热度高的磁盘过负荷,另一方面,也可以使得空闲的磁盘得到有效利用。It should be noted that the dormancy of the first disk is to achieve dynamic sleep of the first disk, and when the storage of the hot disk, that is, the storage of the second disk reaches a predetermined storage threshold, or the predetermined threshold is exceeded in the first disk, When the chunk is hibernated, the first disk can be woken up after the first disk is hibernated. On the one hand, the hot disk overload can be effectively avoided, and on the other hand, the idle disk can be obtained. use efficiently.
在对磁盘进行动态休眠时,涉及到磁盘中chunk的动态迁移。在对磁盘中的chunk进行动态迁移时,可以采用多种方式,在此介绍一种队列优先级的处理方式,下面举例说明。 When the disk is dynamically hibernated, it involves the dynamic migration of chunks on the disk. You can use a variety of methods to dynamically migrate a chunk of a disk. Here is a description of how to handle queue priority.
例如,在第二磁盘达到预定存储阈值的情况下,唤醒第一磁盘时可以采用以下处理:对第二磁盘中的chunk,依据chunk的访问热度的高低进行排序(即形成具备一定优先级的队列);将访问热度排在队列尾端的chunk迁移到第一磁盘。For example, in the case that the second disk reaches the predetermined storage threshold, the following processing may be adopted when waking up the first disk: the chunks in the second disk are sorted according to the access heat of the chunk (that is, a queue with a certain priority is formed). ); migrate the chunks whose access heat is queued at the end of the queue to the first disk.
又例如,将第一磁盘中访问热度超过预定阈值的chunk迁移到第二磁盘也可以采用类似的处理:对统计第一磁盘中的chunk,依据访问热度进行排序(也即形成具备一定优先级的队列);将超过预定阈值的chunk迁移到第二磁盘。采用队列优先级的处理方式,不仅可以提高处理的效率,而且简单方便。For another example, a similar process may be adopted for migrating a chunk of the first disk whose access heat exceeds a predetermined threshold to the second disk: sorting the chunks in the first disk according to the access heat (that is, forming a priority) Queue); migrating chunks that exceed a predetermined threshold to the second disk. The queue priority processing method can not only improve the processing efficiency, but also is simple and convenient.
在本实施例中还提供了一种磁盘休眠处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a disk sleep processing device is also provided, which is used to implement the above embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的磁盘休眠处理装置的结构框图,如图2所示,该装置包括统计模块22、判断模块24、迁移模块26和休眠模块28,下面对该装置进行说明。2 is a structural block diagram of a disk sleep processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a statistics module 22, a determination module 24, a migration module 26, and a sleep module 28. The device will be described below.
统计模块22,设置为统计对第一磁盘中各个存储块chunk进行访问的访问热度;判断模块24,连接至上述统计模块22,设置为判断对chunk进行访问的访问热度是否达到预定阈值;迁移模块26,连接至上述判断模块24,设置为在判断模块的判断结果为是的情况下,将第一磁盘中访问热度超过预定阈值的chunk迁移到第二磁盘,其中,第二磁盘的性能高于第一磁盘;休眠模块28,连接至上述迁移模块26,设置为对第一磁盘进行休眠。The statistic module 22 is configured to count the access heat of accessing the chunks of the first disk; the determining module 24 is connected to the statistic module 22, and is configured to determine whether the access heat of accessing the chunk reaches a predetermined threshold; 26, connected to the foregoing determining module 24, configured to migrate the chunk of the first disk whose access heat exceeds a predetermined threshold to the second disk, wherein the performance of the second disk is higher than the determination result of the determining module is YES The first disk; the hibernation module 28, connected to the migration module 26, is configured to sleep on the first disk.
图3是根据本发明实施例的磁盘休眠处理装置中休眠模块28的优选结构框图,如图3所示,该休眠模块28包括:休眠单元32,下面对该休眠单元32进行说明。3 is a block diagram showing a preferred structure of the hibernation module 28 in the disk hibernation processing apparatus according to the embodiment of the present invention. As shown in FIG. 3, the hibernation module 28 includes a sleep unit 32, and the sleep unit 32 will be described below.
休眠单元32,设置为在第一磁盘存在至少两个的情况下,在预定时间内采用预定轮流休眠的方式对第一磁盘进行休眠。The sleep unit 32 is configured to sleep the first disk in a predetermined time in a predetermined time in the case where there are at least two of the first disks.
图4是根据本发明实施例的磁盘休眠处理装置的优选结构框图,如图4所示,该装置除包括图2所示的所有结构外,还包括唤醒模块42,下面对该唤醒模块42进行说明。FIG. 4 is a block diagram showing a preferred structure of a disk sleep processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes a wake-up module 42 in addition to all the structures shown in FIG. Be explained.
唤醒模块42,连接至上述休眠模块28,设置为在满足以下条件至少之一时,唤醒第一磁盘:第二磁盘达到预定存储阈值、在第一磁盘中存在超过预定阈值的chunk。 The wake-up module 42 is connected to the above-described hibernation module 28, and is configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and a chunk exceeding a predetermined threshold exists in the first disk.
图5是根据本发明实施例的磁盘休眠处理装置中唤醒模块42的优选结构框图,如图5所示,该唤醒模块42包括:第一排序单元52和第一迁移单元54,下面对该唤醒模块42进行说明。FIG. 5 is a block diagram of a preferred structure of the wake-up module 42 in the disk sleep processing apparatus according to the embodiment of the present invention. As shown in FIG. 5, the wake-up module 42 includes: a first sorting unit 52 and a first migration unit 54, The wakeup module 42 is described.
第一排序单元52,设置为在第二磁盘达到预定存储阈值的情况下,对第二磁盘中的chunk,依据chunk的访问热度的高低进行排序;第一迁移单元54,连接至上述第一排序单元52,设置为将访问热度排在队列尾端的chunk迁移到第一磁盘。The first sorting unit 52 is configured to, in the case that the second disk reaches a predetermined storage threshold, sort the chunks in the second disk according to the access heat of the chunk; the first migration unit 54 is connected to the first sort. Unit 52 is configured to migrate the chunks whose access heat is queued at the end of the queue to the first disk.
图6是根据本发明实施例的磁盘休眠处理装置中迁移模块26的优选结构框图,如图6所示,该迁移模块26包括:第二排序单元62和第二迁移单元64,下面对该迁移模块26进行说明。FIG. 6 is a block diagram showing a preferred structure of the migration module 26 in the disk sleep processing apparatus according to the embodiment of the present invention. As shown in FIG. 6, the migration module 26 includes: a second sorting unit 62 and a second migration unit 64. The migration module 26 is described.
第二排序单元62,设置为对统计第一磁盘中的chunk,依据访问热度进行排序;第二迁移单元64,连接到上述第二排序单元62,设置为将超过预定阈值的chunk迁移到第二磁盘。The second sorting unit 62 is configured to sort the chunks in the first disk according to the access heat; the second migration unit 64 is connected to the second sorting unit 62, and is configured to migrate the chunks exceeding the predetermined threshold to the second Disk.
针对相关技术中,磁盘休眠技术中存在的只能固定时间休眠,以及不必要分片修复造成的系统性能浪费的缺陷,在本实施例中,提供了一种在分级存储基础上实现磁盘动态休眠的方案。下面先对基于分级存储的磁盘动态休眠磁盘系统的架构进行说明。In the related art, in the disk sleep technology, there is only a fixed-time sleep, and the system performance waste caused by unnecessary fragmentation repair. In this embodiment, a dynamic sleep of the disk is implemented on the basis of hierarchical storage. Program. The architecture of a disk-based dynamic sleep disk system based on hierarchical storage is described below.
图7是根据本发明优选实施例的分级存储动态休眠磁盘系统架构示意图,如图7所示,该系统包括:chunk访问统计模块70、IO负载上报模块72(上述两者结合功能同上述统计模块22)、chunk访问统计管理模块74(功能同上述判断模块24)、chunk冷热调度模块76(功能同上述迁移模块26)和磁盘休眠控制模块78(功能同上述休眠模块28)。以下以第一磁盘为串行高级技术附件(Serial Advanced Technology Attachment,简称为SATA),第二磁盘为固态磁盘(Solid State Disk,简称为SSD)为例进行说明。其中,该第二磁盘的性能高于第一磁盘,即是指该第二磁盘不管是读写能力,还是存储能力,处理统计信息的能力等性能均高于第一磁盘。FIG. 7 is a schematic diagram of a hierarchical storage dynamic sleep disk system architecture according to a preferred embodiment of the present invention. As shown in FIG. 7, the system includes: a chunk access statistics module 70 and an IO load reporting module 72. 22), chunk access statistics management module 74 (functioning with the above-mentioned judging module 24), chunk hot and cold scheduling module 76 (functioning with the above-mentioned migration module 26) and disk sleep control module 78 (functioning with the above-described hibernation module 28). The following is an example in which the first disk is a Serial Advanced Technology Attachment (SATA) and the second disk is a Solid State Disk (SSD). The performance of the second disk is higher than that of the first disk, that is, the second disk has higher performance than the first disk in terms of read/write capability, storage capability, and ability to process statistical information.
chunk访问统计模块70,在FAC侧,主要上报用户对chunk的读字节数统计信息给chunk访问统计管理模块74。该模块在有用户读文件的时候,将用户对文件指定chunk的访问统计信息在读文件结束关闭文件的时候上报给chunk访问统计管理模块74。chunk的访问统计信息包括,chunkid(chunk标识),访问的字节数。访问多次则累加每次访问的字节数。 The chunk access statistic module 70, on the FAC side, mainly reports the statistics of the read byte count of the user to the chunk access statistics management module 74. When the user reads the file, the module reports the access statistics of the user to the file to the chunk access statistical management module 74 when the file is closed and the file is closed. The access statistics of chunk include, chunky (chunk), the number of bytes accessed. Multiple accesses accumulate the number of bytes per access.
chunk访问统计管理模块74,在FLR侧,根据FAC上报的统计信息计算当前的收益,并修改数据库中的收益字段。该模块收集对chunk的访问统计信息,计算在统计周期内对chunk的访问收益,调用数据库的接口修改chunk表chunk的收益字段。The chunk access statistics management module 74 calculates the current revenue based on the statistical information reported by the FAC on the FLR side, and modifies the revenue field in the database. The module collects access statistics on the chunk, calculates the access gain to the chunk in the statistical period, and invokes the interface of the database to modify the revenue field of the chunk table chunk.
chunk冷热调度模块76,在数据库侧,根据chunk的访问收益,在设定的周期内,根据chunk的历史访问收益以及当前访问收益计算chunk的收益,并构建chunk升级、降级的优先级队列。并通知FLR进行chunk在SSD、SATA之间进行迁移。The chunk hot and cold dispatching module 76, on the database side, calculates the chunk's revenue according to the chunk's historical access revenue and the current access revenue, and constructs a chunk upgrade and downgrade priority queue according to the chunk's access revenue. And notify FLR to carry out the migration of chunks between SSD and SATA.
磁盘休眠控制模块78,在FAS侧。在热点chunk迁移成功后,对部分SATA磁盘进行休眠。在SSD空间达到阈值时,需要对热点chunk做降级处理时,对休眠的SATA盘动态唤醒。The disk sleep control module 78 is on the FAS side. After the hotspot chunk is successfully migrated, some SATA disks are hibernated. When the SSD space reaches the threshold, when the hotspot chunk needs to be downgraded, the sleeping SATA disk is dynamically woken up.
SSD管理模块,属于支撑模块,需要增加对SSD磁盘的管理,包括磁盘识别、建卷、删卷、告警上报恢复。The SSD management module is a support module. You need to add management to the SSD disk, including disk identification, volume creation, volume deletion, and alarm reporting recovery.
图8是根据本发明优选实施例的磁盘动态休眠方法的交互示意图,如图8所示,该磁盘动态休眠方法包括如下处理:由FLR的调度模块发起chunk升级请求,将SATA盘的热点数据迁移到SSD盘,并删除SATA盘上的数据。并修改数据库中的chunk位置信息。完成热点迁移后,将即将休眠的磁盘做chunk扫描,并上报给FLR的chunk级访问统计模块。依次对N块SATA盘进行休眠。迁移成功后,将chunk放到chunk收益降级队列。在系统设定的分级存储迁移周期(以小时为单位)时间到,发起冷热chunk之间的迁移流量。数据库收集FAS上迁移队列的长度以及正常的读写访问的队列长度,在读写队列长度在阈值之内的,并且迁移队列长度在设定的阈值之内的chunk发起迁移流程,通知FLR将chunk从SATA存储迁移到一级缓存,完成迁移后,对非热点存储的N个SATA盘进行休眠。FIG. 8 is a schematic diagram of interaction of a dynamic sleep mode of a disk according to a preferred embodiment of the present invention. As shown in FIG. 8 , the dynamic sleep method of the disk includes the following process: a cache upgrade request is initiated by a scheduling module of the FLR, and hotspot data of the SATA disk is migrated. Go to the SSD and delete the data on the SATA disk. And modify the chunk location information in the database. After the hotspot migration is completed, the disk that is about to sleep is scanned as a chunk and reported to the chunk-level access statistics module of the FLR. N blocks SATA disks in sequence. After the migration is successful, the chunk is placed in the chunk revenue degradation queue. In the tiered storage migration period (in hours) set by the system, the migration traffic between the hot and cold chunks is initiated. The database collects the length of the migration queue on the FAS and the queue length of the normal read and write access. The chunk whose read/write queue length is within the threshold and whose migration queue length is within the set threshold initiates the migration process, notifying the FLR that the chunk will be chunked. Migrate from SATA storage to L1 cache. After the migration, sleep N non-hotspot storage SATA disks.
图9是根据本发明优选实施例的磁盘动态休眠方法的流程图,如图9所示,该流程包括如下步骤:FIG. 9 is a flowchart of a method for dynamically sleeping a disk according to a preferred embodiment of the present invention. As shown in FIG. 9, the process includes the following steps:
步骤S902,开始对chunk进行分级处理;Step S902, starting to classify the chunk;
步骤S904,判断是否达到降级的阈值,在判断结果为是的情况下,进入步骤S906,否则返回步骤S902;Step S904, it is determined whether the threshold of degradation is reached, if the determination result is yes, proceed to step S906, otherwise return to step S902;
步骤S906,启用降级流程;Step S906, enabling the downgrade process;
步骤S908,获取该卷负载情况,包括:迁移队列长度,IO读写队列长度; Step S908, obtaining the volume load situation, including: migration queue length, IO read/write queue length;
步骤S910,判断读写队列长度是否小于预设阈值,在判断结果为是的情况下,进入步骤S912,否则返回步骤S902;Step S910, determining whether the read/write queue length is less than a preset threshold, if the determination result is yes, proceeding to step S912, otherwise returning to step S902;
步骤S912,判断迁移队列长度是否小于预定阈值,在判断结果为是的情况下,进入步骤S914,否则返回步骤S902;Step S912, determining whether the migration queue length is less than a predetermined threshold, if the determination result is yes, proceeding to step S914, otherwise returning to step S902;
步骤S914,从迁移队列头部取出一个chunk;Step S914, taking a chunk from the head of the migration queue;
步骤S916,通知FLR迁移到一级缓存目的卷;Step S916, notifying the FLR to migrate to the level 1 cache destination volume;
步骤S918,判断迁移是否成功,在判断结果为是的情况下,进入步骤S920,否则返回步骤S912;Step S918, it is determined whether the migration is successful, if the determination result is yes, proceed to step S920, otherwise return to step S912;
步骤S920,将该chunk从迁移升级队列中删除;Step S920, deleting the chunk from the migration upgrade queue;
步骤S922,将该chunk放到降级优先级队列中;Step S922, placing the chunk into the degraded priority queue;
步骤S924,修改该chunk的位置信息,并删除源chunk;Step S924, modifying the location information of the chunk, and deleting the source chunk;
步骤S926,统计SATA盘上的所有chunk并记录;Step S926, counting all the chunks on the SATA disc and recording;
步骤S928,将SATA盘休眠,返回步骤S912。In step S928, the SATA disk is hibernated, and the process returns to step S912.
图10是根据本发明优选实施例的磁盘动态唤醒方法的交互示意图,如图10所示,该磁盘动态唤醒方法包括如下处理:当SSD盘空间达到阈值时,需要对chunk进行降级。由FLR的调试模块发起降级请求,FAS响应对对休眠的磁盘进行动态唤醒。迁移成功后,修改FLR数据库中的chunk位置信息。并将chunk从降级队列中删除。当休眠状态下的磁盘chunk收益达到热点的阈值,对该休眠磁盘进行唤醒。在一级缓存中空间达到设定的阈值,比如80%,则需要发起热点chunk的降级处理。通知FAS唤醒休眠的磁盘,降级处理从chunk降级队列的尾端取出收益低的chunk,从SSD盘迁移到SATA盘中,同时删除SSD盘上的数据,并通知FLR修改chunk位置信息。FIG. 10 is a schematic diagram of interaction of a dynamic wake-up method of a disk according to a preferred embodiment of the present invention. As shown in FIG. 10, the dynamic wake-up method of the disk includes the following process: when the SSD disk space reaches a threshold, the chunk needs to be downgraded. The downgrade request is initiated by the FLR debug module, and the FAS responds to the dynamic wakeup of the dormant disk. After the migration is successful, modify the chunk location information in the FLR database. And remove the chunk from the downgrade queue. When the disk chunk gain in the sleep state reaches the hotspot threshold, the sleep disk is woken up. In the level 1 cache, the space reaches a set threshold, such as 80%, and then the degradation processing of the hotspot chunk needs to be initiated. The FAS is notified to wake up the dormant disk. The downgrade process removes the low-revenue chunk from the tail end of the chunk demotion queue, migrates from the SSD disk to the SATA disk, deletes the data on the SSD disk, and notifies the FLR to modify the chunk location information.
图11是根据本发明优选实施例的磁盘动态唤醒方法的流程图,如图11所示,该流程包括如下步骤:11 is a flowchart of a method for dynamically waking up a disk according to a preferred embodiment of the present invention. As shown in FIG. 11, the process includes the following steps:
步骤S1102,获取所有一级缓存卷列表;Step S1102: Obtain a list of all level 1 cache volumes;
步骤S1104,取一个卷; Step S1104, taking a volume;
步骤S1106,判断该卷空间使用是否已经达到预定阈值,在判断结果为是的情况下,进入步骤S1108,否则返回步骤S1104;Step S1106, it is determined whether the volume space usage has reached a predetermined threshold, if the determination result is yes, proceeds to step S1108, otherwise returns to step S1104;
步骤S1108,从chunk降级队列尾部取出一个收益低的chunk;Step S1108, taking out a chunk with low profit from the tail of the chunk demotion queue;
步骤S1110,唤醒休眠的SATA盘;Step S1110, waking up the sleeping SATA disk;
步骤S1112,通知FLR从一级存储卷SSD中迁移chunk到SATA;Step S1112, notifying the FLR to migrate the chunk to the SATA from the primary storage volume SSD;
步骤S1114,判断迁移是否成功,在判断结果为是的情况下,进入步骤S1116,否则返回步骤S1106;Step S1114, it is determined whether the migration is successful, if the determination result is yes, proceed to step S1116, otherwise return to step S1106;
步骤S1116,将该chunk从迁移队列尾部删除;Step S1116, deleting the chunk from the tail of the migration queue;
步骤S1118,删除SSD中的物理chunk;Step S1118, deleting the physical chunk in the SSD;
步骤S1120,修改数据库chunk的位置信息。In step S1120, the location information of the database chunk is modified.
另外,需要说明的是,上述实施例及优选实施方式可以广泛用于使用海量存储长时间运行的磁盘存储中。In addition, it should be noted that the above embodiments and preferred embodiments can be widely used in disk storage that uses mass storage for a long time.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
如上所述,通过上述实施例及优选实施方式,解决了相关技术中,磁盘休眠技术中存在的只能固定时间休眠和不必要分片修复造成的系统性能浪费的缺陷,进而达到了实现磁盘的动态休眠,提高磁盘系统性能的效果。 As described above, the above embodiments and the preferred embodiments solve the defects in the related art that the system performance waste caused by only fixed-time sleep and unnecessary fragmentation repair exists in the disk sleep technology, thereby achieving the realization of the disk. Dynamic sleep, improving the performance of the disk system.

Claims (10)

  1. 一种磁盘休眠处理方法,包括:A disk sleep processing method includes:
    统计对第一磁盘中各个存储块chunk进行访问的访问热度;Counting the access heat of accessing each chunk of the chunk in the first disk;
    判断对chunk进行访问的所述访问热度是否达到预定阈值;Determining whether the access heat of accessing the chunk reaches a predetermined threshold;
    在判断结果为是的情况下,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到第二磁盘,其中,所述第二磁盘的性能高于第一磁盘;If the result of the determination is yes, the chunk of the first disk whose access heat exceeds the predetermined threshold is migrated to the second disk, wherein the performance of the second disk is higher than that of the first disk;
    对所述第一磁盘进行休眠。Sleeping the first disk.
  2. 根据权利要求1所述的方法,其中,在所述第一磁盘存在至少两个的情况下,对所述第一磁盘进行休眠包括:The method of claim 1, wherein, if there are at least two of the first disks, sleeping the first disk comprises:
    在预定时间内采用预定轮流休眠的方式对所述第一磁盘进行休眠。The first disk is hibernated in a predetermined time by a predetermined period of sleep.
  3. 根据权利要求1所述的方法,其中,在对所述第一磁盘进行休眠之后,还包括:The method of claim 1, wherein after the first disk is hibernated, the method further comprises:
    在满足以下条件至少之一时,唤醒所述第一磁盘:所述第二磁盘达到预定存储阈值、在所述第一磁盘中存在超过所述预定阈值的chunk。The first disk is woken up when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and a chunk exceeding the predetermined threshold exists in the first disk.
  4. 根据权利要求3所述的方法,其中,在所述第二磁盘达到所述预定存储阈值的情况下,唤醒所述第一磁盘包括:The method of claim 3, wherein, if the second disk reaches the predetermined storage threshold, waking up the first disk comprises:
    对所述第二磁盘中的chunk,依据所述chunk的访问热度的高低进行排序;Sorting the chunks in the second disk according to the access heat of the chunks;
    将访问热度排在队列尾端的chunk迁移到所述第一磁盘。The chunk whose access heat is queued at the end of the queue is migrated to the first disk.
  5. 根据权利要求1所述的方法,其中,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到所述第二磁盘包括:The method of claim 1, wherein migrating a chunk of the first disk with a heat of access exceeding the predetermined threshold to the second disk comprises:
    对统计所述第一磁盘中的所述chunk,依据所述访问热度进行排序;And counting the chunks in the first disk according to the access heat;
    将超过所述预定阈值的chunk迁移到所述第二磁盘。A chunk exceeding the predetermined threshold is migrated to the second disk.
  6. 一种磁盘休眠处理装置,包括:A disk sleep processing device includes:
    统计模块,设置为统计对第一磁盘中各个存储块chunk进行访问的访问热度;The statistics module is configured to count the access heat of accessing each chunk of the storage block in the first disk;
    判断模块,设置为判断对chunk进行访问的所述访问热度是否达到预定阈值; a determining module, configured to determine whether the access heat of accessing the chunk reaches a predetermined threshold;
    迁移模块,设置为在所述判断模块的判断结果为是的情况下,将所述第一磁盘中访问热度超过所述预定阈值的chunk迁移到第二磁盘,其中,所述第二磁盘的性能高于第一磁盘;a migration module, configured to migrate a chunk of the first disk whose access heat exceeds the predetermined threshold to a second disk, where the result of the determining by the determining module is YES, wherein the performance of the second disk Higher than the first disk;
    休眠模块,设置为对所述第一磁盘进行休眠。The hibernation module is configured to sleep on the first disk.
  7. 根据权利要求6所述的装置,其中,所述休眠模块包括:The apparatus of claim 6, wherein the hibernation module comprises:
    休眠单元,设置为在所述第一磁盘存在至少两个的情况下,在预定时间内采用预定轮流休眠的方式对所述第一磁盘进行休眠。The sleep unit is configured to sleep the first disk in a predetermined time in a predetermined time when there is at least two of the first disks.
  8. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    唤醒模块,设置为在满足以下条件至少之一时,唤醒所述第一磁盘:所述第二磁盘达到预定存储阈值、在所述第一磁盘中存在超过所述预定阈值的chunk。The wake-up module is configured to wake up the first disk when at least one of the following conditions is met: the second disk reaches a predetermined storage threshold, and a chunk exceeding the predetermined threshold exists in the first disk.
  9. 根据权利要求8所述的装置,其中,所述唤醒模块包括:The apparatus of claim 8, wherein the wake-up module comprises:
    第一排序单元,设置为在所述第二磁盘达到所述预定存储阈值的情况下,对所述第二磁盘中的chunk,依据所述chunk的访问热度的高低进行排序;a first sorting unit, configured to sort the chunks in the second disk according to the access heat of the chunks when the second disk reaches the predetermined storage threshold;
    第一迁移单元,设置为将访问热度排在队列尾端的chunk迁移到所述第一磁盘。The first migration unit is configured to migrate the chunk whose access heat is queued at the end of the queue to the first disk.
  10. 根据权利要求6所述的装置,其中,迁移模块包括:The apparatus of claim 6 wherein the migration module comprises:
    第二排序单元,设置为对统计所述第一磁盘中的所述chunk,依据所述访问热度进行排序;a second sorting unit, configured to sort the chunks in the first disk according to the access heat;
    第二迁移单元,设置为将超过所述预定阈值的chunk迁移到所述第二磁盘。 And a second migration unit configured to migrate a chunk exceeding the predetermined threshold to the second disk.
PCT/CN2014/087721 2014-06-05 2014-09-28 Method and device for processing magnetic disk hibernation WO2015184710A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410247732.0A CN105138416A (en) 2014-06-05 2014-06-05 Disk sleep processing method and apparatus
CN201410247732.0 2014-06-05

Publications (1)

Publication Number Publication Date
WO2015184710A1 true WO2015184710A1 (en) 2015-12-10

Family

ID=54723772

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087721 WO2015184710A1 (en) 2014-06-05 2014-09-28 Method and device for processing magnetic disk hibernation

Country Status (2)

Country Link
CN (1) CN105138416A (en)
WO (1) WO2015184710A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733308B (en) * 2017-04-17 2021-06-22 伊姆西Ip控股有限责任公司 Method and apparatus for managing disk pool
CN109725835B (en) * 2017-10-27 2022-04-29 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing disk array
CN110858124B (en) 2018-08-24 2021-06-01 华为技术有限公司 Data migration method and device
CN111104048B (en) 2018-10-26 2021-02-12 华为技术有限公司 Data processing method and distributed storage system
CN109710587A (en) * 2018-12-29 2019-05-03 优刻得科技股份有限公司 Data hierarchy method, system, equipment and medium based on Ceph
CN112612414B (en) * 2020-12-18 2022-06-17 杭州前云数据技术有限公司 System for realizing cold data distributed storage based on microprocessor system scheduling
CN117151939B (en) * 2023-10-26 2024-02-20 杭州青橄榄网络技术有限公司 Self-service check-in method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520689A (en) * 2009-04-17 2009-09-02 成都市华为赛门铁克科技有限公司 Computer memory device control method, computer memory device controller and memory device
US20120260116A1 (en) * 2011-04-11 2012-10-11 Szu-Ming Chen External power-saving usb mass storage device and power-saving method thereof
CN103092328A (en) * 2013-02-22 2013-05-08 浪潮电子信息产业股份有限公司 Computer energy conservation method based on magnetic disc dormancy
CN103576835A (en) * 2013-10-30 2014-02-12 华为技术有限公司 Data manipulation method and device for sleep disk

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8789028B2 (en) * 2006-06-30 2014-07-22 International Business Machines Corporation Memory access monitoring
CN102411542A (en) * 2011-10-26 2012-04-11 上海文广互动电视有限公司 Dynamic hierarchical storage system and method
CN102523279B (en) * 2011-12-12 2015-09-23 深圳市安云信息科技有限公司 A kind of distributed file system and focus file access method thereof
CN103186350B (en) * 2011-12-31 2016-03-30 北京快网科技有限公司 The moving method of mixing storage system and hot spot data block

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101520689A (en) * 2009-04-17 2009-09-02 成都市华为赛门铁克科技有限公司 Computer memory device control method, computer memory device controller and memory device
US20120260116A1 (en) * 2011-04-11 2012-10-11 Szu-Ming Chen External power-saving usb mass storage device and power-saving method thereof
CN103092328A (en) * 2013-02-22 2013-05-08 浪潮电子信息产业股份有限公司 Computer energy conservation method based on magnetic disc dormancy
CN103576835A (en) * 2013-10-30 2014-02-12 华为技术有限公司 Data manipulation method and device for sleep disk

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GUIDELINE ON DYNAMIC HIERARCHICAL STORAGE CHARACTERISTICS, OCEAN STOR N8500 CLUSTER NAS STORAGE SYSTEM V200R001, 8 February 2014 (2014-02-08), pages 2 - 3 , 5-12 and 26-27, Retrieved from the Internet <URL:support.huawei.com/enterprise/docinforeader.action?contentId=D0C0000713408> *

Also Published As

Publication number Publication date
CN105138416A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
WO2015184710A1 (en) Method and device for processing magnetic disk hibernation
US20220107736A1 (en) Adaptive file storage method and apparatus
US9471134B2 (en) Method and apparatus for managing power of a storage system
Park et al. Characterizing datasets for data deduplication in backup applications
US20150193154A1 (en) Data Migration Method, Data Migration Apparatus, and Storage Device
WO2015154352A1 (en) Data migration method and device for distributed file system, and metadata server
US8578112B2 (en) Data management system and data management method
US12008263B2 (en) Garbage collection and data storage method and apparatus, and storage system
CN102982122A (en) Repeating data deleting method suitable for mass storage system
CN102467571A (en) Data block partition method and addition method for data de-duplication
CN108089825B (en) Storage system based on distributed cluster
CN106815342A (en) A kind of distributed file system user quota system and method
JP6060276B2 (en) Monitoring record management method and device
CN115291806A (en) Processing method, processing device, electronic equipment and storage medium
WO2018000191A1 (en) Method and device for data processing
JP6582721B2 (en) Control device, storage system, and control program
TWI684131B (en) Data transmission device, data transmission method and non-transitory computer readable medium
US11232228B2 (en) Method and device for improving data storage security
CN115981559A (en) Distributed data storage method and device, electronic equipment and readable medium
WO2017122263A1 (en) Management computer and management method
US11989415B2 (en) Enabling or disabling data reduction based on measure of data overwrites
CN102541759A (en) Cache control device and cache control method
US20150317403A1 (en) System and method for management of data based bookmarks
CN111949437A (en) Erasure code strategy conversion test method and system based on heat perception
TW202309884A (en) Method, server and storage medium for resource scheduling

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: 14893726

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: 14893726

Country of ref document: EP

Kind code of ref document: A1