WO2015062316A1 - 一种休眠磁盘的数据操作方法和装置 - Google Patents

一种休眠磁盘的数据操作方法和装置 Download PDF

Info

Publication number
WO2015062316A1
WO2015062316A1 PCT/CN2014/083071 CN2014083071W WO2015062316A1 WO 2015062316 A1 WO2015062316 A1 WO 2015062316A1 CN 2014083071 W CN2014083071 W CN 2014083071W WO 2015062316 A1 WO2015062316 A1 WO 2015062316A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk
hotspot
data
hot
disks
Prior art date
Application number
PCT/CN2014/083071
Other languages
English (en)
French (fr)
Inventor
胡伟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015062316A1 publication Critical patent/WO2015062316A1/zh

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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • 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/0625Power saving in 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
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of data storage, and in particular to a data operation method and apparatus for a dormant disk.
  • BACKGROUND OF THE INVENTION At present, under the premise of ensuring data reliability, how to maximize energy saving for users is the research focus and difficulty of major storage vendors, and is also regarded as green storage by major mainstream storage vendors in the industry. Among them, disk hibernation technology is a bright spot technology in the concept of green storage.
  • Common disk hibernation methods include RAID (Redundant Arrays of Inexpensive Disks) group hibernation and storage pool hibernation. Both hibernation methods perform sleep and wake-up processing for all disks in a RAID group or storage pool. The specific is. After the guest has configured the sleep time period, all disks in the RAID group or storage pool go to sleep during the disk sleep period. Otherwise, all disks in the RAID group or storage pool are awake during the non-sleep period. For example, in a storage pool with 20 disks, if the user configures the sleep time period from 20:00 every night to 8:00 am the next day, during this time period, all 20 disks of the storage pool are entered. Sleep state.
  • the inventors of the present invention have found that at least the following problems exist in the prior art: in the sleep period that the user has configured, if the host continuously sends a data operation request, it is necessary to frequently store the data. All disks in the pool wake up. In this case, disk hibernation technology does not really achieve energy savings.
  • an embodiment of the present invention provides a data operation method and apparatus for disk hibernation to implement an energy saving effect of a magnetic disk.
  • a data operation method for a dormant disk is disclosed.
  • the frequency of accessing the disk is periodically counted, and the disk is divided into two according to the frequency of frequent access of the disk.
  • Hot-spot disks and non-hotspot disks wherein the disks with high access frequency are hot-spot disks, and the disks with low access frequency are non-hotspot disks;
  • the method includes:
  • the operated data is in the hotspot disk, only wake up the hotspot disk where the operated data is located, and perform corresponding data operations on the operated data in the awake hotspot disk; if it is determined that the operation is performed Data in the non-hotspot disk, only waking up the non-hotspot disk where the operated data is located, performing corresponding data operations on the operated data in the awake non-hotspot disk, and waking up the non-hotspot disk The data is migrated to the hotspot disk.
  • the invention also has a first possibility that the hotspot disk is always in an awake state during the sleep period.
  • the present invention further has a second possibility, that is, the method further includes: after dividing the disk into a hot disk and a non-hotspot disk according to the frequency of frequent access of the disk according to periodic statistics, according to the Setting the access frequency of the hotspot disk to set the hotspot disk to be in an awake state or in a sleep state during the sleep period;
  • the hotspot disk is in a wake state when the frequency of the access is greater than or equal to the preset frequency threshold, and the hotspot disk is in a sleep state when the access frequency is less than the preset frequent threshold.
  • the hotspot disk determines whether the hotspot disk where the operated data is located is currently in an awake state or a sleep state, and if in a sleep state, waking up the hotspot disk where the operated data is located, and The operated data in the awake hotspot disk performs corresponding data operations, and if in the awake state, directly enters the operated data in the awake hotspot disk The corresponding data operation is performed.
  • the present invention also has a third possibility, that is, the frequency of accessing the disk by the periodic statistics, and the disk is divided into a hot disk and a non-hot disk according to the frequency of access of the disk, including:
  • the disk access frequency is counted frequently, and the disk is divided into a hot disk and a non-hot disk according to the latest statistics of the disk access frequency;
  • the disk access frequency is counted frequently, and the disk is divided into hot disk and non-hot disk according to the latest statistics of the disk access frequency.
  • the present invention also has a fourth possibility that the frequency of access of the disk includes: the total number of accesses to the disk and/or the longest access interval of the disk;
  • a data operating device for a dormant disk including:
  • the disk dividing unit is configured to periodically count the frequency of disk access during the sleep period of the disk, and divide the disk into a hot disk and a non-hot disk according to the frequency of frequent access of the disk, where a frequently accessed disk is accessed.
  • the disk with low access frequency is a non-hot disk;
  • An operation response unit configured to determine, according to a data operation request sent by the host during a disk sleep period, whether the operated data for the data operation request is in the hotspot disk or the non-hot disk;
  • a first data operation unit configured to: if it is determined that the operated data is in the hotspot disk, only wake up the hotspot disk where the operated data is located, and perform corresponding data on the operated data in the awake hotspot disk Operation
  • a second data operation unit configured to: if it is determined that the operated data is in the non-hotspot disk, only wake up the non-hotspot disk where the operated data is located, and perform the operated data in the awake non-hotspot disk Corresponding data operations, and migrating data from the awake non-hotspot disk to the hotspot disk.
  • the present invention also has a first possibility that the hot disk is in the It is always in the awake state during the sleep period.
  • the present invention has a second possibility that the apparatus further includes: a sleep period adjustment unit, configured to divide the disk into hotspot disks according to the frequency of frequent access of the disks according to periodic statistics. After the non-hotspot disk is set, the hotspot disk is in an awake state or a dormant state during the sleep period according to the access degree of the hotspot disk;
  • a sleep period adjustment unit configured to divide the disk into hotspot disks according to the frequency of frequent access of the disks according to periodic statistics. After the non-hotspot disk is set, the hotspot disk is in an awake state or a dormant state during the sleep period according to the access degree of the hotspot disk;
  • the hotspot disk is in a wake state when the frequency of the access is greater than or equal to the preset frequency threshold, and the hotspot disk is in a sleep state when the access frequency is less than the preset frequent threshold.
  • the first data operation unit is specifically configured to: if it is determined that the operated data is in the hotspot disk, determine whether the hotspot disk where the operated data is located is currently in an awake state or a sleep state, and if in a sleep state, wake up The hot-spot disk on which the data to be operated is located, and performing corresponding data operations on the operated data in the awake hot-spot disk, and if in the awake state, directly performing the corresponding operation data on the awake hot-hot disk Data manipulation.
  • the present invention also has a third possibility that the disk dividing unit comprises:
  • the first dividing subunit is configured to count the frequency of access of the disk once the data operation request sent by the host is received, and divide the disk into a hot disk and a non-hotspot disk according to the latest frequency of the disk access;
  • the second sub-unit is configured to count the frequency of disk accesses after each data operation, and divide the disks into hot disk and non-hot disks according to the latest statistics of the disk access frequency.
  • the present invention also has a fourth possibility that the frequency of access of the disk includes: the total number of accesses of the disk and/or the longest access interval of the disk;
  • the advantages of the present invention are compared with the prior art: in the sleep period of the disk, once the host frequently has a data operation request, in most cases, the data for the data operation request is It is derived from a hot-spot disk, and only needs to wake up the hot-spot disk frequently, so that the sleep state of the non-hotspot disk can be guaranteed (and not all the disks are frequently awake), and the energy-saving effect is finally achieved.
  • FIG. 1 is a schematic diagram of data operation of a sleep disk in the prior art
  • FIG. 2 is a flowchart of an embodiment of a data operation method for a dormant disk according to the present invention
  • FIG. 3 is a schematic diagram of dividing a sleep disk according to the present invention
  • FIG. 4 is a schematic diagram of statistics on the frequency of access to a disk in the present invention.
  • FIG. 5 is a flowchart of another embodiment of a data operation method for a dormant disk according to the present invention
  • FIG. 6 is a flowchart of an embodiment of a data reading method for a dormant disk according to the present invention
  • FIG. 8 is a structural diagram of another embodiment of a data operating device for a dormant disk according to the present invention
  • Embodiments of the present invention provide a data operation method and apparatus for a dormant disk.
  • the core of the present invention is as follows: According to the frequency of access of the disk, the disk is divided into two types: a hot disk and a non-hot disk (a hot disk is frequently accessed, and a non-hot disk is frequently accessed), and the disk is periodically updated. Types of. Also, whenever the data operation request is for a non-hotspot disk, the data in the non-hotspot disk is migrated to the hotspot disk. In this way, the hit rate in the hotspot disk can be increased, that is, the probability that the data for the data operation request is located on the hotspot disk is increased.
  • the data for the data operation request is from the hot disk, and only needs to wake up the hot disk frequently, so that Guarantee the sleep state of non-hotspot disks (without waking up all the disks frequently), and finally achieve energy saving effect.
  • FIG. 2 is a flowchart of an embodiment of a data operation method for a dormant disk according to the present invention.
  • the method includes the following steps: Step 201: Regularly count the frequency of disk access during the sleep period of the disk, and divide the disk into a hot disk and a non-hot disk according to the frequency of frequent access of the disk.
  • the disk with high access frequency is a hot disk.
  • the disk with low access frequency is a non-hotspot disk; as shown in Figure 3, the disk is divided into hot disk and non-hot disk according to the frequency of disk access.
  • the frequency of access to the disk includes: the total number of accesses to the disk and/or the longest access interval of the disk. The greater the total number of visits and/or the smaller the maximum access interval, the higher the frequency of visits, the smaller the total number of visits and/or the longer the maximum access interval, the lower the frequency of visits.
  • a threshold value may be preset and/or a threshold value may be preset.
  • Disk access is frequent.
  • the disk access frequency is low.
  • the average access frequency can also be used to describe the frequency of disk access. That is, when the average access frequency is greater than or equal to the preset frequency threshold, the access frequency is high, and when the average access frequency is less than the preset frequency threshold, the access frequency is low. Or, distinguish the frequency of disk access by sorting the average access frequency of each disk.
  • the average access interval can also be used to describe the frequency of access to the disk. That is, when the average access interval is less than or equal to the preset interval threshold, the access frequency is high, and the average access interval is greater than the preset interval threshold. low. Or, distinguish the frequency of disk access by sorting the average access interval of each disk.
  • the preset time period can also be arbitrarily set by the user according to actual needs, which can be the time interval between the current statistics and the last statistics, as shown in FIG. 4 .
  • the time interval between the current statistics and the last statistics is too long, it can be a period of time.
  • it may be a time interval from the start of the first statistics to the current statistics in the current sleep period.
  • the hit rate of the hotspot disk must be improved by: periodically counting the frequency of access of the disk, and dividing the disk into a hot disk and a non-hot disk according to the frequency of access of the disk according to the latest statistics, and Migrate data from non-hotspot disks to hotspot disks. Therefore, the more frequently this part is executed, the higher the hit rate of hotspot disks.
  • the frequency of accessing the disk is counted, and the disk is classified into a hot spot according to the latest statistically accessed frequency of the disk. Disks and non-hotspot disks, and migrate data from non-hotspot disks to hotspot disks.
  • Step 202 Determine, according to the data operation request sent by the host during the sleep period of the disk, whether the operated data for the data operation request is in the hotspot disk or the non-hotspot disk;
  • Step 203 The operated data is in the hotspot disk, and only the hotspot disk where the operated data is located is awake, and the corresponding data operation is performed on the operated data in the awake hotspot disk.
  • Step 204 If it is determined that the operated data is in the non-hotspot disk, only wake up the non-hotspot disk where the operated data is located, and perform corresponding data operations on the operated data in the awake non-hotspot disk. The data in the awake non-hotspot disk is migrated to the hotspot disk.
  • the hotspot disk and the non-hotspot disk are in a dormant state during the disk sleep period. Since the hotspot disk is frequently accessed, in addition to this implementation, the hotspot disk can be awake during the disk sleep period, and only the non-hotspot disk is dormant during the disk sleep period. In this case, the step of waking up the hotspot disk can be omitted in step 203.
  • the data operation request includes a data read request and a data write request.
  • the host sends a data read request during the sleep period of the disk. If the read data for the data read request is in the hotspot disk, only the hot disk that is read by the data is woken up, and then read. Take the read data in the wake-up hotspot disk. If the read data for the data read request is in the non-hotspot disk, only the non-hotspot disk where the read data is located is awake, and then the read data in the awake non-hotspot disk is read.
  • a preferred manner is that the hot disk is uniformly set to be in the awake state during the disk sleep period.
  • the hot-spot disk is always in the awake state, the effect of energy saving cannot be better reflected.
  • the frequency of access of the hot-spot disk is determined according to the frequency of access of the hot-spot disk.
  • the hotspot disk is in the awake state or the sleep state in the period before the next statistic, and the energy saving on the hotspot disk is realized by the segmentation processing.
  • FIG. 5 it is a flowchart of another embodiment of a data operation method for a dormant disk according to the present invention. The method includes the following steps:
  • Step 501 Regularly count the frequency of disk access during the sleep period of the disk, and divide the disk into hot disk and non-hot disk according to the frequency of frequent access of the disk, wherein the disk with high frequency of access is a hot disk.
  • the disk with low access frequency is a non-hotspot disk;
  • Step 502 Set the hotspot disk to be in an awake state or a sleep state during the sleep period according to the frequency of access of the hotspot disk;
  • the hotspot disk is in a sleep state when the frequency of the access is greater than or equal to the preset frequency threshold, and the hotspot disk is in a sleep state when the access frequency is less than the preset frequency threshold.
  • the preset frequentness threshold may be arbitrarily set by the user according to actual needs, and the technical solution of the present invention is not specifically limited.
  • Step 503 Determine, according to the data operation request sent by the host during the sleep period of the disk, whether the operated data for the data operation request is in the hotspot disk or the non-hotspot disk;
  • Step 504 If it is determined The operation data is in the hotspot disk, determining whether the hotspot disk where the data to be operated is currently in the awake state or the sleep state, if in the sleep state, proceeding to step 505, if in the awake state, proceeding to step 506;
  • Step 505 Awakening the hotspot disk where the operated data is located, and performing corresponding data operations on the operated data in the awake hotspot disk, and ending the process;
  • Step 506 Perform corresponding data operations on the operated data in the awake hotspot disk directly, end the process, and end the process;
  • Step 507 If it is determined that the operated data is in the non-hotspot disk, only wake up the non-hotspot disk where the operated data is located, perform corresponding data operation on the operated data in the awake non-hotspot disk, and The data in the awake non-hotspot disk is migrated to the hotspot disk, and the process ends.
  • the following takes a specific application scenario as an example to describe in detail the data operation method for the dormant disk.
  • the disk located in the storage server is in the process of sleeping.
  • the data operation is implemented as follows.
  • FIG. 6 is a flowchart of an embodiment of a data reading method for a dormant disk according to the present invention. The method includes the following steps:
  • Step 601 Query the disk mapped by the data for the data read request
  • the disk to which the data for the data read request is mapped is simply referred to as the target disk.
  • Step 602 Update the historical access record of the target disk according to the current data read request; wherein, at least the total number of accesses of the disk is recorded in the historical access record of the disk.
  • Step 603 Query the attribute of the target disk, and wake up the sleeping disk according to the attribute of the target disk, and read data from the target disk and return it to the application server; According to the attributes, the disk is divided into a hot disk and a non-hot disk. In the sleep period of the disk, the hot disk is always in the awake state, while the non-hot disk is in the sleep state without data operation, and in the case of data operation. Was awakened.
  • the hotspot disk is awake and the non-hotspot is in hibernation, you only need to wake up a non-hot disk that is in hibernation.
  • Step 604 Read the total number of accesses of the target disk from the historical access records of each disk, and update the attributes of each disk according to the total number of accesses of each disk, and migrate the data in the non-hotspot disk to the hot disk;
  • Step 605 Wake up the updated hotspot disk, and hibernate the updated non-hotspot disk.
  • the embodiment of the present invention further provides a data operation device for the sleep disk.
  • FIG. 7 is a structural diagram of an embodiment of a data operating device for a dormant disk according to the present invention.
  • the device includes: a disk dividing unit 701, an operation response unit 702, a first data operating unit 703, and a second data operation. Unit 704.
  • the internal structure and connection relationship will be further described below in conjunction with the working principle of the device.
  • the disk dividing unit 701 is configured to periodically count the frequency of disk access during the sleep period of the disk, and divide the disk into a hot disk and a non-hot disk according to the frequency of frequent access of the disk, wherein the access frequency is high.
  • the disk is a hot disk, and the disk with low access frequency is a non-hot disk;
  • the operation response unit 702 is configured to determine, according to the data operation request sent by the host during the sleep period of the disk, the operated data for the data operation request in the hotspot disk or the non-hotspot disk; a first data operation unit 703, configured to: if it is determined that the operated data is in a hotspot disk, only wake up the hotspot disk where the operated data is located, perform corresponding data operation on the operated data in the awake hotspot disk .
  • a second data operation unit 704 configured to: if it is determined that the operated data is in the non-hotspot disk, only wake up the non-hotspot disk where the operated data is located, and the operated data in the non-hotspot disk that is awake Perform corresponding data operations and migrate data from the awake non-hotspot disk to the hotspot disk.
  • the hotspot disk is always in an awake state during the sleep period.
  • the disk dividing unit 701 includes:
  • the first dividing subunit is configured to count the frequency of access of the disk once the data operation request sent by the host is received, and divide the disk into a hot disk and a non-hotspot disk according to the latest frequency of the disk access;
  • the second sub-unit is configured to count the frequency of disk accesses after each data operation, and divide the disks into hot disk and non-hot disks according to the latest statistics of the disk access frequency.
  • the frequency of accessing the disk includes: the total number of accesses of the disk and/or the longest access interval of the disk;
  • the device further includes:
  • the sleep time period adjustment unit 705 is configured to set the hotspot disk according to the frequency of access of the hotspot disk after the disk is divided into a hot disk and a non-hotspot disk according to the frequency of accessing the disk according to the periodic statistics. If the frequency of the access is greater than or equal to the preset frequency threshold, the hotspot disk is in the awake state, and the access frequency is less than the preset frequency threshold. The hotspot disk is in a sleep state;
  • the first data operation unit 703 is specifically configured to: if it is determined that the operated data is in the hotspot disk, determine whether the hotspot disk where the operated data is located is currently in an awake state or a sleep state, if in a sleep state, Wake up the hotspot disk where the operated data is located, and perform corresponding data operations on the operated data in the awake hotspot disk, if in the awake state, directly Performing corresponding data operations on the manipulated data in the awake hotspot disk.
  • the advantages of the present invention are compared with the prior art: in the sleep period of the disk, once the host frequently has a data operation request, in most cases, the data for the data operation request is It is derived from a hot-spot disk, and only needs to wake up the hot-spot disk frequently, so that the sleep state of the non-hotspot disk can be guaranteed (and not all the disks are frequently awake), and the energy-saving effect is finally achieved.
  • the specific working process of the system, the device and the unit described above can refer to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined. Or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the components displayed by the meta may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware, and can be implemented in the form of a software functional unit.
  • the storage medium may be a magnetic disk, an optical disk, or a read-only storage memory.

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)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种休眠磁盘的数据操作方法和装置。其中,方法包括:在磁盘休眠时段内,定期统计磁盘的访问频繁程度,根据磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁盘;响应主机在磁盘休眠时段内发送的数据操作请求,确定数据操作请求所针对的被操作数据在热点磁盘还是在非热点磁盘中;如果确定被操作数据在热点磁盘中,仅唤醒被操作数据所在的热点磁盘,对唤醒的热点磁盘中的被操作数据进行相应的数据操作;如果确定被操作数据在非热点磁盘中,仅唤醒被操作数据所在的非热点磁盘,对唤醒的非热点磁盘中的被操作数据进行相应的数据操作,并将唤醒的非热点磁盘中的数据迀移到热点磁盘中。可以实现磁盘的节能效果。

Description

一种休眠磁盘的数据操作方法和装置 本申请要求于 2013年 10月 30日提交中国专利局、申请号 201310528922.5、 发明名称为 "一种休眠磁盘的数据操作方法和装置"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域 本发明涉及数据存储领域,特别是涉及一种休眠磁盘的数据操作方法和装 置。 背景技术 目前, 在保证数据可靠性的前提下, 如何最大限度地为用户节能是各大存 储厂商的研究重点和难点,也被业界各大主流存储厂商推崇为绿色存储。其中, 磁盘休眠技术便是绿色存储概念中的一大亮点技术。
常见的磁盘休眠方法主要包括有 RAID ( Redundant Arrays of Inexpensive Disks, 磁盘阵列)组休眠和存储池休眠, 这两种休眠方法都是针对 RAID组或 存储池中的所有磁盘进行休眠和唤醒处理。 具体的就是。 在客户配置了休眠时 间段后, 在磁盘休眠时段内, RAID组或存储池中的所有磁盘进入休眠状态, 反之, 在非休眠时间段内, RAID组或存储池中的所有磁盘处于唤醒状态。 例 如, 在包含有 20个磁盘的存储池中, 如果用户将休眠时间段配置为每天晚上 20:00至次日早上 8:00, 在这一时间段内, 该存储池的 20个磁盘全部进入休眠 状态。
在磁盘休眠时段内, 参阅图 1所示, 如果主机通过 I/O通道发送数据操作 请求(包括读取请求和写入请求) , 先将存储池中正处于休眠状态的所有磁盘 都唤醒, 然后根据操作请求执行相应的操作, 操作完毕后, 存储池中的所有磁 盘会再次进入休眠状态。
但是, 在实现本发明的过程中, 本发明的发明人发现现有技术中至少存在 如下问题:在用户已配置好的休眠时间段内,如果主机持续发送数据操作请求, 就需要频繁地将存储池中的所有磁盘唤醒。 在这种情况下, 磁盘休眠技术无法 真正地达到节能效果。
发明内容 为了解决上述技术问题, 本发明实施例提供了一种磁盘休眠的数据操作方 法和装置, 以实现磁盘的节能效果。
本发明实施例公开了如下技术方案:
根据本发明实施例的第一方面, 公开了一种休眠磁盘的数据操作方法, 在 磁盘休眠时段内, 定期统计磁盘的访问频繁程度, 根据定期统计的所述磁盘的 访问频繁程度将磁盘划分为热点磁盘和非热点磁盘, 其中, 访问频繁程度高的 磁盘为热点磁盘, 访问频繁程度低的磁盘为非热点磁盘;
所述方法包括:
响应于主机在磁盘休眠时段内发送的数据操作请求,确定所述数据操作请 求所针对的被操作数据在所述热点磁盘还是在所述非热点磁盘中;
如果确定所述被操作数据在所述热点磁盘中,仅唤醒所述被操作数据所在 的热点磁盘, 对唤醒的热点磁盘中的所述被操作数据进行相应的数据操作; 如果确定所述被操作数据在所述非热点磁盘中,仅唤醒所述被操作数据所 在的非热点磁盘,对唤醒的非热点磁盘中的所述被操作数据进行相应的数据操 作, 并将唤醒的非热点磁盘中的数据迁移到所述热点磁盘中。
结合本发明的第一方面, 本发明还具有第一种可能, 即所述热点磁盘在所 述休眠时间段内始终处于唤醒状态。
结合本发明的第一方面, 本发明还具有第二种可能, 即所述方法还包括: 在根据定期统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非 热点磁盘之后,根据所述热点磁盘的访问频繁程度设置所述热点磁盘在所述休 眠时间段内处于唤醒状态或者处于休眠状态;
其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点磁盘 处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热点磁盘处 于休眠状态;
则如果确定所述被操作数据在所述热点磁盘中,仅唤醒所述被操作数据所 在的热点磁盘,对唤醒的热点磁盘中的所述被操作数据进行相应的数据操作具 体为:
如果确定所述被操作数据在所述热点磁盘中, 判断所述被操作数据所在的 热点磁盘当前处于唤醒状态还是休眠状态, 如果处于休眠状态, 唤醒所述被操 作数据所在的热点磁盘, 并对唤醒的热点磁盘中的所述被操作数据进行相应的 数据操作, 如果处于唤醒状态, 直接对唤醒的热点磁盘中的所述被操作数据进 行相应的数据操作。
结合本发明的第一方面, 本发明还具有第三种可能, 即所述定期统计磁盘 的访问频繁程度,根据所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热 点磁盘, 包括:
每当接收到主机发送的数据操作请求后, 统计一次磁盘的访问频繁程度, 根据最新统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁 盘;
或者,
每进行一次数据操作后, 统计一次磁盘的访问频繁程度, 根据最新统计的 所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁盘。
结合本发明的第一方面, 本发明还具有第四种可能, 即所述磁盘的访问频 繁程度包括: 磁盘的总访问次数和 /或磁盘的最长访问间隔;
则总访问次数越大和 /或最长访问间隔越小时,访问频繁程度越高, 总访问 次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
根据本发明实施例的第二方面, 公开了一种休眠磁盘的数据操作装置, 包 括:
磁盘划分单元, 用于在磁盘休眠时段内, 定期统计磁盘的访问频繁程度, 根据定期统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁 盘, 其中, 访问频繁程度高的磁盘为热点磁盘, 访问频繁程度低的磁盘为非热 点磁盘;
操作响应单元, 用于响应于主机在磁盘休眠时段内发送的数据操作请求, 确定所述数据操作请求所针对的被操作数据在所述热点磁盘还是在所述非热 点磁盘中;
第一数据操作单元, 用于如果确定所述被操作数据在所述热点磁盘中, 仅 唤醒所述被操作数据所在的热点磁盘,对唤醒的热点磁盘中的所述被操作数据 进行相应的数据操作;
第二数据操作单元, 用于如果确定所述被操作数据在所述非热点磁盘中, 仅唤醒所述被操作数据所在的非热点磁盘,对唤醒的非热点磁盘中的所述被操 作数据进行相应的数据操作, 并将唤醒的非热点磁盘中的数据迁移到所述热点 磁盘中。
结合本发明的第二方面, 本发明还具有第一种可能, 即所述热点磁盘在所 述休眠时间段内始终处于唤醒状态。
结合本发明的第二方面, 本发明还具有第二种可能, 即所述装置还包括: 休眠时间段调整单元, 用于在根据定期统计的所述磁盘的访问频繁程度将 磁盘划分为热点磁盘和非热点磁盘之后,根据所述热点磁盘的访问频繁程度设 置所述热点磁盘在所述休眠时间段内处于唤醒状态或者处于休眠状态;
其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点磁盘 处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热点磁盘处 于休眠状态;
则所述第一数据操作单元具体用于, 如果确定所述被操作数据在所述热点 磁盘中, 判断所述被操作数据所在的热点磁盘当前处于唤醒状态还是休眠状 态, 如果处于休眠状态, 唤醒所述被操作数据所在的热点磁盘, 并对唤醒的热 点磁盘中的所述被操作数据进行相应的数据操作, 如果处于唤醒状态, 直接对 唤醒的热点磁盘中的所述被操作数据进行相应的数据操作。
结合本发明的第二方面, 本发明还具有第三种可能, 即所述磁盘划分单元 包括:
第一划分子单元, 用于每当接收到主机发送的数据操作请求后, 统计一次 磁盘的访问频繁程度,根据最新统计的所述磁盘的访问频繁程度将磁盘划分为 热点磁盘和非热点磁盘;
或者,
第二划分子单元, 用于每进行一次数据操作后, 统计一次磁盘的访问频繁 程度,根据最新统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热 点磁盘。
结合本发明的第二方面, 本发明还具有第四种可能, 即所述磁盘的访问频 繁程度包括: 磁盘的总访问次数和 /或磁盘的最长访问间隔;
则总访问次数越大和 /或最长访问间隔越小时,访问频繁程度越高, 总访问 次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
由上述实施例可以看出, 与现有技术相比, 本发明的优点在于: 在磁盘休眠时段内, 一旦主机频繁有数据操作请求, 在多数情况下, 这些 数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤醒热 点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所有的 磁盘) , 最终实现了节能的效果。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术中休眠磁盘的数据操作示意图;
图 2为本发明一种休眠磁盘的数据操作方法的一个实施例的流程图; 图 3为本发明中划分休眠磁盘的示意图;
图 4为本发明中一种对磁盘的访问频繁程度进行统计的示意图;
图 5为本发明一种休眠磁盘的数据操作方法的另一个实施例的流程图; 图 6为本发明一种休眠磁盘的数据读取方法的一个实施例的流程图; 图 7为本发明一种休眠磁盘的数据操作装置的一个实施例的结构图; 图 8为本发明一种休眠磁盘的数据操作装置的另一个实施例的结构图。 具体实施方式 本发明实施例提供了休眠磁盘的数据操作方法和装置。 本发明的核心在 于: 根据磁盘的访问频繁程度将磁盘分为热点磁盘和非热点磁盘两种类型(访 问频繁程度高的是热点磁盘, 访问频繁程度低的是非热点磁盘) , 并定期更新 磁盘的类型。 并且, 每当数据操作请求所针对数据在非热点磁盘中时, 就将非 热点磁盘中的数据迁移到热点磁盘中。 通过这种方式, 可以提高热点磁盘中命 中率, 即, 提高数据操作请求所针对数据位于热点磁盘的概率。
这样,在磁盘休眠时段内,一旦主机频繁有数据操作请求,在多数情况下, 这些数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤 醒热点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所 有的磁盘) , 最终实现了节能的效果。
为使本发明的上述目的、 特征和优点能够更加明显易懂, 下面结合附图对 本发明实施例进行详细描述。 实施例一
请参阅图 2, 其为本发明一种休眠磁盘的数据操作方法的一个实施例的流 程图, 该方法包括以下步骤: 步骤 201 : 在磁盘休眠时段内, 定期统计磁盘的访问频繁程度, 根据定期 统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁盘, 其中, 访问频繁程度高的磁盘为热点磁盘, 访问频繁程度低的磁盘为非热点磁盘; 参阅图 3所示, 根据磁盘的访问频繁程度, 将磁盘划分为热点磁盘和非热 点磁盘。
需要说明的是, 在本发明技术方案中, 可以有很多的方法来描述一个磁盘 的访问频繁程度。
优选的方式是,磁盘的访问频繁程度包括:磁盘的总访问次数和 /或磁盘的 最长访问间隔。 而总访问次数越大和 /或最长访问间隔越小时,访问频繁程度越 高, 总访问次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
例如,可以预先设定一个次数阔值和 /或预先设定一个间隔阔值, 当磁盘的 总访问次数大于或等于该次数阔值和 /或最长访问间隔小于或等于该间隔阔值 时,磁盘的访问频繁程度高, 当磁盘的总访问次数小于该次数阔值和 /或最长访 问间隔大于或等于该间隔阔值时, 磁盘的访问频繁程度低。 当然, 也可以对所 有磁盘的总访问次数或最长访问间隔进行排序, 然后设定一个位次阔值, 排在 该位次阔值前面的磁盘访问频繁程度高, 可划分为热点磁盘, 排在该位次阔值 后面的磁盘访问频繁程度地, 可划分为非热点磁盘。
再有,根据磁盘的总访问次数还可以计算出磁盘在某一预设时间段内的平 均访问频率, 即, 平均访问频率 =某一预设时间段内的访问次数 /某一预设时间 段的时间。 平均访问频率也可以用来描述磁盘的访问频繁程度, 即, 平均访问 频率大于或等于预设频率阔值时, 访问频繁程度高, 平均访问频率小于预设频 率阔值时, 访问频繁程度低。 或者, 通过对各磁盘的平均访问频率进行排序来 区分磁盘的访问频繁程度。
还有,根据磁盘的所有访问间隔也可以计算出磁盘在某一预设时间段内的 平均访问间隔, 即, 平均访问间隔 =所有访问间隔 /间隔个数。 同样, 平均访问 间隔也可以用来描述磁盘的访问频繁程度, 即, 平均访问间隔小于或等于预设 间隔阔值时, 访问频繁程度高, 平均访问间隔大于预设间隔阔值时, 访问频繁 程度低。 或者, 通过对各个磁盘的平均访问间隔进行排序来区分磁盘的访问频 繁程度。
除此之外,还可以通过其它的数学演变方式得到其它可以描述访问频繁程 度的参数, 这里不再——列举。 需要说明的是, 预设的次数阔值、 预设的间隔 阔值以及预设的频率阔值可以由用户根据实际需要任意设定, 本发明技术方案 不做具体限定。
还需要说明的是, 预设时间段也可以由用户根据实际需要任意设定, 其可 以是当前一次统计与上一次统计之间的时间间隔, 参阅图 4所示。 当然, 如果 当前一次统计与上一次统计之间的时间间隔过长, 也可以是其中的一段时间。 另夕卜, 还可以是在本次休眠时间段内, 从第一次统计开始到当前一次统计之间 的时间间隔。
在本发明的技术方案中, 必须通过以下方式来提高热点磁盘的命中率: 定 期统计磁盘的访问频繁程度,根据最新统计所述磁盘的访问频繁程度将磁盘划 分为热点磁盘和非热点磁盘, 并将非热点磁盘中的数据迁移到热点磁盘中。 因 此, 该部分执行的越频繁, 热点磁盘的命中率越高。
优选的方式是, 每当接收到主机发送的数据操作请求后, 或者, 每进行一 次数据操作后, 就统计一次磁盘的访问频繁程度, 并根据最新统计的磁盘的访 问频繁程度将磁盘划分为热点磁盘和非热点磁盘, 并将非热点磁盘中的数据迁 移到热点磁盘中。
步骤 202: 响应于主机在磁盘休眠时段内发送的数据操作请求, 确定所述 数据操作请求所针对的被操作数据在所述热点磁盘还是在所述非热点磁盘中; 步骤 203 : 如果确定所述被操作数据在所述热点磁盘中, 仅唤醒所述被操 作数据所在的热点磁盘,对唤醒的热点磁盘中的所述被操作数据进行相应的数 据操作。
步骤 204: 如果确定所述被操作数据在所述非热点磁盘中, 仅唤醒所述被 操作数据所在的非热点磁盘,对唤醒的非热点磁盘中的所述被操作数据进行相 应的数据操作, 并将唤醒的非热点磁盘中的数据迁移到所述热点磁盘中。
在本实施例中, 热点磁盘和非热点磁盘在磁盘休眠时段内都处于休眠状 态。 由于热点磁盘会频繁地被访问, 因此, 除了这种实现方式之外, 也可以是 热点磁盘在磁盘休眠时段内处于唤醒状态, 而只让非热点磁盘在磁盘休眠时段 内处于休眠状态。 在这种情况下, 步骤 203中可以省略唤醒热点磁盘这一步。
最后需要说明的是, 在本发明技术方案中, 数据操作请求包括数据读取请 求和数据写入请求。
例如, 主机在磁盘休眠时段内发送数据读取请求, 如果该数据读取请求所 针对的被读取数据在热点磁盘中, 仅唤醒被读取数据所在的热点磁盘, 然后读 取唤醒的热点磁盘中的被读取数据。如果该数据读取请求所针对的读取数据在 非热点磁盘中, 仅唤醒被读取数据所在的非热点磁盘, 然后读取唤醒的非热点 磁盘中的被读取数据。
由上述实施例可以看出, 与现有技术相比, 本发明的优点在于: 在磁盘休眠时段内, 一旦主机频繁有数据操作请求, 在多数情况下, 这些 数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤醒热 点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所有的 磁盘) , 最终实现了节能的效果。 实施例二
在以上实施例一中, 考虑到热点磁盘被频繁访问的特点, 一种优选的方式 是, 统一设置热点磁盘在磁盘休眠时段内始终处于唤醒状态。
而在本实施例中, 考虑到如果热点磁盘始终处于唤醒状态, 无法更好地体 现节能的效果, 在每一次统计了磁盘的访问频繁程度后, 根据热点磁盘的访问 频繁程度来决定此时的热点磁盘在距离下一次统计之前的时间段内是处于唤 醒状态还是处于休眠状态, 进而通过分段处理方式实现在热点磁盘上的节能。
请参阅图 5 , 其为本发明一种休眠磁盘的数据操作方法的另一个实施例的 流程图, 该方法包括以下步骤:
步骤 501 : 在磁盘休眠时段内, 定期统计磁盘的访问频繁程度, 根据定期 统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁盘, 其中, 访问频繁程度高的磁盘为热点磁盘, 访问频繁程度低的磁盘为非热点磁盘; 步骤 502: 根据所述热点磁盘的访问频繁程度设置所述热点磁盘在所述休 眠时间段内处于唤醒状态或者处于休眠状态;
其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点磁盘 处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热点磁盘处 于休眠状态。
需要说明的是, 预设频繁程度阔值可以由用户根据实际需要任意设定, 本 发明技术方案不做具体限定。
例如, 如图 4所示, 在第二次统计后, 如果根据第二次统计结果所确定的 热点磁盘的访问频繁程度大于预设频繁程度阔值, 则设置热点磁盘在第二次统 计与第三次统计之间的时间间隔内处于唤醒状态。 步骤 503 : 响应于主机在磁盘休眠时段内发送的数据操作请求, 确定所述 数据操作请求所针对的被操作数据在所述热点磁盘还是在所述非热点磁盘中; 步骤 504: 如果确定所述被操作数据在所述热点磁盘中, 判断所述被操作 数据所在的热点磁盘当前处于唤醒状态还是休眠状态, 如果处于休眠状态, 进 入步骤 505 , 如果处于唤醒状态, 进入步骤 506;
步骤 505 : 唤醒所述被操作数据所在的热点磁盘, 并对唤醒的热点磁盘中 的被操作数据进行相应的数据操作, 结束流程;
步骤 506: 直接对唤醒的热点磁盘中的被操作数据进行相应的数据操作, 结束流程, 结束流程;
步骤 507 : 如果确定所述被操作数据在所述非热点磁盘中, 仅唤醒所述被 操作数据所在的非热点磁盘,对唤醒的非热点磁盘中的被操作数据进行相应的 数据操作,并将唤醒的非热点磁盘中的数据迁移到所述热点磁盘中,结束流程。
由上述实施例可以看出, 与现有技术相比, 本发明的优点在于:
在磁盘休眠时段内, 一旦主机频繁有数据操作请求, 在多数情况下, 这些 数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤醒热 点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所有的 磁盘) , 最终实现了节能的效果。 实施三
下面以一个具体的应用场景为例, 详细地说明对休眠磁盘的数据操作方 法。 其中, 位于存储服务器的磁盘在休眠过程中, 每当接收到应用服务器的数 据读取请求时, 按照如下方式实施数据操作。
请参阅图 6 , 其为本发明一种休眠磁盘的数据读取方法的一个实施例的流 程图, 该方法包括以下步骤:
步骤 601 : 查询数据读取请求针对的数据所映射的磁盘;
为了方便后面的描述, 将数据读取请求针对的数据所映射的磁盘简称为目 标磁盘。
步骤 602: 根据本次的数据读取请求更新目标磁盘的历史访问记录; 其中, 在磁盘的历史访问记录中至少记录有该磁盘的总访问次数。
步骤 603 : 查询目标磁盘的属性, 并根据目标磁盘的属性唤醒正在休眠的 磁盘, 并从目标磁盘中读取数据返回给应用服务器; 按照属性, 磁盘分为热点磁盘和非热点磁盘, 其中, 在磁盘休眠时段内, 热点磁盘始终处于唤醒状态, 而非热点磁盘在无数据操作的情况下处于休眠状 态, 而在有数据操作的情况下被唤醒。
例如, 在查询了目标磁盘的属性后发现, 5个目标磁盘中有 4个目标磁盘 是热点磁盘, 另夕卜 1个目标磁盘为非热点磁盘。 由于热点磁盘处于唤醒状态, 而非热点磁盘处于休眠状态, 因此, 只需唤醒 1个处于休眠状态的非热磁盘即 可。
步骤 604: 从各磁盘的历史访问记录中读取目标磁盘的总访问次数, 并根 据各磁盘的总访问次数排序更新各磁盘的属性, 并将非热点磁盘中的数据迁移 至热点磁盘中;
步骤 605: 唤醒更新后的热点磁盘, 休眠更新后的非热点磁盘。
需要说明的是, 上述方法也同样适用于数据写入操作。
由上述实施例可以看出, 与现有技术相比, 本发明的优点在于: 在磁盘休眠时段内, 一旦主机频繁有数据操作请求, 在多数情况下, 这些 数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤醒热 点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所有的 磁盘) , 最终实现了节能的效果。 实施例四
与上述一种休眠磁盘的数据操作方法相对应, 本发明实施例还提供了一种 休眠磁盘的数据操作装置。 请参阅图 7 , 其为本发明一种休眠磁盘的数据操作 装置的一个实施例的结构图, 该装置包括: 磁盘划分单元 701、 操作响应单元 702、第一数据操作单元 703和第二数据操作单元 704。下面结合该装置的工作 原理进一步介绍其内部结构以及连接关系。
磁盘划分单元 701 , 用于在磁盘休眠时段内, 定期统计磁盘的访问频繁程 度,根据定期统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点 磁盘, 其中, 访问频繁程度高的磁盘为热点磁盘, 访问频繁程度低的磁盘为非 热点磁盘;
操作响应单元 702, 用于响应于主机在磁盘休眠时段内发送的数据操作请 求, 确定所述数据操作请求所针对的被操作数据在所述热点磁盘还是在所述非 热点磁盘中; 第一数据操作单元 703, 用于如果确定所述被操作数据在热点磁盘中, 仅 唤醒所述被操作数据所在的热点磁盘,对唤醒的热点磁盘中的所述被操作数据 进行相应的数据操作。
第二数据操作单元 704 , 用于如果确定所述被操作数据在所述非热点磁盘 中, 仅唤醒所述被操作数据所在的非热点磁盘, 对唤醒的非热点磁盘中的所述 被操作数据进行相应的数据操作, 并将将唤醒的非热点磁盘中的数据迁移到所 述热点磁盘中。
优选的, 所述热点磁盘在所述休眠时间段内始终处于唤醒状态。
优选的, 磁盘划分单元 701包括:
第一划分子单元, 用于每当接收到主机发送的数据操作请求后, 统计一次 磁盘的访问频繁程度,根据最新统计的所述磁盘的访问频繁程度将磁盘划分为 热点磁盘和非热点磁盘;
或者,
第二划分子单元, 用于每进行一次数据操作后, 统计一次磁盘的访问频繁 程度,根据最新统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热 点磁盘。
优选的,所述磁盘的访问频繁程度包括:磁盘在的总访问次数和 /或磁盘的 最长访问间隔;
则总访问次数越大和 /或最长访问间隔越小时,访问频繁程度越高, 总访问 次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
优选的, 如图 8所示, 所述装置还包括:
休眠时间段调整单元 705 , 用于在根据定期统计的所述磁盘的访问频繁程 度将磁盘划分为热点磁盘和非热点磁盘之后,根据所述热点磁盘的访问频繁程 度设置所述热点磁盘在所述休眠时间段内处于唤醒状态或者处于休眠状态; 其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点磁盘 处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热点磁盘处 于休眠状态;
则所述第一数据操作单元 703具体用于,如果确定所述被操作数据在所述 热点磁盘中, 判断所述被操作数据所在的热点磁盘当前处于唤醒状态还是休眠 状态, 如果处于休眠状态, 唤醒所述被操作数据所在的热点磁盘, 并对唤醒的 热点磁盘中的所述被操作数据进行相应的数据操作, 如果处于唤醒状态, 直接 对唤醒的热点磁盘中的所述被操作数据进行相应的数据操作。
由上述实施例可以看出, 与现有技术相比, 本发明的优点在于: 在磁盘休眠时段内, 一旦主机频繁有数据操作请求, 在多数情况下, 这些 数据操作请求所针对的数据都是来源于热点磁盘的, 并且, 只需要频繁唤醒热 点磁盘即可, 从而可以保障非热点磁盘的休眠状态(而不会频繁地唤醒所有的 磁盘) , 最终实现了节能的效果。 所述领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应过 程, 在此不再赘述。
在本发明所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和方 法, 可以通过其它的方式实现。 例如, 以上所描述到的装置实施例仅仅是示意 性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有 另外的划分方式, 例如多个单元或组件可以结合或可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直 接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连接, 可以是电性、 机械或其它的形式。 元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也 可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部单 元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元 中。 上述集成的单元既可以釆用硬件的形式实现, 可以釆用软件功能单元的形 式实现。
需要说明的是, 本领域普通技术人员可以理解实现上述实施例方法中的全 部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序 可存储于一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法 的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体
( Read-Only Memory, ROM )或随机存 4诸己忆体 ( Random Access Memory, RAM )等。 以上对本发明所提供的一种休眠磁盘的数据操作方法和装置进行了详细 实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领 域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均会有 改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。
+

Claims

权利要求
1、 一种休眠磁盘的数据操作方法, 其特征在于, 在磁盘休眠时段内, 定期统计磁盘的访问频繁程度, 根据定期统计的所述磁盘的访问频繁程度 将磁盘划分为热点磁盘和非热点磁盘, 其中, 访问频繁程度高的磁盘为热 点磁盘, 访问频繁程度低的磁盘为非热点磁盘; 所述方法包括:
响应于主机在磁盘休眠时段内发送的数据操作请求, 确定所述数据操 作请求所针对的被操作数据在所述热点磁盘还是在所述非热点磁盘中; 如果确定所述被操作数据在所述热点磁盘中, 仅唤醒所述被操作数据 所在的热点磁盘, 对唤醒的热点磁盘中的所述被操作数据进行相应的数据 操作;
如果确定所述被操作数据在所述非热点磁盘中, 仅唤醒所述被操作数 据所在的非热点磁盘, 对唤醒的非热点磁盘中的所述被操作数据进行相应 的数据操作, 并将唤醒的非热点磁盘中的数据迁移到所述热点磁盘中。
2、 根据权利要求 1所述的方法, 其特征在于, 所述热点磁盘在所述休 眠时间段内始终处于唤醒状态。
3、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在根据定期统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和 非热点磁盘之后, 根据所述热点磁盘的访问频繁程度设置所述热点磁盘在 所述休眠时间段内处于唤醒状态或者处于休眠状态;
其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点 磁盘处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热 点磁盘处于休眠状态;
则如果确定所述被操作数据在所述热点磁盘中, 仅唤醒所述被操作数 据所在的热点磁盘, 对唤醒的热点磁盘中的所述被操作数据进行相应的数 据操作具体为:
如果确定所述被操作数据在所述热点磁盘中, 判断所述被操作数据所 在的热点磁盘当前处于唤醒状态还是休眠状态, 如果处于休眠状态, 唤醒 所述被操作数据所在的热点磁盘, 并对唤醒的热点磁盘中的所述被操作数 据进行相应的数据操作, 如果处于唤醒状态, 直接对唤醒的热点磁盘中的 所述被操作数据进行相应的数据操作。
4、 根据权利要求 1所述的方法, 其特征在于, 所述定期统计磁盘的访 问频繁程度, 根据所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热 点磁盘, 包括:
每当接收到主机发送的数据操作请求后, 统计一次磁盘的访问频繁程 度, 根据最新统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非 热点磁盘;
或者,
每进行一次数据操作后, 统计一次磁盘的访问频繁程度, 根据最新统 计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非热点磁盘。
5、 根据权利要求 1所述的方法, 其特征在于, 所述磁盘的访问频繁程 度包括: 磁盘的总访问次数和 /或磁盘的最长访问间隔;
则总访问次数越大和 /或最长访问间隔越小时, 访问频繁程度越高, 总 访问次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
6、 一种休眠磁盘的数据操作装置, 其特征在于, 所述装置包括: 磁盘划分单元, 用于在磁盘休眠时段内, 定期统计磁盘的访问频繁程 度, 根据定期统计的所述磁盘的访问频繁程度将磁盘划分为热点磁盘和非 热点磁盘, 其中, 访问频繁程度高的磁盘为热点磁盘, 访问频繁程度低的 磁盘为非热点磁盘;
操作响应单元, 用于响应于主机在磁盘休眠时段内发送的数据操作请 求, 确定所述数据操作请求所针对的被操作数据在所述热点磁盘还是在所 述非热点磁盘中;
第一数据操作单元, 用于如果确定所述被操作数据在所述热点磁盘中, 仅唤醒所述被操作数据所在的热点磁盘, 对唤醒的热点磁盘中的所述被操 作数据进行相应的数据操作;
第二数据操作单元, 用于如果确定所述被操作数据在所述非热点磁盘 中, 仅唤醒所述被操作数据所在的非热点磁盘, 对唤醒的非热点磁盘中的 所述被操作数据进行相应的数据操作, 并将唤醒的非热点磁盘中的数据迁 移到所述热点磁盘中。
7、 根据权利要求 6所述的装置, 其特征在于, 所述热点磁盘在所述休 眠时间段内始终处于唤醒状态。
8、 根据权利要求 6所述的装置, 其特征在于, 所述装置还包括: 休眠时间段调整单元, 用于在根据定期统计的所述磁盘的访问频繁程 度将磁盘划分为热点磁盘和非热点磁盘之后, 根据所述热点磁盘的访问频 繁程度设置所述热点磁盘在所述休眠时间段内处于唤醒状态或者处于休眠 状态;
其中, 访问频繁程度大于或等于预设频繁程度阔值时, 设置所述热点 磁盘处于唤醒状态, 访问频繁程度小于预设频繁程度阔值时, 设置所述热 点磁盘处于休眠状态;
则所述第一数据操作单元具体用于, 如果确定所述被操作数据在所述 热点磁盘中, 判断所述被操作数据所在的热点磁盘当前处于唤醒状态还是 休眠状态, 如果处于休眠状态, 唤醒所述被操作数据所在的热点磁盘, 并 对唤醒的热点磁盘中的所述被操作数据进行相应的数据操作, 如果处于唤 醒状态, 直接对唤醒的热点磁盘中的所述被操作数据进行相应的数据操作。
9、根据权利要求 6所述的装置, 其特征在于, 所述磁盘划分单元包括: 第一划分子单元, 用于每当接收到主机发送的数据操作请求后, 统计 一次磁盘的访问频繁程度, 根据最新统计的所述磁盘的访问频繁程度将磁 盘划分为热点磁盘和非热点磁盘;
或者,
第二划分子单元, 用于每进行一次数据操作后, 统计一次磁盘的访问 频繁程度, 根据最新统计的所述磁盘的访问频繁程度将磁盘划分为热点磁 盘和非热点磁盘。
10、 根据权利要求 6 所述的装置, 其特征在于, 所述磁盘的访问频繁 程度包括: 磁盘的总访问次数和 /或磁盘的最长访问间隔;
则总访问次数越大和 /或最长访问间隔越小时, 访问频繁程度越高, 总 访问次数越小和 /或最长访问间隔越大时, 访问频繁程度越低。
PCT/CN2014/083071 2013-10-30 2014-07-25 一种休眠磁盘的数据操作方法和装置 WO2015062316A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310528922.5A CN103576835B (zh) 2013-10-30 2013-10-30 一种休眠磁盘的数据操作方法和装置
CN201310528922.5 2013-10-30

Publications (1)

Publication Number Publication Date
WO2015062316A1 true WO2015062316A1 (zh) 2015-05-07

Family

ID=50048796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083071 WO2015062316A1 (zh) 2013-10-30 2014-07-25 一种休眠磁盘的数据操作方法和装置

Country Status (2)

Country Link
CN (1) CN103576835B (zh)
WO (1) WO2015062316A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381153A (zh) * 2019-07-24 2019-10-25 深圳市网心科技有限公司 一种文件部署方法、部署设备、系统及介质
CN110703998A (zh) * 2019-09-29 2020-01-17 百度在线网络技术(北京)有限公司 存储器的控制方法、控制器、芯片及电子设备
CN112988083A (zh) * 2021-05-19 2021-06-18 四川省商投信息技术有限责任公司 一种冷数据的存储方法和系统

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103576835B (zh) * 2013-10-30 2016-06-29 华为技术有限公司 一种休眠磁盘的数据操作方法和装置
CN105138416A (zh) * 2014-06-05 2015-12-09 中兴通讯股份有限公司 磁盘休眠处理方法及装置
CN105320246B (zh) * 2015-09-29 2019-01-15 联想(北京)有限公司 一种信息处理方法及电子设备
CN105528053A (zh) * 2015-12-11 2016-04-27 曙光信息产业股份有限公司 分布式系统的管理方法和装置
CN105574134B (zh) * 2015-12-15 2019-04-12 曙光信息产业股份有限公司 一种文件处理方法及装置
CN106951179B (zh) * 2016-01-07 2020-03-27 杭州海康威视数字技术股份有限公司 一种数据迁移方法及装置
US10168763B2 (en) * 2016-08-09 2019-01-01 Lenovo Enterprise Solutions (Singapore) Pte. Ltd Modification of when workloads access data units and/or on which storage devices data units are stored to conserve power
CN106775461B (zh) * 2016-11-30 2020-01-21 华为技术有限公司 热点数据确定方法、设备及装置
CN108170254B (zh) * 2017-12-30 2019-12-06 广东技术师范大学 一种基于零星请求的策略调度方法
CN109614050B (zh) * 2018-12-11 2022-03-04 浪潮(北京)电子信息产业有限公司 磁盘休眠状态控制方法、装置、设备及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324620B1 (en) * 1998-07-23 2001-11-27 International Business Machines Corporation Dynamic DASD data management and partitioning based on access frequency utilization and capacity
CN102609070A (zh) * 2011-12-26 2012-07-25 创新科存储技术有限公司 一种利用maid技术实现节能的设备
CN103186350A (zh) * 2011-12-31 2013-07-03 北京快网科技有限公司 混合存储系统及热点数据块的迁移方法
CN103576835A (zh) * 2013-10-30 2014-02-12 华为技术有限公司 一种休眠磁盘的数据操作方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262580B (zh) * 2007-08-31 2010-09-08 深圳市同洲电子股份有限公司 一种数字电视接收装置及监控其硬盘休眠的方法和系统
CN101655774B (zh) * 2009-09-01 2012-08-29 成都市华为赛门铁克科技有限公司 一种磁盘控制方法及系统以及相关设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6324620B1 (en) * 1998-07-23 2001-11-27 International Business Machines Corporation Dynamic DASD data management and partitioning based on access frequency utilization and capacity
CN102609070A (zh) * 2011-12-26 2012-07-25 创新科存储技术有限公司 一种利用maid技术实现节能的设备
CN103186350A (zh) * 2011-12-31 2013-07-03 北京快网科技有限公司 混合存储系统及热点数据块的迁移方法
CN103576835A (zh) * 2013-10-30 2014-02-12 华为技术有限公司 一种休眠磁盘的数据操作方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENG, BO.: "The Research and Implementation of Energy-efficient RAID", CMFD (INFORMATION SCIENCE, 15 June 2012 (2012-06-15), pages 8 AND 9 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381153A (zh) * 2019-07-24 2019-10-25 深圳市网心科技有限公司 一种文件部署方法、部署设备、系统及介质
CN110703998A (zh) * 2019-09-29 2020-01-17 百度在线网络技术(北京)有限公司 存储器的控制方法、控制器、芯片及电子设备
US11204868B2 (en) 2019-09-29 2021-12-21 Baidu Online Network Technology (Beijing) Co., Ltd. Method for controlling slices of memory to be turned on or off, controller, chip and electronic device
CN112988083A (zh) * 2021-05-19 2021-06-18 四川省商投信息技术有限责任公司 一种冷数据的存储方法和系统
CN112988083B (zh) * 2021-05-19 2021-08-03 四川省商投信息技术有限责任公司 一种冷数据的存储方法和系统

Also Published As

Publication number Publication date
CN103576835B (zh) 2016-06-29
CN103576835A (zh) 2014-02-12

Similar Documents

Publication Publication Date Title
WO2015062316A1 (zh) 一种休眠磁盘的数据操作方法和装置
WO2020103506A1 (zh) 基于混合存储的数据管理系统、方法、终端及介质
US9348408B2 (en) Adaptive power conservation in storage clusters
US9471134B2 (en) Method and apparatus for managing power of a storage system
US20040015731A1 (en) Intelligent data management fo hard disk drive
US10841880B2 (en) Apparatus and methods for wake-limiting with an inter-device communication link
WO2013170575A1 (zh) 一种硬盘节能控制方法、装置及中央处理器
WO2010102568A1 (zh) 一种控制存储设备状态的方法、装置及存储设备
CN108089825B (zh) 一种基于分布式集群的存储系统
US20170228196A1 (en) Forced Idling of Memory Subsystems
EP2981920B1 (en) Detection of user behavior using time series modeling
US20160148670A1 (en) Systems and methods for reducing volatile memory standby power in a portable computing device
WO2015085747A1 (zh) 一种数据访问存储方法及装置
US20060168462A1 (en) Bus technique for controlling power states of blades in a blade enclosure
US11662925B2 (en) Data processing method and distributed storage system
WO2014094303A1 (zh) 一种监控记录管理方法与装置
CN102436297A (zh) 一种温度融合控制的存储节能降噪方法
WO2021207923A1 (zh) 集群扩容方法、装置、存储介质及电子设备
CN103176753A (zh) 存储设备及其数据管理方法
WO2020238326A1 (zh) 处理器的性能状态的调节方法、装置、uefi及存储介质
TWI235298B (en) Method to read the battery status by the operating system of portable computer
Chen et al. Research on tiered storage method for big data of virtual information based on cloud computing
WO2024001994A1 (zh) 节能管理方法、装置、计算设备及计算机可读存储介质
TWI453670B (zh) 喚醒複數個休眠儲存裝置之方法
Li et al. EEPC: Energy-Efficient Persistent Cache Scheme for Mobile Distributed File Systems

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

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

Country of ref document: EP

Kind code of ref document: A1