CN103268147A - Hard disk power consumption management method and device - Google Patents
Hard disk power consumption management method and device Download PDFInfo
- Publication number
- CN103268147A CN103268147A CN2013102195480A CN201310219548A CN103268147A CN 103268147 A CN103268147 A CN 103268147A CN 2013102195480 A CN2013102195480 A CN 2013102195480A CN 201310219548 A CN201310219548 A CN 201310219548A CN 103268147 A CN103268147 A CN 103268147A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- power consumption
- state
- health degree
- health
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,特别涉及一种硬盘功耗管理方法和装置。The invention relates to the technical field of computers, in particular to a method and device for managing power consumption of a hard disk.
背景技术Background technique
硬盘是电脑主要的存储媒介之一。现在的硬盘大都拥有功耗管理技术,例如已批准的T10标准#T10/09-054和T13标准#T13/452-2008的专利都提出了对硬盘功耗的管理方案。如希捷PowerChoice技术可以使主机通过模式页面(SAS/FC)或设置功能命令(SATA)来定制硬盘的节能设置,在获得更好的性能的同时降低硬盘的功耗。这种配置的灵活性可确保用户针对特定存储应用,能够指定优化的闲置时间阈值。Hard disk is one of the main storage media of computer. Most of today's hard disks have power management technology. For example, the approved patents of T10 standard #T10/09-054 and T13 standard #T13/452-2008 both propose solutions for hard disk power consumption management. For example, Seagate PowerChoice technology can enable the host to customize the energy-saving settings of the hard disk through the mode page (SAS/FC) or setting function commands (SATA), so as to reduce the power consumption of the hard disk while obtaining better performance. This configuration flexibility enables users to specify optimal idle time thresholds for specific storage applications.
但是现有技术中,硬盘节能状态的切换需要时间和开销,并且现有技术没有针对不同硬盘的具体情况进行功耗设置。如果对已经明显老化或潜在故障的硬盘开启节能功能,则容易导致IO请求命令执行超时(timeout)、被终止(abort)等情况发生。However, in the prior art, the switching of the energy-saving state of the hard disk requires time and overhead, and the prior art does not set the power consumption according to the specific conditions of different hard disks. If the energy-saving function is enabled for hard disks that are obviously aging or have potential failures, it is easy to cause IO request command execution to timeout (timeout), be terminated (abort), and other situations.
发明内容Contents of the invention
本发明旨在至少解决现有技术中存在的技术问题之一。为此,本发明的一个目的在于提出一种硬盘功耗管理方法,本方法防止系统性能降低或因节能模式切换导致的故障,在使得硬盘达到提供超低功耗的同时保证了整体性能、数据完整性和可靠性。The present invention aims to solve at least one of the technical problems existing in the prior art. For this reason, an object of the present invention is to propose a hard disk power consumption management method, which prevents system performance degradation or failures caused by energy-saving mode switching, and ensures overall performance, data Integrity and reliability.
本发明的第二个目的在于提出一种硬盘功耗管理装置。The second object of the present invention is to provide a device for managing power consumption of a hard disk.
为达到上述目的,本发明第一方面的实施例提出了一种硬盘功耗管理方法,包括如下步骤:获取硬盘的硬盘控制器的超时限制时间,根据所述超时限制时间设置所述硬盘的最大功耗节省模式;检测所述硬盘的多个参数值,并将每个所述参数值与对应的预设安全值进行比较,根据比较结果生成所述硬盘的健康程度;将所述硬盘的健康程度与多个预设健康区间进行映射,根据与多个所述预设健康区间映射的所述硬盘的健康程度设置所述硬盘的功耗模式,并控制所述硬盘在不同的功耗模式运行。In order to achieve the above object, the embodiment of the first aspect of the present invention proposes a hard disk power consumption management method, including the following steps: obtaining the timeout limit time of the hard disk controller of the hard disk, and setting the maximum time limit of the hard disk according to the timeout limit time. Power saving mode; detecting multiple parameter values of the hard disk, and comparing each parameter value with a corresponding preset security value, generating the health degree of the hard disk according to the comparison result; comparing the health of the hard disk The degree is mapped with a plurality of preset health intervals, and the power consumption mode of the hard disk is set according to the health degree of the hard disk mapped with the plurality of preset health intervals, and the hard disk is controlled to run in different power consumption modes .
根据本发明实施例的硬盘功耗管理方法,通过检测硬盘的硬盘控制器的超时限制时间和参数值,生成硬盘的健康程度,并对健康程度预设多个健康区间,根据不同的预设健康区间获得不同的硬盘的健康程度,具有针对性,能在快速响应IO请求命令的情况下节省能源,有效避免因硬盘老化或潜在故障导致的工作状态保存、切换及Timer设置失败问题,以及IO请求命令执行超时或者被终止的情况,防止因节能模式切换导致的性能降低或潜在故障发生,使硬盘降低超低功耗的同时,保证了整体性能、数据完整性和可靠性。According to the hard disk power consumption management method of the embodiment of the present invention, the health degree of the hard disk is generated by detecting the timeout limit time and parameter values of the hard disk controller of the hard disk, and a plurality of health intervals are preset for the health degree. The health level of different hard disks can be obtained in different intervals, which is targeted and can save energy in the case of fast response to IO request commands, effectively avoiding the problems of working state saving, switching and Timer setting failures caused by hard disk aging or potential failures, as well as IO requests When the command execution times out or is terminated, it prevents the performance degradation or potential failure caused by the energy-saving mode switching, so that the hard disk can reduce the ultra-low power consumption while ensuring the overall performance, data integrity and reliability.
在本发明的一个实施例中,所述根据所述超时限制时间设置所述硬盘的最大功耗节省模式,包括如下步骤:根据所述硬盘控制器的所述超时限制时间确定最大功耗节省模式;根据与多个所述预设健康区间映射的所述硬盘的健康程度设置对应的功耗模式。In an embodiment of the present invention, the setting the maximum power saving mode of the hard disk according to the timeout limit time includes the following steps: determining the maximum power consumption saving mode according to the timeout limit time of the hard disk controller ; Setting the corresponding power consumption mode according to the health level of the hard disk mapped to the multiple preset health intervals.
在本发明的一个实施例中,所述功耗模式包括:第一状态:默认空闲状态;第二状态:禁用多个伺服系统、减少处理器和通道功耗、硬盘全速转动;第三状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、硬盘全速转动;第四状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、降低硬盘转动速度;第五状态:磁头卸载到硬盘斜坡、硬盘马达停转、硬盘对非磁碟访问主机命令作出响应;其中,所述第一至第五状态的恢复时间依次增长。In one embodiment of the present invention, the power consumption mode includes: first state: default idle state; second state: disable multiple servo systems, reduce processor and channel power consumption, and rotate hard disk at full speed; third state: Disable multiple servos, reduce processor and channel power consumption, head offload to hard disk ramp, hard disk spins at full speed; 4th state: disable multiple servos, reduce processor and channel power consumption, head offload to hard disk ramp, lower hard disk Rotation speed; the fifth state: the magnetic head is unloaded to the hard disk ramp, the hard disk motor stops, and the hard disk responds to the non-disk access host command; wherein, the recovery time of the first to fifth states increases sequentially.
在本发明的一个实施例中,所述检测硬盘的多个参数值,包括检测所述硬盘的磁头、盘片、马达和电路的运行状态以得到相应的参数值。。In an embodiment of the present invention, the detecting multiple parameter values of the hard disk includes detecting the operation status of the magnetic head, disk, motor and circuit of the hard disk to obtain corresponding parameter values. .
在本发明的一个实施例中,每个所述预设健康区间用于表示所述硬盘的健康程度,且多个所述预设健康区间表示的健康程度依次升高。In an embodiment of the present invention, each of the preset health intervals is used to represent the health of the hard disk, and the health degrees indicated by the plurality of preset health intervals increase sequentially.
本发明第二方面的实施例提出了一种硬盘功耗管理装置,包括检测模块、模式设置模块和控制模块。其中,检测模块用于检测硬盘的硬盘控制器的超时限制时间和硬盘的多个参数值;模式设置模块用于根据所述超时限制时间设置所述硬盘的最大功耗节省模式,以及将每个所述参数值与对应的预设安全值进行比较,根据比较结果生成所述硬盘的健康程度,并将所述硬盘的健康程度与多个预设健康区间进行映射,根据与多个所述预设健康区间映射的所述硬盘的健康程度设置所述硬盘的功耗模式;控制模块用于控制所述硬盘在不同的功耗模式运行。The embodiment of the second aspect of the present invention provides a device for managing power consumption of a hard disk, including a detection module, a mode setting module and a control module. Wherein, the detection module is used to detect the overtime limit time of the hard disk controller of the hard disk and a plurality of parameter values of the hard disk; the mode setting module is used to set the maximum power saving mode of the hard disk according to the timeout limit time, and set each The parameter value is compared with the corresponding preset security value, and the health degree of the hard disk is generated according to the comparison result, and the health degree of the hard disk is mapped to a plurality of preset health intervals, and according to the multiple preset Set the health level of the hard disk mapped in the healthy interval to set the power consumption mode of the hard disk; the control module is used to control the hard disk to run in different power consumption modes.
根据本发明实施例的硬盘功耗管理装置,通过检测硬盘的硬盘控制器的超时限制时间和参数值,生成硬盘的健康程度,并对健康程度预设多个健康区间,根据不同的健康程度区间获得不同的硬盘的健康程度,具有针对性,能在快速响应IO请求命令的情况下节省能源,有效避免因硬盘老化或潜在故障导致的工作状态保存、切换及Timer设置失败问题,以及IO请求命令执行超时或者被终止的情况,防止因节能模式切换导致的性能降低或潜在故障发生,使硬盘降低超低功耗的同时,保证了整体性能、数据完整性和可靠性。According to the hard disk power consumption management device of the embodiment of the present invention, the health degree of the hard disk is generated by detecting the timeout limit time and parameter values of the hard disk controller of the hard disk, and a plurality of health intervals are preset for the health degree. Obtaining the health of different hard disks is targeted, and can save energy in the case of fast response to IO request commands, effectively avoiding the problems of working state saving, switching and Timer setting failures caused by hard disk aging or potential failures, as well as IO request commands Execute overtime or be terminated, prevent performance degradation or potential failures caused by energy-saving mode switching, reduce ultra-low power consumption of hard disks, and ensure overall performance, data integrity, and reliability.
在本发明的一个实施例中,所述模式设置模块根据所述硬盘控制器的所述超时限制时间确定最大功耗节省模式,然后根据与多个所述预设健康区间映射的所述硬盘的健康程度设置对应的功耗模式。In an embodiment of the present invention, the mode setting module determines the maximum power saving mode according to the timeout limit time of the hard disk controller, and then according to the The power consumption mode corresponding to the health level setting.
在本发明的一个实施例中,所述功耗模式包括:第一状态:默认空闲状态;第二状态:禁用多个伺服系统、减少处理器和通道功耗、硬盘全速转动;第三状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、硬盘全速转动;第四状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、降低硬盘转动速度;第五状态:磁头卸载到硬盘斜坡、硬盘马达停转、硬盘对非磁碟访问主机命令作出响应;其中,所述第一至第五状态的恢复时间依次增长。In one embodiment of the present invention, the power consumption mode includes: first state: default idle state; second state: disable multiple servo systems, reduce processor and channel power consumption, and rotate hard disk at full speed; third state: Disable multiple servos, reduce processor and channel power consumption, head offload to hard disk ramp, hard disk spins at full speed; 4th state: disable multiple servos, reduce processor and channel power consumption, head offload to hard disk ramp, lower hard disk Rotation speed; the fifth state: the magnetic head is unloaded to the hard disk ramp, the hard disk motor stops, and the hard disk responds to the non-disk access host command; wherein, the recovery time of the first to fifth states increases sequentially.
在本发明的一个实施例中,所述检测模块所述检测硬盘的多个参数值,包括检测所述硬盘的磁头、盘片、马达和电路的运行状态以得到相应的参数值。In an embodiment of the present invention, the detection module detects multiple parameter values of the hard disk, including detecting the operation status of the magnetic head, disk, motor and circuit of the hard disk to obtain corresponding parameter values.
在本发明的一个实施例中,每个所述预设健康区间用于表示所述硬盘的健康程度,且多个所述预设健康区间表示的健康程度依次升高。In an embodiment of the present invention, each of the preset health intervals is used to represent the health of the hard disk, and the health degrees indicated by the plurality of preset health intervals increase sequentially.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:
图1是根据本发明实施例的硬盘功耗管理方法的流程图;和Fig. 1 is the flowchart of the hard disk power consumption management method according to the embodiment of the present invention; With
图2是根据本发明实施例的硬盘功耗管理装置的结构示意图。FIG. 2 is a schematic structural diagram of a device for managing power consumption of a hard disk according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
下面参考图1描述根据本发明实施例的硬盘功耗管理方法,包括如下步骤:The following describes the hard disk power consumption management method according to an embodiment of the present invention with reference to FIG. 1, including the following steps:
步骤S110:获取硬盘的硬盘控制器的超时限制时间,根据超时限制时间设置硬盘的最大功耗节省模式。Step S110: Obtain the timeout limit time of the hard disk controller of the hard disk, and set the maximum power saving mode of the hard disk according to the timeout limit time.
进一步地,根据超时限制时间设置硬盘的最大功耗节省模式,包括如下步骤:首先,根据硬盘控制器的超时限制时间确定最大功耗节省模式,然后根据与多个预设健康区间映射的硬盘的健康程度设置对应的功耗模式。Further, setting the maximum power saving mode of the hard disk according to the timeout limit time includes the following steps: firstly, determining the maximum power consumption saving mode according to the timeout limit time of the hard disk controller, and then according to the hard disks mapped with multiple preset health intervals The power consumption mode corresponding to the health level setting.
步骤S120:检测硬盘的多个参数值,并将每个参数值与对应的预设安全值进行比较,根据比较结果生成硬盘的健康程度。Step S120: Detect multiple parameter values of the hard disk, compare each parameter value with a corresponding preset safe value, and generate a health degree of the hard disk according to the comparison result.
其中,检测硬盘的多个参数值,其中,多个参数值为14项SMART属性指标,包括检测硬盘的磁头、盘片、马达和电路的运行状态以得到相应的参数值。Among them, multiple parameter values of the hard disk are detected, among which the multiple parameter values are 14 SMART attribute indicators, including detecting the operating status of the magnetic head, platter, motor and circuit of the hard disk to obtain corresponding parameter values.
步骤S130:将硬盘的健康程度与多个预设建康区间进行映射,根据与多个预设健康区间映射的硬盘的健康程度设置硬盘的功耗模式,并控制硬盘在不同的功耗模式运行。Step S130: Map the health level of the hard disk with a plurality of preset health intervals, set the power consumption mode of the hard disk according to the health degree of the hard disk mapped with the plurality of preset health intervals, and control the hard disk to run in different power consumption modes .
其中,每个预设健康区间用于表示硬盘的对应的健康程度,且多个预设健康区间表示的健康程度依次升高。换言之,每个预设健康区间的健康程度不同,并且如果将多个预设健康区间表示的健康程度进行排序,则健康程度愈来愈好。Wherein, each preset health interval is used to represent a corresponding health degree of the hard disk, and the health degrees represented by multiple preset health intervals increase sequentially. In other words, the health degree of each preset health interval is different, and if the health degrees represented by multiple preset health intervals are sorted, the health degree becomes better and better.
其中,功耗模式包括:Among them, the power mode includes:
第一状态:默认空闲状态;第二状态:禁用多个伺服系统、减少处理器和通道功耗、硬盘全速转动;第三状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、硬盘全速转动;第四状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、降低硬盘转动速度;第五状态:磁头卸载到硬盘斜坡、硬盘马达停转、硬盘对非磁碟访问主机命令作出响应;其中,第一至第五状态的恢复时间依次增长。The first state: default idle state; the second state: disable multiple servo systems, reduce processor and channel power consumption, and drive at full speed; third state: disable multiple servo systems, reduce processor and channel power consumption, head unloading to the hard disk ramp, and the hard disk rotates at full speed; the fourth state: disable multiple servo systems, reduce processor and channel power consumption, unload the head to the hard disk ramp, and reduce the rotation speed of the hard disk; fifth state: unload the head to the hard disk ramp, and stop the hard disk motor The hard disk and the hard disk respond to non-disk access host commands; wherein, the recovery time of the first to fifth states increases sequentially.
下面以7200转3TB SATA硬盘为例对根据本发明实施例的硬盘功耗管理方法进行说明,可以理解的是,下述说明仅出于示例目的,本发明实施例不限于此。The following uses a 7200 rpm 3TB SATA hard disk as an example to illustrate the hard disk power consumption management method according to the embodiment of the present invention. It can be understood that the following description is for example purposes only, and the embodiment of the present invention is not limited thereto.
表1为7200转3TB SATA硬盘的最大功耗节省模式-恢复时间对应表,表示最大功耗节省模式各个状态与回复时间之间的对应关系。第二列中的名称为状态在7200转3TB SATA硬盘中的具体名称,表示的意义由第三列解释进行说明。Table 1 is the maximum power saving mode-recovery time correspondence table for a 7200rpm 3TB SATA hard disk, indicating the correspondence between each state of the maximum power saving mode and the recovery time. The name in the second column is the specific name of the state in the 7200 rpm 3TB SATA hard disk, and the meaning is explained by the third column.
表1Table 1
获取硬盘的硬盘控制器的超时限制时间,根据超时限制时间设置硬盘的最大功耗节省模式。例如,查询预设的最大功耗节省模式-恢复时间对应表表1。Obtain the timeout limit time of the hard disk controller of the hard disk, and set the maximum power saving mode of the hard disk according to the timeout limit time. For example, query the preset maximum power saving mode-recovery time correspondence table Table 1.
根据硬盘控制器的超时限制时间确定最大功耗节省模式,然后再根据与多个预设健康区间映射的硬盘的健康程度设置对应的功耗模式。The maximum power saving mode is determined according to the timeout limit time of the hard disk controller, and then the corresponding power consumption mode is set according to the health degree of the hard disk mapped to multiple preset health intervals.
例如,在JBOD(Just a Bunch Of Disks,磁盘簇)的硬盘,硬盘控制器的超时限制时间为30s,那么根据表1,硬盘最多可以开启第五状态模式。对于RAID(Redundant Arraysof Inexpensive Disks,磁盘阵列)下的硬盘,RAID的控制器的超时限制时间为7s,那么最多可以开启到第四状态,由于8707ms>7s,因此不能使用第五状态,否则超过7s后,硬盘将被作为故障处理。For example, in JBOD (Just a Bunch Of Disks, disk cluster) hard disk, the timeout limit of the hard disk controller is 30s, then according to Table 1, the hard disk can turn on the fifth state mode at most. For hard disks under RAID (Redundant Arrays of Inexpensive Disks, disk array), the timeout limit of the RAID controller is 7s, so it can be turned on to the fourth state at most. Since 8707ms>7s, the fifth state cannot be used, otherwise it will exceed 7s After that, the hard disk will be treated as a failure.
检测硬盘的多个参数值可以通过硬盘S.M.A.R.T.技术实现,S.M.A.R.T.技术是一种自动的硬盘状态检测与预警系统和规范,该技术通过在硬盘硬件内的检测指令,对硬盘的硬件运行情况进行监控并记录监控参数值。可以理解的是,S.M.A.R.T.技术仅出于示例目的,本发明的实施例不限于此。其中,硬盘的硬件包括如磁头、盘片、马达、电路等。检测硬盘的多个参数值后,与厂商预设的预设安全值进行比较,根据比较结果生成硬盘的健康程度。如果监控情况即将或者已超出预设安全值的安全范围,可以通过主机的监控硬件或软件自动向用户作出警告并进行轻微的自动修复,从而保障硬盘数据的安全。以希捷7200转的3TB SATA硬盘为例,有21项S.M.A.R.T.属性指标,每项属性值的区间是[1,100]。其中,表2中的14项对硬盘功耗切换效率及成功与否有重要的影响:The detection of multiple parameter values of the hard disk can be realized through hard disk S.M.A.R.T. technology. S.M.A.R.T. technology is an automatic hard disk status detection and early warning system and specification. Record monitoring parameter values. It should be understood that the S.M.A.R.T. technique is for example purposes only, and embodiments of the present invention are not limited thereto. Among them, the hardware of the hard disk includes, for example, a magnetic head, a disk, a motor, and a circuit. After detecting multiple parameter values of the hard disk, compare them with the preset safety values preset by the manufacturer, and generate the health degree of the hard disk according to the comparison results. If the monitoring situation is about to or has exceeded the safety range of the preset safety value, the monitoring hardware or software of the host can automatically warn the user and perform a slight automatic repair, so as to ensure the safety of hard disk data. Taking Seagate 7200 RPM 3TB SATA hard disk as an example, there are 21 S.M.A.R.T. attribute indicators, and the interval of each attribute value is [1,100]. Among them, the 14 items in Table 2 have an important impact on the switching efficiency and success of hard disk power consumption:
表2Table 2
本方法通过根据硬盘的健康程度划分等级区间来选择最佳的功耗模式。根据每个属性的阀值,将表2中的14项属性值分别划分为5个区间,并进行组合后生成统一的五级区间,如表3所示,以区间形式标志硬盘健康等级。健康区间1意味着硬盘健康较差,区间5则反之。This method selects the best power consumption mode by dividing grade intervals according to the health degree of the hard disk. According to the threshold value of each attribute, the 14 attribute values in Table 2 are divided into 5 intervals, and combined to generate a unified five-level interval. As shown in Table 3, the hard disk health level is marked in the form of intervals. A health interval of 1 means that the hard disk is in poor health, and an interval of 5 is vice versa.
表3table 3
将硬盘的健康程度与多个预设建康区间进行映射,根据与多个预设健康区间映射的硬盘的健康程度设置硬盘的功耗模式,并控制硬盘在不同的功耗模式运行。如果因为RAID卡超时限制时间,第五状态不能使用,则处于健康区间4和5的硬盘设置为第四状态,并控制硬盘以功耗模式运行。Map the health degree of the hard disk with multiple preset health intervals, set the power consumption mode of the hard disk according to the health degree of the hard disk mapped with the multiple preset health intervals, and control the hard disk to run in different power consumption modes. If the fifth state cannot be used due to the time limit of the timeout of the RAID card, the hard disks in the health range 4 and 5 are set to the fourth state, and the hard disks are controlled to run in the power consumption mode.
根据本发明实施例的硬盘功耗管理方法,针对不同的硬盘健康程度设置不同级别功耗模式,能快速响应IO请求命令的情况下节省能源,有效避免因硬盘老化或潜在故障导致的工作状态保存、切换及Timer设置失败问题,以及IO请求命令执行超时或者被终止的情况,防止因节能模式切换导致的性能降低或潜在故障发生,从而真正的使硬盘降低功耗的同时,不会影响性能、数据完整性和可靠性。According to the hard disk power consumption management method of the embodiment of the present invention, different levels of power consumption modes are set for different hard disk health levels, which can save energy in the case of fast response to IO request commands, and effectively avoid the preservation of working status caused by hard disk aging or potential failure. , Switching and Timer setting failures, as well as IO request command execution timeout or being terminated, to prevent performance degradation or potential failures caused by energy-saving mode switching, so as to truly reduce power consumption of the hard disk without affecting performance. Data integrity and reliability.
下面参考图2描述根据本发明实施例的硬盘功耗管理装置100,包括检测模块110、模式设置模块120和控制模块130。The following describes a hard disk power management device 100 according to an embodiment of the present invention with reference to FIG. 2 , including a detection module 110 , a
其中,检测模块110用于检测硬盘的硬盘控制器的超时限制时间和硬盘的多个参数值;模式设置模块120用于根据超时限制时间设置硬盘的最大功耗节省模式,以及将每个参数值与对应的预设安全值进行比较,根据比较结果生成硬盘的健康程度,并将硬盘的健康程度与多个预设健康区间进行映射,根据与多个预设健康区间映射的硬盘的健康程度设置硬盘的功耗模式;控制模块用于控制硬盘在不同的功耗模式运行。Wherein, the detection module 110 is used to detect the overtime limit time of the hard disk controller of the hard disk and a plurality of parameter values of the hard disk; the
模式设置模块120根据硬盘控制器的超时限制时间确定最大功耗节省模式,然后根据与多个预设健康区间映射的硬盘的健康程度设置对应的功耗模式。The
在本发明的一个实施例中,功耗模式包括:第一状态:默认空闲状态;第二状态:禁用多个伺服系统、减少处理器和通道功耗、硬盘全速转动;第三状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、硬盘全速转动;第四状态:禁用多个伺服系统、减少处理器和通道功耗、磁头卸载到硬盘斜坡、降低硬盘转动速度;第五状态:磁头卸载到硬盘斜坡、硬盘马达停转、硬盘对非磁碟访问主机命令作出响应;其中,第一至第五状态的恢复时间依次增长。In one embodiment of the present invention, the power consumption mode includes: first state: default idle state; second state: disable multiple servo systems, reduce processor and channel power consumption, and rotate hard disk at full speed; third state: disable multiple 1 servo system, reduced processor and channel power consumption, heads offloaded to hard drive ramps, hard drive spins at full speed; fourth state: multiple servos disabled, reduced processor and channel power consumption, heads offloaded to hard drive ramps, hard drives spin down ; The fifth state: the magnetic head is unloaded to the hard disk ramp, the hard disk motor stops, and the hard disk responds to the non-disk access host command; wherein, the recovery time of the first to fifth states increases sequentially.
检测模块110检测硬盘的多个参数值,其中,多个参数值为14项SMART属性指标,包括检测硬盘的磁头、盘片、马达和电路的运行状态以得到相应的参数值。The detection module 110 detects multiple parameter values of the hard disk, wherein the multiple parameter values are 14 SMART attribute indicators, including detecting the operating status of the hard disk head, platter, motor and circuit to obtain corresponding parameter values.
每个预设健康区间用于表示硬盘的对应的健康程度,且多个预设健康区间表示的健康程度依次升高。换言之,每个预设健康区间的健康程度不同,并且如果将多个预设健康区间表示的健康程度进行排序,则健康程度愈来愈好。Each preset health interval is used to represent a corresponding health degree of the hard disk, and the health degrees represented by multiple preset health intervals increase sequentially. In other words, the health degree of each preset health interval is different, and if the health degrees represented by multiple preset health intervals are sorted, the health degree becomes better and better.
下面以7200转3TB SATA硬盘为例对根据本发明实施例的硬盘功耗管理装置进行说明,可以理解的是,下述说明仅为示例目的,本发明实施例不限于此。The following uses a 7200-rpm 3TB SATA hard disk as an example to illustrate the hard disk power consumption management device according to the embodiment of the present invention. It can be understood that the following description is for illustrative purposes only, and the embodiment of the present invention is not limited thereto.
表1为7200转3TB SATA硬盘的最大功耗节省模式-恢复时间对应表,表示最大功耗节省模式各个状态与回复时间之间的对应关系。第二列中的名称为状态在7200转3TB SATA硬盘中的具体名称,表示的意义由第三列解释进行说明。Table 1 is the maximum power saving mode-recovery time correspondence table for a 7200rpm 3TB SATA hard disk, indicating the correspondence between each state of the maximum power saving mode and the recovery time. The name in the second column is the specific name of the state in the 7200 rpm 3TB SATA hard disk, and the meaning is explained by the third column.
检测模块110获取硬盘的硬盘控制器的超时限制时间,模式设置模块120根据超时限制时间设置硬盘的最大功耗节省模式。例如,模式设置模块120查询预设的最大功耗节省模式-恢复时间对应表,即表1。The detection module 110 acquires the timeout limit time of the hard disk controller of the hard disk, and the
根据硬盘控制器的超时限制时间确定最大功耗节省模式,然后根据与多个预设健康区间映射的硬盘的健康程度设置对应的功耗模式。Determine the maximum power saving mode according to the timeout limit time of the hard disk controller, and then set the corresponding power consumption mode according to the health degree of the hard disk mapped to the multiple preset health intervals.
例如,在JBOD(Just a Bunch Of Disks,磁盘簇)的硬盘,检测模块110检测硬盘控制器的超时限制时间为30s,那么根据表1,模式设置模块120设置硬盘最多可以开启第五状态模式。对于RAID(Redundant Arrays of Inexpensive Disks,磁盘阵列)下的硬盘,检测模块110检测RAID的控制器的超时限制时间为7s,那么模式设置模块120最多可以开启到第四状态,由于8707ms>7s,因此模式设置模块120不能使用第五状态,否则超过7s后,硬盘将被作为故障处理。For example, in the hard disk of JBOD (Just a Bunch Of Disks, disk cluster), the detection module 110 detects that the timeout limit time of the hard disk controller is 30s, so according to Table 1, the
检测模块110检测硬盘的多个参数值可以通过硬盘S.M.A.R.T.技术实现,S.M.A.R.T.技术是一种自动的硬盘状态检测与预警系统和规范,该技术通过在硬盘硬件内的检测指令,对硬盘的硬件运行情况进行监控并记录监控参数值。可以理解的是,S.M.A.R.T.技术仅出于示例目的,本发明的实施例不限于此。The detection module 110 can detect multiple parameter values of the hard disk through hard disk S.M.A.R.T. technology. S.M.A.R.T. technology is an automatic hard disk status detection and early warning system and specification. Monitor and record values of monitored parameters. It should be understood that the S.M.A.R.T. technique is for example purposes only, and embodiments of the present invention are not limited thereto.
其中,硬盘的硬件包括如磁头、盘片、马达、电路等。检测模块110检测硬盘的多个参数值后,模式设置模块120与厂商预设的预设安全值进行比较,根据比较结果生成硬盘的健康程度。如果监控情况即将或者已超出预设安全值的安全范围,可以通过主机的监控硬件或软件自动向用户作出警告并进行轻微的自动修复,从而保障硬盘数据的安全。以希捷7200转的3TB SATA硬盘为例,有21项S.M.A.R.T.属性指标,每项属性值的区间是[1,100]。其中,表2中的14项对硬盘功耗切换效率及成功与否有重要的影响。Among them, the hardware of the hard disk includes, for example, a magnetic head, a disk, a motor, and a circuit. After the detection module 110 detects multiple parameter values of the hard disk, the
模式设置模块120根据硬盘的健康程度划分等级区间来选择最佳的节能模式。根据每个属性的阀值,将表2中的14项属性值分别划分为5个区间,并进行组合后生成统一的五级区间,如表3所示,以区间形式标志硬盘健康等级。健康区间1意味着硬盘健康较差,区间5则反之。The
模式设置模块120将硬盘的健康程度与多个预设建康区间进行映射,根据与多个预设健康区间映射的硬盘的健康程度设置硬盘的功耗模式,控制模块130控制硬盘在不同的功耗模式运行。如果因为RAID卡超时限制时间,第五状态不能使用,则模式设置模块120将处于健康区间4和5的硬盘设置为第四状态,由控制模块130控制硬盘以功耗模式运行。The
根据本发明实施例的硬盘功耗管理装置,针对不同的硬盘情况设置不同级别功耗模式,能快速响应IO请求命令的情况下节省能源,有效避免因硬盘老化或潜在故障导致的工作状态保存、切换及Timer设置失败问题,以及IO请求命令执行超时或者被终止的情况,防止因节能模式切换导致的性能降低或潜在故障发生,从而真正的使硬盘降低功耗的同时,不会影响性能、数据完整性和可靠性。According to the hard disk power consumption management device of the embodiment of the present invention, different levels of power consumption modes are set for different hard disk conditions, and energy can be saved in the case of fast response to IO request commands, effectively avoiding the preservation of working status due to aging or potential failure of the hard disk. Switching and Timer setting failures, as well as IO request command execution timeout or being terminated, prevent performance degradation or potential failures caused by energy-saving mode switching, so that the hard disk can truly reduce power consumption without affecting performance and data. Integrity and reliability.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention. and modifications, the scope of the invention is defined by the appended claims and their equivalents.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2013102195480A CN103268147A (en) | 2013-06-04 | 2013-06-04 | Hard disk power consumption management method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2013102195480A CN103268147A (en) | 2013-06-04 | 2013-06-04 | Hard disk power consumption management method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103268147A true CN103268147A (en) | 2013-08-28 |
Family
ID=49011782
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2013102195480A Pending CN103268147A (en) | 2013-06-04 | 2013-06-04 | Hard disk power consumption management method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103268147A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016077491A1 (en) * | 2014-11-12 | 2016-05-19 | Alibaba Group Holding Limited | Method and apparatus for controlling hard drive power consumption and controlling a management service of hard drive power consumption |
| CN106293534A (en) * | 2016-08-12 | 2017-01-04 | 深圳市金泰克半导体有限公司 | A kind of solid state hard disc with multiple-working mode and its implementation |
| CN107643877A (en) * | 2016-07-22 | 2018-01-30 | 中国电信股份有限公司 | Disk failure detection method and device |
| US10001938B2 (en) | 2016-01-07 | 2018-06-19 | Dell Products L.P. | Systems and methods for optimized utilization of storage resources based on performance and power characteristics |
| CN109933419A (en) * | 2019-03-29 | 2019-06-25 | 联想(北京)有限公司 | A kind of control method and device |
| CN110704228A (en) * | 2019-09-29 | 2020-01-17 | 至誉科技(武汉)有限公司 | Solid state disk exception handling method and system |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1372659A (en) * | 2000-05-08 | 2002-10-02 | 三菱电机株式会社 | Computer system and computer-readable recording medium |
| CN1983422A (en) * | 2005-12-15 | 2007-06-20 | 日立乐金资料储存股份有限公司 | Information recording/reproducing apparatus and method for processing read/write command thereof |
| CN101344812A (en) * | 2008-08-19 | 2009-01-14 | 华南理工大学 | A Disk Dynamic Power Management Method Based on Embedded System |
| CN101814010A (en) * | 2010-01-11 | 2010-08-25 | 浪潮(北京)电子信息产业有限公司 | Disk array implementation method and device |
| US7971093B1 (en) * | 2008-01-16 | 2011-06-28 | Network Appliance, Inc. | Apparatus and method to proactively address hard disk drive inefficiency and failure |
| CN102171643A (en) * | 2008-10-15 | 2011-08-31 | 三菱电机株式会社 | Information storage device |
| CN103019885A (en) * | 2012-11-26 | 2013-04-03 | 大唐移动通信设备有限公司 | Method and system for monitoring embedded Linux-based hard disc bad track |
-
2013
- 2013-06-04 CN CN2013102195480A patent/CN103268147A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1372659A (en) * | 2000-05-08 | 2002-10-02 | 三菱电机株式会社 | Computer system and computer-readable recording medium |
| CN1983422A (en) * | 2005-12-15 | 2007-06-20 | 日立乐金资料储存股份有限公司 | Information recording/reproducing apparatus and method for processing read/write command thereof |
| US7971093B1 (en) * | 2008-01-16 | 2011-06-28 | Network Appliance, Inc. | Apparatus and method to proactively address hard disk drive inefficiency and failure |
| CN101344812A (en) * | 2008-08-19 | 2009-01-14 | 华南理工大学 | A Disk Dynamic Power Management Method Based on Embedded System |
| CN102171643A (en) * | 2008-10-15 | 2011-08-31 | 三菱电机株式会社 | Information storage device |
| CN101814010A (en) * | 2010-01-11 | 2010-08-25 | 浪潮(北京)电子信息产业有限公司 | Disk array implementation method and device |
| CN103019885A (en) * | 2012-11-26 | 2013-04-03 | 大唐移动通信设备有限公司 | Method and system for monitoring embedded Linux-based hard disc bad track |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016077491A1 (en) * | 2014-11-12 | 2016-05-19 | Alibaba Group Holding Limited | Method and apparatus for controlling hard drive power consumption and controlling a management service of hard drive power consumption |
| CN106200860A (en) * | 2014-11-12 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Hard disk power consumption, hard disk power consumption management service control method and device |
| US10055000B2 (en) | 2014-11-12 | 2018-08-21 | Alibaba Group Holding Limited | Method and apparatus for controlling hard drive power consumption and controlling a management service of hard drive power consumption |
| CN106200860B (en) * | 2014-11-12 | 2020-07-14 | 阿里巴巴集团控股有限公司 | Hard disk power consumption and hard disk power consumption management service control method and device |
| TWI750109B (en) * | 2014-11-12 | 2021-12-21 | 香港商阿里巴巴集團服務有限公司 | Hard disk power consumption, hard disk power consumption management service control method and device |
| US10001938B2 (en) | 2016-01-07 | 2018-06-19 | Dell Products L.P. | Systems and methods for optimized utilization of storage resources based on performance and power characteristics |
| CN107643877A (en) * | 2016-07-22 | 2018-01-30 | 中国电信股份有限公司 | Disk failure detection method and device |
| CN106293534A (en) * | 2016-08-12 | 2017-01-04 | 深圳市金泰克半导体有限公司 | A kind of solid state hard disc with multiple-working mode and its implementation |
| CN109933419A (en) * | 2019-03-29 | 2019-06-25 | 联想(北京)有限公司 | A kind of control method and device |
| CN109933419B (en) * | 2019-03-29 | 2021-05-18 | 联想(北京)有限公司 | Control method and device |
| CN110704228A (en) * | 2019-09-29 | 2020-01-17 | 至誉科技(武汉)有限公司 | Solid state disk exception handling method and system |
| CN110704228B (en) * | 2019-09-29 | 2023-07-28 | 至誉科技(武汉)有限公司 | Solid state disk exception handling method and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7496778B2 (en) | Autonomous thermal management | |
| US8412986B2 (en) | Storage system and control method thereof | |
| CN103268147A (en) | Hard disk power consumption management method and device | |
| US8356139B2 (en) | Storage system for maintaining hard disk reliability | |
| US8806125B2 (en) | Storage system comprising power saving function | |
| US8219748B2 (en) | Storage system comprising both power saving and diagnostic functions | |
| US8868950B2 (en) | Reliability-aware disk power management | |
| US20110283128A1 (en) | System and Method for Information Handling System Storage Device Power Consumption Management | |
| US9653110B2 (en) | Speed control of data storage device using service controller | |
| US20090276648A1 (en) | Quad-state power-saving virtual storage controller | |
| US8713280B2 (en) | Hard disk drives having different rotational speeds | |
| US9626997B1 (en) | Variable spinning rates for hard disk drives | |
| US8839040B2 (en) | Computer system and detecting-alarming method thereof | |
| TWI687921B (en) | Host, shingled magnetic recording hard disk drive and operation method thereof | |
| CN105164655A (en) | Methods and systems for optimized staggered disk drive spinup | |
| TW201737247A (en) | Shingled magnetic recording hard disk device and the corresponding computer device thereof | |
| CN101989182A (en) | Method for automatically monitoring operation of external hard disk device and external hard disk device | |
| JP4961275B2 (en) | Storage device and disk device rotation speed control method | |
| JPH0273414A (en) | data processing equipment | |
| JP2006031888A (en) | Disk storage device and spindle motor rotation speed control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130828 |
|
| RJ01 | Rejection of invention patent application after publication |


