CN103576835B - The data manipulation method of a kind of dormancy disk and device - Google Patents
The data manipulation method of a kind of dormancy disk and device Download PDFInfo
- Publication number
- CN103576835B CN103576835B CN201310528922.5A CN201310528922A CN103576835B CN 103576835 B CN103576835 B CN 103576835B CN 201310528922 A CN201310528922 A CN 201310528922A CN 103576835 B CN103576835 B CN 103576835B
- Authority
- CN
- China
- Prior art keywords
- disk
- hot
- data
- access frequency
- spot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000005059 dormancy Effects 0.000 title claims abstract description 6
- 230000004044 response Effects 0.000 claims abstract description 12
- 230000007958 sleep Effects 0.000 claims description 34
- 230000006266 hibernation Effects 0.000 claims description 30
- 230000002618 waking effect Effects 0.000 claims description 13
- 230000004622 sleep time Effects 0.000 claims description 8
- 230000036578 sleeping time Effects 0.000 claims description 3
- 238000000638 solvent extraction Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 10
- 230000005012 migration Effects 0.000 abstract 1
- 238000013508 migration Methods 0.000 abstract 1
- 230000000737 periodic effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 7
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0625—Power saving in storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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
The embodiment of the invention discloses the data manipulation method of a kind of dormancy disk and device.Wherein, method includes: within the disc dormancy period, the frequent degree of access of periodic statistical disk, according to the access of disk frequent degree, disk is divided into focus disk and non-focus disk;The response data operation request that sends within the disc dormancy period of main frame, it is determined that what data operation request was targeted operated data at focus disk still in non-focus disk;If it is determined that by operation data in focus disk, only wake up by the focus disk at operation data place, the data that operated in the focus disk waken up carried out corresponding data manipulation;If it is determined that by operation data in non-focus disk, only wake up by the non-focus disk at operation data place, to the non-focus disk waken up carried out corresponding data manipulation by operation data, and by the Data Migration in the non-focus disk that wakes up to focus disk.According to embodiments of the present invention, it is possible to achieve the energy-saving effect of disk.
Description
Technical Field
The present invention relates to the field of data storage, and in particular, to a data operation method and apparatus for a hibernate disk.
Background
At present, on the premise of ensuring data reliability, how to save energy for users to the maximum is a research focus and difficulty of various large storage manufacturers, and the users are also favored by various major storage manufacturers in the industry to store the data in a green manner. The disk hibernation technology is a big highlight technology in the concept of green storage.
Common disk hibernation methods mainly include RAID (redundant array of independent disks) group hibernation and storage pool hibernation, and both hibernation methods perform hibernation and wake-up processing on all disks in a RAID group or a storage pool. In particular, it is. After the client configures the hibernation period, in the disk hibernation period, all the disks in the RAID group or the storage pool enter the hibernation state, whereas in the non-hibernation period, all the disks in the RAID group or the storage pool are in the wake state. For example, in a storage pool containing 20 disks, if a user configures a hibernation period to be 20:00 a night to 8:00 a morning, all 20 disks in the storage pool go to hibernation during the period.
In the disk hibernation period, as shown in fig. 1, if the host sends a data operation request (including a read request and a write request) through the I/O channel, all the disks in the hibernation state in the storage pool are woken up first, and then corresponding operations are performed according to the operation request, and after the operations are completed, all the disks in the storage pool enter the hibernation state again.
However, in the process of implementing the present invention, the inventors of the present invention found that at least the following problems exist in the prior art: during the sleep period configured by the user, if the host continuously sends data operation requests, all the disks in the storage pool need to be frequently woken up. In this case, the disk hibernation technology cannot really achieve the energy saving effect.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide a data operation method and apparatus for disk hibernation, so as to achieve an energy saving effect of a disk.
The embodiment of the invention discloses the following technical scheme:
according to the first aspect of the embodiment of the invention, the data operation method of the dormant disk is disclosed, in the dormant period of the disk, the access frequency degree of the disk is periodically counted, and the disk is divided into a hot disk and a non-hot disk according to the access frequency degree of the disk which is periodically counted, wherein the disk with high access frequency degree is the hot disk, and the disk with low access frequency degree is the non-hot disk;
the method comprises the following steps:
in response to a data operation request sent by a host in a disk sleep period, determining whether operated data for which the data operation request is directed is in the hot disk or the non-hot disk;
if the operated data are confirmed to be in the hot spot disk, only waking up the hot spot disk where the operated data are located, and performing corresponding data operation on the operated data in the woken up hot spot disk;
if the operated data are confirmed to be in the non-hot-spot disk, only waking up the non-hot-spot disk where the operated data are located, performing corresponding data operation on the operated data in the woken-up non-hot-spot disk, and migrating the data in the woken-up non-hot-spot disk to the hot-spot disk.
With reference to the first aspect of the present invention, the present invention further has a first possibility that the hotspot disk is always in the awake state in the hibernation period.
In combination with the first aspect of the present invention, the present invention also has a second possibility that the method further includes:
after a disk is divided into a hotspot disk and a non-hotspot disk according to the access frequency of the disk counted regularly, setting the hotspot disk to be in an awakening state or a sleeping state in the sleeping time period according to the access frequency of the hotspot disk;
when the access frequency is greater than or equal to a preset frequency threshold, setting the hot spot disk to be in an awakening state, and when the access frequency is less than the preset frequency threshold, setting the hot spot disk to be in a dormant state;
if it is determined that the operated data is in the hot spot disk, only waking up the hot spot disk where the operated data is located, and performing corresponding data operation on the operated data in the woken up hot spot disk specifically includes:
if the operated data is determined to be in the hot spot disk, judging whether the hot spot disk where the operated data is located is in an awakening state or a sleeping state currently, if the operated data is in the sleeping state, awakening the hot spot disk where the operated data is located, performing corresponding data operation on the operated data in the awakened hot spot disk, and if the operated data is in the awakening state, directly performing corresponding data operation on the operated data in the awakened hot spot disk.
With reference to the first aspect of the present invention, the present invention also has a third possibility that the periodically counting the access frequency of the disk, and dividing the disk into a hot disk and a non-hot disk according to the access frequency of the disk, including:
counting the access frequency of a disk once after receiving a data operation request sent by a host, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk;
or,
and after each data operation, counting the access frequency of the disk, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk.
With reference to the first aspect of the present invention, the present invention further has a fourth possibility that the access frequency of the disk includes: the total access times of the disk and/or the longest access interval of the disk;
the greater the total number of accesses and/or the smaller the longest access interval, the higher the access frequency, and the smaller the total number of accesses and/or the larger the longest access interval, the lower the access frequency.
According to a second aspect of the embodiments of the present invention, a data operating apparatus for a hibernating disk is disclosed, comprising:
the disk dividing unit is used for periodically counting the access frequency of the disk in the disk dormancy period and dividing the disk into a hotspot disk and a non-hotspot disk according to the periodically counted access frequency of the disk, wherein the disk with high access frequency is the hotspot disk, and the disk with low access frequency is the non-hotspot disk;
an operation response unit, configured to determine, in response to a data operation request sent by a host within a disk hibernation period, whether operated data targeted by the data operation request is in the hot-spot disk or the non-hot-spot disk;
the first data operation unit is used for only waking up the hot spot disk where the operated data is located if the operated data is determined to be in the hot spot disk, and performing corresponding data operation on the operated data in the woken up hot spot disk;
and the second data operation unit is used for only waking up the non-hot-spot disk where the operated data is located if the operated data is determined to be in the non-hot-spot disk, performing corresponding data operation on the operated data in the woken-up non-hot-spot disk, and transferring the data in the woken-up non-hot-spot disk to the hot-spot disk.
With reference to the second aspect of the present invention, the present invention further has a first possibility that the hotspot disk is always in the awake state in the hibernation period.
In combination with the second aspect of the present invention, the present invention also has a second possibility that the apparatus further includes:
the sleep time period adjusting unit is used for setting the hotspot disk to be in an awakening state or in a sleep state in the sleep time period according to the access frequency of the hotspot disk after the disk is divided into the hotspot disk and a non-hotspot disk according to the access frequency of the disk counted regularly;
when the access frequency is greater than or equal to a preset frequency threshold, setting the hot spot disk to be in an awakening state, and when the access frequency is less than the preset frequency threshold, setting the hot spot disk to be in a dormant state;
the first data operation unit is specifically configured to, if it is determined that the operated data is in the hot spot disk, determine whether the hot spot disk where the operated data is located is currently in an awake state or a sleep state, if the operated data is in the sleep state, awake the hot spot disk where the operated data is located, perform corresponding data operation on the operated data in the awake hot spot disk, and if the operated data is in the awake state, directly perform corresponding data operation on the operated data in the awake hot spot disk.
With reference to the second aspect of the present invention, the present invention further has a third possibility that the disk dividing unit includes:
the first dividing unit is used for counting the access frequency of a disk once after receiving a data operation request sent by a host computer, and dividing the disk into a hot disk and a non-hot disk according to the latest counted access frequency of the disk;
or,
and the second dividing subunit is used for counting the access frequency of the disk once after each data operation is performed, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk.
In combination with the second aspect of the present invention, the present invention further has a fourth possibility that the access frequency of the disk includes: the total access times of the disk and/or the longest access interval of the disk;
the greater the total number of accesses and/or the smaller the longest access interval, the higher the access frequency, and the smaller the total number of accesses and/or the larger the longest access interval, the lower the access frequency.
As can be seen from the above embodiments, compared with the prior art, the present invention has the following advantages:
in the disk sleep period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently awakened, so that the sleep state of the non-hot disk can be guaranteed (all disks are not frequently awakened), and finally, the energy-saving effect is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a diagram illustrating data operations of a prior art hibernate disk;
FIG. 2 is a flow diagram of one embodiment of a method for data manipulation of a hibernate disk of the present invention;
FIG. 3 is a schematic diagram of partitioning a hibernate disk in accordance with the present invention;
FIG. 4 is a schematic diagram illustrating a statistical approach to disk access frequency according to the present invention;
FIG. 5 is a flowchart of another embodiment of a method for data manipulation of a hibernate disk in accordance with the present invention;
FIG. 6 is a flowchart of an embodiment of a method for reading data from a hibernate disk of the present invention;
FIG. 7 is a block diagram of one embodiment of a data manipulation device for a hibernating disk of the present invention;
FIG. 8 is a block diagram of another embodiment of a data manipulation device for a hibernating disk of the present invention.
Detailed Description
The embodiment of the invention provides a data operation method and device of a dormant disk. The core of the invention is that: the method comprises the steps of dividing a disk into two types of a hot disk and a non-hot disk according to the access frequency of the disk (the hot disk with high access frequency and the non-hot disk with low access frequency), and updating the types of the disk regularly. And migrating the data in the non-hotspot disk to the hotspot disk every time the data operation request aims at the data in the non-hotspot disk. By the method, the hit rate in the hot spot disk can be improved, namely, the probability that the data aimed at by the data operation request is located in the hot spot disk is improved.
In this way, in the disk hibernation period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently woken up, so that the hibernation state of the non-hot disk can be ensured (not all disks are frequently woken up), and finally, the energy-saving effect is realized.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Example one
Please refer to fig. 2, which is a flowchart illustrating a data operation method of a hibernate disk according to an embodiment of the present invention, the method comprising the following steps:
step 201: in a disc sleep period, periodically counting the access frequency of a disc, and dividing the disc into a hotspot disc and a non-hotspot disc according to the periodically counted access frequency of the disc, wherein the disc with high access frequency is the hotspot disc, and the disc with low access frequency is the non-hotspot disc;
referring to fig. 3, the disk is divided into a hot disk and a non-hot disk according to the access frequency of the disk.
It should be noted that, in the technical solution of the present invention, there are many ways to describe the access frequency of a disk.
Preferably, the access frequency of the disk includes: a total number of accesses to the disk and/or a longest access interval for the disk. And the access frequency degree is higher when the total access times are larger and/or the longest access interval is smaller, and the access frequency degree is lower when the total access times are smaller and/or the longest access interval is larger.
For example, a number threshold and/or an interval threshold may be preset, the access frequency of the disk is high when the total access number of the disk is greater than or equal to the number threshold and/or the longest access interval is less than or equal to the interval threshold, and the access frequency of the disk is low when the total access number of the disk is less than the number threshold and/or the longest access interval is greater than or equal to the interval threshold. Of course, the total access times or the longest access interval of all the disks may be sorted, and then a bit threshold is set, the disk that is ranked before the bit threshold has a high access frequency and may be classified as a hot disk, and the disk that is ranked after the bit threshold has a high access frequency and may be classified as a non-hot disk.
Furthermore, the average access frequency of the disk in a certain preset time period, that is, the average access frequency = the number of accesses in a certain preset time period/the time of a certain preset time period, may also be calculated from the total number of accesses of the disk. The average access frequency may also be used to describe the access frequency of the disk, that is, when the average access frequency is greater than or equal to a 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 sorting the average access frequency of each disk to distinguish the access frequency of the disk.
Also, an average access interval of the disk in a certain preset time period may be calculated according to all access intervals of the disk, that is, the average access interval = all access intervals/number of intervals. Similarly, the average access interval may also be used to describe the access frequency of 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 when the average access interval is greater than the preset interval threshold, the access frequency is low. Or, the access frequency of the disks is distinguished by sorting the average access intervals of the disks.
In addition, other parameters that describe the access frequency may be obtained by other mathematical evolution methods, which are not listed here. It should be noted that the preset number threshold, the preset interval threshold and the preset frequency threshold may be set arbitrarily by the user according to actual needs, and the technical scheme of the present invention is not particularly limited.
It should be further noted that the preset time period may also be set arbitrarily by the user according to actual needs, and may be a time interval between the current statistics and the last statistics, as shown in fig. 4. Of course, if the time interval between the current statistics and the last statistics is too long, it may be a period of time. In addition, the time interval from the first statistics to the current statistics in the sleep time period can also be used.
In the technical scheme of the invention, the hit rate of the hot spot disk must be improved by the following modes: and periodically counting the access frequency of the disk, dividing the disk into a hot disk and a non-hot disk according to the latest counted access frequency of the disk, and migrating data in the non-hot disk to the hot disk. Thus, the more frequently this portion is executed, the higher the hit rate of the hot spot disk.
The preferred mode is that after a data operation request sent by a host is received or after data operation is performed once, the access frequency of a disk is counted, the disk is divided into a hot disk and a non-hot disk according to the latest counted access frequency of the disk, and data in the non-hot disk is migrated to the hot disk.
Step 202: in response to a data operation request sent by a host in a disk sleep period, determining whether operated data for which the data operation request is directed is in the hot disk or the non-hot disk;
step 203: if the operated data are confirmed to be in the hot spot disk, only the hot spot disk where the operated data are located is woken up, and corresponding data operation is carried out on the operated data in the woken-up hot spot disk.
Step 204: if the operated data are confirmed to be in the non-hot-spot disk, only waking up the non-hot-spot disk where the operated data are located, performing corresponding data operation on the operated data in the woken-up non-hot-spot disk, and migrating the data in the woken-up non-hot-spot disk to the hot-spot disk.
In this embodiment, both the hotspot disk and the non-hotspot disk are in a sleep state during the disk sleep period. Since the hot disk is frequently accessed, in addition to this implementation, the hot disk may be in a wake state during the disk hibernation period, and only the non-hot disk is in a hibernation state during the disk hibernation period. In this case, the step of waking up the hot disk may be omitted in step 203.
Finally, it should be noted that, in the technical solution of the present invention, the data operation request includes a data read request and a data write request.
For example, the host sends a data reading request in a disk hibernation period, and if the read data for which the data reading request is directed is in a hot disk, only the hot disk where the read data is located is woken up, and then the read data in the woken-up hot disk is read. If the read data aimed at by the data read request is in the non-hot-spot disk, only waking up the non-hot-spot disk where the read data is located, and then reading the read data in the woken non-hot-spot disk.
As can be seen from the above embodiments, compared with the prior art, the present invention has the following advantages:
in the disk sleep period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently awakened, so that the sleep state of the non-hot disk can be guaranteed (all disks are not frequently awakened), and finally, the energy-saving effect is realized.
Example two
In the first embodiment, in consideration of the characteristic that the hot spot disk is frequently accessed, a preferable mode is to uniformly set that the hot spot disk is always in the awake state in the disk hibernation period.
In the embodiment, considering that if the hot disk is always in the awake state, the effect of saving energy cannot be better reflected, after the access frequency of the disk is counted each time, it is determined according to the access frequency of the hot disk whether the hot disk is in the awake state or the sleep state in the time period before the next counting, and energy saving on the hot disk is further realized through a segmented processing mode.
Please refer to fig. 5, which is a flowchart illustrating a data operation method of a hibernate disk according to another embodiment of the present invention, the method comprising the steps of:
step 501: in a disc sleep period, periodically counting the access frequency of a disc, and dividing the disc into a hotspot disc and a non-hotspot disc according to the periodically counted access frequency of the disc, wherein the disc with high access frequency is the hotspot disc, and the disc with low access frequency is the non-hotspot disc;
step 502: setting the hotspot disk to be in an awakening state or a sleeping state in the sleeping time period according to the access frequency of the hotspot disk;
when the access frequency is greater than or equal to a preset frequency threshold, the hot spot disk is set to be in an awakening state, and when the access frequency is smaller than the preset frequency threshold, the hot spot disk is set to be in a dormant state.
It should be noted that the preset frequency threshold may be set by a user at will according to actual needs, and the technical scheme of the present invention is not limited specifically.
For example, as shown in fig. 4, after the second statistics, if the access frequency of the hot spot disk determined according to the second statistical result is greater than the preset frequency threshold, the hot spot disk is set to be in an awake state in the time interval between the second statistics and the third statistics.
Step 503: in response to a data operation request sent by a host in a disk sleep period, determining whether operated data for which the data operation request is directed is in the hot disk or the non-hot disk;
step 504: if the operated data is determined to be in the hot spot disk, judging whether the hot spot disk where the operated data is located is in an awakening state or a sleeping state currently, if the operated data is in the sleeping state, entering a step 505, and if the operated data is in the awakening state, entering a step 506;
step 505: awakening the hot spot disk where the operated data is located, performing corresponding data operation on the operated data in the awakened hot spot disk, and ending the process;
step 506: directly carrying out corresponding data operation on the operated data in the awakened hot spot disk, ending the process and ending the process;
step 507: if the operated data is determined to be in the non-hot disk, only waking up the non-hot disk where the operated data is located, performing corresponding data operation on the operated data in the wakened non-hot disk, migrating the data in the wakened non-hot disk to the hot disk, and ending the process.
As can be seen from the above embodiments, compared with the prior art, the present invention has the following advantages:
in the disk sleep period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently awakened, so that the sleep state of the non-hot disk can be guaranteed (all disks are not frequently awakened), and finally, the energy-saving effect is realized.
Implementation III
A detailed description of the data operation method for the hibernate disk is given below by taking a specific application scenario as an example. In the hibernation process, when a disk located in a storage server receives a data reading request of an application server, data operation is carried out as follows.
Please refer to fig. 6, which is a flowchart illustrating a data reading method for a hibernate disk according to an embodiment of the present invention, the method comprising the following steps:
step 601: inquiring a disk mapped by data aimed at by the data reading request;
for convenience of the following description, the disk to which the data read request is mapped is simply referred to as a target disk.
Step 602: updating the historical access record of the target disk according to the data reading request at this time;
wherein, at least the total access times of the disk are recorded in the history access record of the disk.
Step 603: inquiring the attribute of a target disk, awakening the sleeping disk according to the attribute of the target disk, reading data from the target disk and returning the data to the application server;
according to the attribute, the disk is divided into a hot disk and a non-hot disk, wherein in the disk sleep period, the hot disk is always in the awakening state, while the non-hot disk is in the sleep state under the condition of no data operation and is awakened under the condition of data operation.
For example, after querying the attributes of the target disks, it is found that 4 target disks out of 5 target disks are hot disks, and the other 1 target disk is a non-hot disk. Because the hotspot disk is in the awakening state and the non-hotspot disk is in the sleeping state, only 1 non-hotspot disk in the sleeping state needs to be awakened.
Step 604: reading the total access times of the target disk from the historical access records of the disks, sequencing and updating the attributes of the disks according to the total access times of the disks, and transferring the data in the non-hotspot disk to the hotspot disk;
step 605: and awakening the updated hot disk and sleeping the updated non-hot disk.
It should be noted that the above method is also applicable to data write operation.
As can be seen from the above embodiments, compared with the prior art, the present invention has the following advantages:
in the disk sleep period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently awakened, so that the sleep state of the non-hot disk can be guaranteed (all disks are not frequently awakened), and finally, the energy-saving effect is realized.
Example four
Corresponding to the data operation method of the hibernating disk, the embodiment of the invention also provides a data operation device of the hibernating disk. Please refer to fig. 7, which is a block diagram of an embodiment of a data operating apparatus for a hibernating disk according to the present invention, the apparatus comprising: a disk dividing unit 701, an operation response unit 702, a first data operation unit 703, and a second data operation unit 704. The internal structure and connection relationship of the device will be further described below in conjunction with the working principle of the device.
The disk dividing unit 701 is configured to periodically count access frequency of a disk in a disk sleep period, and divide the disk into a hot disk and a non-hot disk according to the periodically counted access frequency of the disk, where a disk with a high access frequency is a hot disk and a disk with a low access frequency is a non-hot disk;
an operation response unit 702, configured to determine, in response to a data operation request sent by a host in a disk hibernation period, whether operated data targeted by the data operation request is in the hot-spot disk or the non-hot-spot disk;
the first data operation unit 703 is configured to, if it is determined that the operated data is in a hot-spot disk, only wake up the hot-spot disk where the operated data is located, and perform corresponding data operation on the operated data in the woken-up hot-spot disk.
A second data operation unit 704, configured to, if it is determined that the operated data is in the non-hot-spot disk, only wake up the non-hot-spot disk where the operated data is located, perform corresponding data operation on the operated data in the woken non-hot-spot disk, and migrate the data in the woken non-hot-spot disk to the hot-spot disk.
Preferably, the hotspot disk is always in a wake state in the sleep time period.
Preferably, the disk dividing unit 701 includes:
the first dividing unit is used for counting the access frequency of a disk once after receiving a data operation request sent by a host computer, and dividing the disk into a hot disk and a non-hot disk according to the latest counted access frequency of the disk;
or,
and the second dividing subunit is used for counting the access frequency of the disk once after each data operation is performed, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk.
Preferably, the access frequency of the disk includes: the total access times of the disk and/or the longest access interval of the disk;
the greater the total number of accesses and/or the smaller the longest access interval, the higher the access frequency, and the smaller the total number of accesses and/or the larger the longest access interval, the lower the access frequency.
Preferably, as shown in fig. 8, the apparatus further comprises:
a sleep time period adjusting unit 705, configured to set, after dividing a disk into a hot spot disk and a non-hot spot disk according to access frequency of the disk counted regularly, that the hot spot disk is in an awake state or in a sleep state in the sleep time period according to the access frequency of the hot spot disk;
when the access frequency is greater than or equal to a preset frequency threshold, setting the hot spot disk to be in an awakening state, and when the access frequency is less than the preset frequency threshold, setting the hot spot disk to be in a dormant state;
the first data operation unit 703 is specifically configured to, if it is determined that the operated data is in the hot spot disk, determine whether the hot spot disk where the operated data is located is currently in an awake state or a sleep state, if the operated data is in the sleep state, wake up the hot spot disk where the operated data is located, perform corresponding data operation on the operated data in the woken hot spot disk, and if the operated data is in the woken state, directly perform corresponding data operation on the operated data in the woken hot spot disk.
As can be seen from the above embodiments, compared with the prior art, the present invention has the following advantages:
in the disk sleep period, once the host frequently has data operation requests, in most cases, the data targeted by the data operation requests are all from the hot disk, and only the hot disk needs to be frequently awakened, so that the sleep state of the non-hot disk can be guaranteed (all disks are not frequently awakened), and finally, the energy-saving effect is realized.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when the actual implementation is performed, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may be or may be physically separate, and parts displayed as units may be or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can be realized in a form of a software functional unit.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
The data operation method and apparatus for a hibernate disk provided by the present invention are introduced in detail above, and the principle and the implementation manner of the present invention are explained in this document by applying specific embodiments, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A data operation method of a dormant disk is characterized in that in a disk dormant period, the access frequency of the disk is periodically counted, and the disk is divided into a hot disk and a non-hot disk according to the periodically counted access frequency of the disk, wherein the disk with high access frequency is the hot disk, and the disk with low access frequency is the non-hot disk; the method comprises the following steps:
in response to a data operation request sent by a host in a disk sleep period, determining whether operated data for which the data operation request is directed is in the hot disk or the non-hot disk;
if the operated data are confirmed to be in the hot spot disk, only waking up the hot spot disk where the operated data are located, and performing corresponding data operation on the operated data in the woken up hot spot disk;
if the operated data are confirmed to be in the non-hot-spot disk, only the non-hot-spot disk where the operated data are located is woken up, corresponding data operation is conducted on the operated data in the woken-up non-hot-spot disk, and the data in the woken-up non-hot-spot disk are transferred to the hot-spot disk, so that the hit rate of the hot-spot disk is improved.
2. The method of claim 1, wherein the hotspot disk is always awake for the sleep period.
3. The method of claim 1, further comprising:
after a disk is divided into a hotspot disk and a non-hotspot disk according to the access frequency of the disk counted regularly, setting the hotspot disk to be in an awakening state or a sleeping state in the sleeping time period according to the access frequency of the hotspot disk;
when the access frequency is greater than or equal to a preset frequency threshold, setting the hot spot disk to be in an awakening state, and when the access frequency is less than the preset frequency threshold, setting the hot spot disk to be in a dormant state;
if it is determined that the operated data is in the hot spot disk, only waking up the hot spot disk where the operated data is located, and performing corresponding data operation on the operated data in the woken up hot spot disk specifically includes:
if the operated data is determined to be in the hot spot disk, judging whether the hot spot disk where the operated data is located is in an awakening state or a sleeping state currently, if the operated data is in the sleeping state, awakening the hot spot disk where the operated data is located, performing corresponding data operation on the operated data in the awakened hot spot disk, and if the operated data is in the awakening state, directly performing corresponding data operation on the operated data in the awakened hot spot disk.
4. The method of claim 1, wherein the periodically counting access frequency of the disk, and dividing the disk into a hot disk and a non-hot disk according to the access frequency of the disk comprises:
counting the access frequency of a disk once after receiving a data operation request sent by a host, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk;
or,
and after each data operation, counting the access frequency of the disk, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk.
5. The method of claim 1, wherein the access frequency of the disk comprises: the total access times of the disk and/or the longest access interval of the disk;
the greater the total number of accesses and/or the smaller the longest access interval, the higher the access frequency, and the smaller the total number of accesses and/or the larger the longest access interval, the lower the access frequency.
6. A data manipulation device for a hibernating disk, the device comprising:
the disk dividing unit is used for periodically counting the access frequency of the disk in the disk dormancy period and dividing the disk into a hotspot disk and a non-hotspot disk according to the periodically counted access frequency of the disk, wherein the disk with high access frequency is the hotspot disk, and the disk with low access frequency is the non-hotspot disk;
an operation response unit, configured to determine, in response to a data operation request sent by a host within a disk hibernation period, whether operated data targeted by the data operation request is in the hot-spot disk or the non-hot-spot disk;
the first data operation unit is used for only waking up the hot spot disk where the operated data is located if the operated data is determined to be in the hot spot disk, and performing corresponding data operation on the operated data in the woken up hot spot disk;
and the second data operation unit is used for only waking up the non-hot-spot disk where the operated data is located if the operated data is determined to be in the non-hot-spot disk, performing corresponding data operation on the operated data in the woken-up non-hot-spot disk, and transferring the data in the woken-up non-hot-spot disk to the hot-spot disk so as to improve the hit rate of the hot-spot disk.
7. The apparatus of claim 6, wherein the hotspot disk is always awake for the sleep period.
8. The apparatus of claim 6, further comprising:
the sleep time period adjusting unit is used for setting the hotspot disk to be in an awakening state or in a sleep state in the sleep time period according to the access frequency of the hotspot disk after the disk is divided into the hotspot disk and a non-hotspot disk according to the access frequency of the disk counted regularly;
when the access frequency is greater than or equal to a preset frequency threshold, setting the hot spot disk to be in an awakening state, and when the access frequency is less than the preset frequency threshold, setting the hot spot disk to be in a dormant state;
the first data operation unit is specifically configured to, if it is determined that the operated data is in the hot spot disk, determine whether the hot spot disk where the operated data is located is currently in an awake state or a sleep state, if the operated data is in the sleep state, awake the hot spot disk where the operated data is located, perform corresponding data operation on the operated data in the awake hot spot disk, and if the operated data is in the awake state, directly perform corresponding data operation on the operated data in the awake hot spot disk.
9. The apparatus of claim 6, wherein the disk partitioning unit comprises:
the first dividing unit is used for counting the access frequency of a disk once after receiving a data operation request sent by a host computer, and dividing the disk into a hot disk and a non-hot disk according to the latest counted access frequency of the disk;
or,
and the second dividing subunit is used for counting the access frequency of the disk once after each data operation is performed, and dividing the disk into a hotspot disk and a non-hotspot disk according to the latest counted access frequency of the disk.
10. The apparatus of claim 6, wherein the access frequency of the disk comprises: the total access times of the disk and/or the longest access interval of the disk;
the greater the total number of accesses and/or the smaller the longest access interval, the higher the access frequency, and the smaller the total number of accesses and/or the larger the longest access interval, the lower the access frequency.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310528922.5A CN103576835B (en) | 2013-10-30 | 2013-10-30 | The data manipulation method of a kind of dormancy disk and device |
PCT/CN2014/083071 WO2015062316A1 (en) | 2013-10-30 | 2014-07-25 | Data manipulation method and device for hibernating disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310528922.5A CN103576835B (en) | 2013-10-30 | 2013-10-30 | The data manipulation method of a kind of dormancy disk and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103576835A CN103576835A (en) | 2014-02-12 |
CN103576835B true CN103576835B (en) | 2016-06-29 |
Family
ID=50048796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310528922.5A Active CN103576835B (en) | 2013-10-30 | 2013-10-30 | The data manipulation method of a kind of dormancy disk and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103576835B (en) |
WO (1) | WO2015062316A1 (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103576835B (en) * | 2013-10-30 | 2016-06-29 | 华为技术有限公司 | The data manipulation method of a kind of dormancy disk and device |
CN105138416A (en) * | 2014-06-05 | 2015-12-09 | 中兴通讯股份有限公司 | Disk sleep processing method and apparatus |
CN105320246B (en) * | 2015-09-29 | 2019-01-15 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
CN105528053A (en) * | 2015-12-11 | 2016-04-27 | 曙光信息产业股份有限公司 | Management method and device for distributed system |
CN105574134B (en) * | 2015-12-15 | 2019-04-12 | 曙光信息产业股份有限公司 | A kind of document handling method and device |
CN106951179B (en) * | 2016-01-07 | 2020-03-27 | 杭州海康威视数字技术股份有限公司 | Data migration method and device |
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 (en) * | 2016-11-30 | 2020-01-21 | 华为技术有限公司 | Hot spot data determination method, equipment and device |
CN108170254B (en) * | 2017-12-30 | 2019-12-06 | 广东技术师范大学 | strategy scheduling method based on sporadic request |
CN109614050B (en) * | 2018-12-11 | 2022-03-04 | 浪潮(北京)电子信息产业有限公司 | Method, device and equipment for controlling dormant state of disk and readable storage medium |
CN110381153A (en) * | 2019-07-24 | 2019-10-25 | 深圳市网心科技有限公司 | A kind of file dispositions method, deployment facility, system and medium |
CN110703998B (en) * | 2019-09-29 | 2021-11-09 | 百度在线网络技术(北京)有限公司 | Control method of memory, controller, chip and electronic equipment |
CN112988083B (en) * | 2021-05-19 | 2021-08-03 | 四川省商投信息技术有限责任公司 | Cold data storage method and system |
Citations (2)
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 (en) * | 2011-12-26 | 2012-07-25 | 创新科存储技术有限公司 | Apparatus for saving energy by using MAID (massive array of independent disks) technique |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101262580B (en) * | 2007-08-31 | 2010-09-08 | 深圳市同洲电子股份有限公司 | A digital TV receiving device and method and system for monitoring hard disk dormancy |
CN101655774B (en) * | 2009-09-01 | 2012-08-29 | 成都市华为赛门铁克科技有限公司 | Magnetic disc control method and system as well as relevant apparatus |
CN103186350B (en) * | 2011-12-31 | 2016-03-30 | 北京快网科技有限公司 | The moving method of mixing storage system and hot spot data block |
CN103576835B (en) * | 2013-10-30 | 2016-06-29 | 华为技术有限公司 | The data manipulation method of a kind of dormancy disk and device |
-
2013
- 2013-10-30 CN CN201310528922.5A patent/CN103576835B/en active Active
-
2014
- 2014-07-25 WO PCT/CN2014/083071 patent/WO2015062316A1/en active Application Filing
Patent Citations (2)
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 (en) * | 2011-12-26 | 2012-07-25 | 创新科存储技术有限公司 | Apparatus for saving energy by using MAID (massive array of independent disks) technique |
Also Published As
Publication number | Publication date |
---|---|
CN103576835A (en) | 2014-02-12 |
WO2015062316A1 (en) | 2015-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103576835B (en) | The data manipulation method of a kind of dormancy disk and device | |
US9348408B2 (en) | Adaptive power conservation in storage clusters | |
US9471134B2 (en) | Method and apparatus for managing power of a storage system | |
US20130290756A1 (en) | Power Management For A System On A Chip (SoC) | |
US20110047316A1 (en) | Solid state memory device power optimization | |
CN101673191B (en) | Data writing method and device as well as data memory system | |
WO2013170575A1 (en) | Method, device, and central processor for hard drive power-saving control | |
WO2010102568A1 (en) | Method, apparatus and storage apparatus for controlling state of storage apparatus | |
US20160148670A1 (en) | Systems and methods for reducing volatile memory standby power in a portable computing device | |
CN108089825B (en) | Storage system based on distributed cluster | |
US11662925B2 (en) | Data processing method and distributed storage system | |
CN107728938B (en) | Cold data placement strategy based on frequency correlation under low-energy-consumption cluster environment | |
CN109814804A (en) | A kind of method and apparatus reducing distributed memory system energy consumption | |
US20060168462A1 (en) | Bus technique for controlling power states of blades in a blade enclosure | |
CN103176753A (en) | Storage device and data management method of storage device | |
CN101655774A (en) | Magnetic disc control method and system as well as relevant apparatus | |
TWI235298B (en) | Method to read the battery status by the operating system of portable computer | |
CN111459261A (en) | Disk wake-up method and device, electronic equipment and storage medium | |
WO2020238326A1 (en) | Method and device for adjusting performance state of processor, uefi, and storage medium | |
CN112612414B (en) | System for realizing cold data distributed storage based on microprocessor system scheduling | |
TWI453670B (en) | Method for waking up a plurality of hibernated mass storage devices | |
WO2021197239A1 (en) | Device sleep method and computing device | |
Chang et al. | STORAGE POWER OPTIMIZATIONS FOR CLIENT DEVICES AND DATA CENTERS. | |
CN106332241A (en) | Physical layer and upper layer synchronization method | |
TWI522797B (en) | System and method for energy-efficient distributed storage with fault tolerance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |