CN109901694A - Hard disk is automatically into the method for power down mode, system, equipment and storage medium - Google Patents

Hard disk is automatically into the method for power down mode, system, equipment and storage medium Download PDF

Info

Publication number
CN109901694A
CN109901694A CN201910146737.7A CN201910146737A CN109901694A CN 109901694 A CN109901694 A CN 109901694A CN 201910146737 A CN201910146737 A CN 201910146737A CN 109901694 A CN109901694 A CN 109901694A
Authority
CN
China
Prior art keywords
hard disk
automatically
function
setting
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910146737.7A
Other languages
Chinese (zh)
Inventor
梁文俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910146737.7A priority Critical patent/CN109901694A/en
Publication of CN109901694A publication Critical patent/CN109901694A/en
Pending legal-status Critical Current

Links

Landscapes

  • Power Sources (AREA)

Abstract

The present invention provides a kind of hard disk automatically into the method for power down mode, system, equipment and storage medium, includes the following steps: to obtain the current status information of hard disk;According to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;If hard disk is constantly in idle state in the time threshold of setting;Whether detection hard disk electricity-saving function is opened, if it is not, starting setting makes hard disk enter power and energy saving state, if so, automatically into power and energy saving state.EPC function is opened in setting;Standby_z function is opened in setting, automatically into Standby_z battery saving mode.In cold data storage service, hard disk can be made automatically into Standby_z suspend mode, realize the energy-saving of hard disk, to reduce the whole energy consumption of server, while reducing the O&M cost of data center by modification hard disk register setting.

Description

Hard disk is automatically into the method for power down mode, system, equipment and storage medium
Technical field
The invention belongs to technical field of memory, and in particular to a kind of hard disk automatically into the method for power down mode, system, set Standby and storage medium.
Background technique
With the fast development of data center and cloud storage, server industries emerge rapidly, and server system is in data Gains in depth of comprehension are to extensive arrangement.Hard disk is the important carrier of cloud storage data, is largely used in server system, the energy consumption of hard disk Object is paid close attention to as data center.
For mechanical hard disk due to the design of own mechanical properties, power consumption is generally higher, and more energy consumptions is needed to safeguard hard disk It runs at high speed.In order to guarantee the high-performance of hard disk, accordingly even when hard disk, in the case where no io reads and writes, hard disk still continues height Speed operating, this arrangement hard disk a large amount of for data center, prolonged power consumption is very big.
In cold data field of storage, hard disk not can all have always io read-write in fact, some data can be for a long time in cold Quiet state, thus under this use environment, what hard disk still persistently ran at high speed, the consumption of energy is larger.
Summary of the invention
For in cold data field of storage, hard disk not can all have always io read-write, some data can be for a long time in cold Quiet state, thus under this use environment, what hard disk still persistently ran at high speed, the larger problem of the consumption of energy.This hair It is bright to provide a kind of hard disk automatically into the method for power down mode, system, equipment and storage medium;
The technical scheme is that
A kind of hard disk includes the following steps: automatically into the method for power down mode
Obtain the current status information of hard disk;
According to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;If in setting Hard disk is constantly in idle state in time threshold;
Whether detection hard disk electricity-saving function is opened, if it is not, starting setting makes hard disk enter power and energy saving state, if so, from It is dynamic to enter power and energy saving state.
Further, whether it is in idle condition according to the hard disk of the acquisition current status information judgement hard disk, If hard disk is constantly in idle state in the time threshold of setting;Include:
According to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;
If so, starting timing module is counted;Counting starts to counting to reach in the given threshold time, and hard disk is located always In idle state;
Execute step: starting setting makes hard disk enter power and energy saving state.
Further, starting setting makes hard disk enter power and energy saving state, specifically includes:
EPC function is opened in setting;
Standby_z function is opened in setting, automatically into Standby_z battery saving mode.In cold data storage service, can lead to The setting of modification hard disk register is crossed, makes hard disk automatically into Standby_z suspend mode, realizes the energy-saving of hard disk, to drop The whole energy consumption of low server, while reducing the O&M cost of data center.
Further, this method further includes:
When gate time does not reach given threshold, the state that hard disk is in busy is got, is got at hard disk next time In idle state reclocking.
Second aspect, technical solution of the present invention provide a kind of hard disk automatically into the system of power down mode, comprising: hard disk shape State data obtaining module, judgment module, energy saving of hard disks function setup module and detection module;
Disk state data obtaining module, for obtaining the current status information of hard disk;
Whether judgment module, the status information judgement current for the hard disk according to the acquisition hard disk are in idle shape State;
Whether detection module, the power and energy saving function for detecting hard disk open;
Energy saving of hard disks function setup module, if in the time threshold of setting hard disk be constantly in idle state, examine When the power and energy saving function of survey module detection hard disk is not opened, starting setting makes hard disk enter power and energy saving state.
Further, which further includes counting module;
Counting module, if being in for judgment module according to the hard disk of the acquisition current status information judgement hard disk Idle state, starting timing module are counted.
Further, energy saving of hard disks function setup module includes:
Opening unit is arranged in EPC function, opens EPC function for being arranged;
Standby_z function is related to opening unit, Standby_z function is opened for being arranged, automatically into Standby_z Battery saving mode.By modifying the setting of hard disk register, to make hard disk automatically into Standby_z suspend mode, it can be achieved that hard The power and energy saving of disk.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including memory and processor, the processor and The memory completes mutual communication by bus;The memory, which is stored with, to be referred to by the program that the processor executes It enables, the processor calling described program instruction is able to carry out a kind of hard disk as described in relation to the first aspect automatically into power down mode Method.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, are stored thereon with calculating Machine program realizes that a kind of hard disk is automatically into power down mode as described in relation to the first aspect when the computer program is executed by processor Method.
The beneficial effects of the present invention are open hard disk Standby_z function by being arranged and modifying hard disk register value Can, it reads and writes hard disk under environment without io automatically into Standby_z suspend mode in setting time threshold value, realizes hard disk It is energy-saving, to reduce the whole energy consumption of server, while reducing the O&M cost of data center.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without creative efforts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the schematic flow chart of the method for one embodiment of the invention.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without making creative work, all should belong to protection of the present invention Range.
The Key Term occurred in the present invention is explained below.
Embodiment one
Mechanical hard disk is mainly made of motor, disk, magnetic head, and 12V power supply is mainly that motor high speed rotation and magnetic head are swung Demand, 5V power supply are mainly that hard disk PCB and magnetic head read and write demand.The present embodiment provides a kind of hard disks automatically into power down mode Method, mechanical hard disk default setting default Standby_z is to close, and hard disk can only enter under conditions of no io reads and writes Hard disk can be made automatically into Standby_ by modification hard disk register setting in cold data storage service to Idle_A state Z suspend mode realizes the energy-saving of hard disk, to reduce the whole energy consumption of server, while reduce the O&M of data center at This, includes the following steps:
S1: the current status information of hard disk is obtained;
In this step, hard disk IO read-write state is obtained;
S2: according to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;If setting Hard disk is constantly in idle state in fixed time threshold;
In this step, according to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;
If so, starting timing module is counted;Counting starts to counting to reach in the given threshold time, and hard disk is located always In idle state;Execute step S3;
On the other hand, when gate time does not reach given threshold, the state that hard disk is in busy is got, is obtained next time Reclocking is in idle condition to hard disk.
S3: whether detection hard disk electricity-saving function is opened, if it is not, starting setting makes hard disk enter power and energy saving state, if so, Automatically into power and energy saving state.
Starting setting hard disk, specifically includes:
EPC function is opened in setting;
In the present embodiment, the register address that hard disk EPC function is opened is 04h:
EPC Subcommand Description
0h Restore Power Condition Settings
1h Go To Power Condition
2h Set Power Condition Timer
3h Set Power Condition State
4h Enable the EPC feature
5h Disable the EPC feature
6h...Fh Reserved
Standby_z function is opened in setting, automatically into Standby_z battery saving mode.
The register address that hard disk Standby_z function is opened is 00h:
Power Condition ID Power Condition Name Description
00h standby_z Standby
01h standby_y Low RPM Idle
02h...80h Reserved
81h idle_a Active Idle
82h idle_b Low Power Idle
83h idle_c Low RPM Idle
84h...FEh Reserved
FFh All All supported EPC power conditions
Hard disk Standby_z function is carried out using sg3 Open-Source Tools to be arranged:
EPC function opening is carried out using such as issuing orders:
sg_raw A1 06 20 4A FF 04 00 00 A0 EF 00 00
Standby_z function opening is carried out using such as issuing orders:
sg_raw A1 06 20 4A 00 04 00 00 A0 EF 00 00
By ordering above, it can successfully be arranged and open hard disk Standby_z function, make hard disk in setting time threshold value Automatically into Standby_z battery saving mode when there is no a l0 read-write, system energy consumption is saved.
Embodiment two
Technical solution of the present invention provides a kind of hard disk automatically into the system of power down mode, comprising: disk state information obtains Modulus block, judgment module, energy saving of hard disks function setup module and detection module;
Disk state data obtaining module, for obtaining the current status information of hard disk;
Whether judgment module, the status information judgement current for the hard disk according to the acquisition hard disk are in idle shape State;
Whether detection module, the power and energy saving function for detecting hard disk open;
Energy saving of hard disks function setup module, if in the time threshold of setting hard disk be constantly in idle state, examine When the power and energy saving function of survey module detection hard disk is not opened, starting setting makes hard disk enter power and energy saving state.
The system further includes counting module;
Counting module, if being in for judgment module according to the hard disk of the acquisition current status information judgement hard disk Idle state, starting timing module are counted.
Energy saving of hard disks function setup module includes:
Opening unit is arranged in EPC function, opens EPC function for being arranged;
Standby_z function is related to opening unit, Standby_z function is opened for being arranged, automatically into Standby_z Battery saving mode.By modifying the setting of hard disk register, to make hard disk automatically into Standby_z suspend mode, it can be achieved that hard The power and energy saving of disk.
The entity structure schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention, the electronic equipment may include: place Manage device, communication interface, memory and bus, wherein processor, communication interface, memory complete mutual lead to by bus Letter.Bus can be used for the transmission of the information between electronic equipment and sensor.Processor can call the logic in memory to refer to It enables, to execute following method: obtaining the current status information of hard disk;According to the current status information judgement of the hard disk of acquisition Hard disk whether be in idle condition;If hard disk is constantly in idle state in the time threshold of setting;Starting setting makes hard Disk enters power and energy saving state, wherein EPC function is opened in setting;Standby_z function is opened in setting, automatically into Standby_z battery saving mode.
In addition, the logical order in above-mentioned memory can be realized and as independence by way of SFU software functional unit Product when selling or using, can store in a computer readable storage medium.Based on this understanding, of the invention Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words The form of product embodies, which is stored in a storage medium, including some instructions use so that One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment institute of the present invention State all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can be with Store the medium of program code.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage medium Matter stores computer instruction, which makes computer execute a kind of hard disk provided by above-described embodiment automatically into province The method of electricity condition, for example, obtain the current status information of hard disk;According to the current status information judgement of the hard disk of acquisition Whether the hard disk is in idle condition;If hard disk is constantly in idle state in the time threshold of setting;Starting setting Hard disk is set to enter power and energy saving state, wherein EPC function is opened in setting;Standby_z function is opened in setting, automatically into Standby_z battery saving mode.
Although by reference to attached drawing and combining the mode of preferred embodiment to the present invention have been described in detail, the present invention It is not limited to this.Without departing from the spirit and substance of the premise in the present invention, those of ordinary skill in the art can be to the present invention Embodiment carry out various equivalent modifications or substitutions, and these modifications or substitutions all should in covering scope of the invention/appoint What those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, answer It is included within the scope of the present invention.Therefore, protection scope of the present invention is answered described is with scope of protection of the claims It is quasi-.

Claims (10)

1. a kind of hard disk is automatically into the method for power down mode, it is characterised in that include the following steps:
Obtain the current status information of hard disk;
According to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;If in the time of setting Hard disk is constantly in idle state in threshold value;
Whether detection hard disk electricity-saving function is opened, if it is not, starting setting makes hard disk enter power and energy saving state.
2. hard disk according to claim 1 is automatically into the method for power down mode, which is characterized in that according to the hard disk of acquisition Whether the current status information judgement hard disk is in idle condition, if hard disk is constantly in the time threshold of setting Idle state;Include:
According to the current status information judgement of the hard disk of acquisition, whether the hard disk is in idle condition;
If so, starting timing module is counted;Counting starts to counting to reach in the given threshold time, and hard disk is constantly in sky Not busy state;
Execute step: starting setting makes hard disk enter power and energy saving state.
3. hard disk according to claim 2 is automatically into the method for power down mode, which is characterized in that starting setting makes hard disk Into power and energy saving state, specifically include:
EPC function is opened in setting;
Standby_z function is opened in setting, automatically into Standby_z battery saving mode.
4. hard disk according to claim 3 is automatically into the method for power down mode, which is characterized in that detection hard disk saves electric work Whether can open, if it is not, starting setting makes hard disk enter power and energy saving state, further includes:
Detection hard disk electricity-saving function has been switched on, automatically into Standby_z battery saving mode.
5. hard disk according to claim 4 is automatically into the method for power down mode, which is characterized in that this method further include:
When gate time does not reach given threshold, the state that hard disk is in busy is got, hard disk is got next time and is in sky Not busy state reclocking.
6. a kind of hard disk is automatically into the system of power down mode, it is characterised in that including disk state data obtaining module, judgement Module, energy saving of hard disks function setup module and detection module;
Disk state data obtaining module, for obtaining the current status information of hard disk;
Whether judgment module, the status information judgement current for the hard disk according to the acquisition hard disk are in idle condition;
Energy saving of hard disks function setup module, if in the time threshold of setting hard disk be constantly in idle state, starting is set Setting makes hard disk enter power and energy saving state.
7. hard disk according to claim 6 is automatically into the system of power down mode, which is characterized in that the system further includes meter Digital-to-analogue block;
Counting module, if being in the free time according to the hard disk of the acquisition current status information judgement hard disk for judgment module State, starting timing module are counted.
8. hard disk according to claim 7 is automatically into the system of power down mode, which is characterized in that energy saving of hard disks function is set Setting module includes:
Opening unit is arranged in EPC function, opens EPC function for being arranged;
Standby_z function is related to opening unit, Standby_z function is opened for being arranged, automatically into Standby_z power saving Mode.
9. a kind of electronic equipment, which is characterized in that including memory and processor, the processor and the memory pass through always Line completes mutual communication;The memory is stored with the program instruction that can be executed by the processor, the processor tune The method such as hard disk described in any one of claim 1 to 5 automatically into power down mode is able to carry out with described program instruction.
10. a kind of non-transient computer readable storage medium, computer journey is stored in non-transient computer readable storage medium Sequence, which is characterized in that realize that the hard disk as described in any one of claim 1 to 5 is automatic when the computer program is executed by processor Into the method for power down mode.
CN201910146737.7A 2019-02-27 2019-02-27 Hard disk is automatically into the method for power down mode, system, equipment and storage medium Pending CN109901694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910146737.7A CN109901694A (en) 2019-02-27 2019-02-27 Hard disk is automatically into the method for power down mode, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910146737.7A CN109901694A (en) 2019-02-27 2019-02-27 Hard disk is automatically into the method for power down mode, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109901694A true CN109901694A (en) 2019-06-18

Family

ID=66945680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910146737.7A Pending CN109901694A (en) 2019-02-27 2019-02-27 Hard disk is automatically into the method for power down mode, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109901694A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716633A (en) * 2019-09-30 2020-01-21 深圳忆联信息系统有限公司 Device and method for coordinately managing SSD power consumption, computer device and storage medium
CN111813455A (en) * 2020-07-08 2020-10-23 深圳忆联信息系统有限公司 Low-power-consumption realization method and device of solid state disk, computer equipment and storage medium
CN112198949A (en) * 2020-09-27 2021-01-08 浙江大华技术股份有限公司 Hard disk management method and device, electronic equipment and storage medium
CN112988083A (en) * 2021-05-19 2021-06-18 四川省商投信息技术有限责任公司 Cold data storage method and system
US11417403B2 (en) 2020-02-18 2022-08-16 Winbond Electronics Corp. Semiconductor device
US11496118B2 (en) 2020-02-18 2022-11-08 Winbond Electronics Corp. Semiconductor device
TWI790077B (en) * 2022-01-03 2023-01-11 財團法人工業技術研究院 Method for adjusting sleep time based on sensing data and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053697A (en) * 2009-11-06 2011-05-11 联想(北京)有限公司 Hard disk control method, device and computer
CN102736725A (en) * 2012-05-18 2012-10-17 华为技术有限公司 Energy-saving hard disk control method and device and central processing unit
CN102857568A (en) * 2012-09-12 2013-01-02 福建星网视易信息系统有限公司 Energy saving method for network storage equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053697A (en) * 2009-11-06 2011-05-11 联想(北京)有限公司 Hard disk control method, device and computer
CN102736725A (en) * 2012-05-18 2012-10-17 华为技术有限公司 Energy-saving hard disk control method and device and central processing unit
CN102857568A (en) * 2012-09-12 2013-01-02 福建星网视易信息系统有限公司 Energy saving method for network storage equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716633A (en) * 2019-09-30 2020-01-21 深圳忆联信息系统有限公司 Device and method for coordinately managing SSD power consumption, computer device and storage medium
US11417403B2 (en) 2020-02-18 2022-08-16 Winbond Electronics Corp. Semiconductor device
US11496118B2 (en) 2020-02-18 2022-11-08 Winbond Electronics Corp. Semiconductor device
CN111813455A (en) * 2020-07-08 2020-10-23 深圳忆联信息系统有限公司 Low-power-consumption realization method and device of solid state disk, computer equipment and storage medium
CN112198949A (en) * 2020-09-27 2021-01-08 浙江大华技术股份有限公司 Hard disk management method and device, electronic equipment and storage medium
CN112988083A (en) * 2021-05-19 2021-06-18 四川省商投信息技术有限责任公司 Cold data storage method and system
CN112988083B (en) * 2021-05-19 2021-08-03 四川省商投信息技术有限责任公司 Cold data storage method and system
TWI790077B (en) * 2022-01-03 2023-01-11 財團法人工業技術研究院 Method for adjusting sleep time based on sensing data and electronic device
US11846540B2 (en) 2022-01-03 2023-12-19 Industrial Technology Research Institute Method for adjusting sleep time based on sensing data and electronic device

Similar Documents

Publication Publication Date Title
CN109901694A (en) Hard disk is automatically into the method for power down mode, system, equipment and storage medium
CN107168647B (en) FLASH data read-write method and system
CN106095363A (en) Ameliorative way, device and the terminal that a kind of terminal card pauses
US8195971B2 (en) Solid state disk and method of managing power supply thereof and terminal including the same
CN108491058A (en) A kind of the powered-off fault data guard method and device of Nonvolatile memory
US20100312944A1 (en) Control of page access in memory
CN110488673B (en) Data processing module and data processing method in low power consumption mode
CN104239139A (en) Method, device and terminal for processing boot-strap self-starting project
CN102308274B (en) Method, network card and hard disk card of accessing power-off hard disk
CN103809917A (en) Method of scheduling tasks for memories and memory system thereof
CN102880556A (en) Wear leveling method and system of Nand Flash
CN103336736B (en) System log acquisition method and device
CN103683384A (en) Host apparatus and charging method thereof
CN101196819B (en) Method for chip self-adapting start equipment of system on chip
CN107168798A (en) A kind of device sleeps method and device, device sleeps awakening method and device
CN109976673A (en) A kind of method for writing data and device
CN105608013B (en) A kind of the storage card control chip and storage card of integrated MRAM
US20120206981A1 (en) Method and device for writing data
CN102736928B (en) Fast wake-up computer system method and computer system
CN104461977B (en) memory card access device, control method thereof and memory card access system
CN109283995A (en) A kind of method and system reducing internet-of-things terminal Subscriber Identity Module power consumption
CN108008908B (en) Method and device for controlling data on SD card
CN105205015A (en) Data storage method and storage equipment
CN102402464A (en) Method for erasing data of storage in smart card and smart card
CN1988039A (en) Flash storage scattered writing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190618