CN111007937A - A server power consumption control method, device and related components - Google Patents
A server power consumption control method, device and related components Download PDFInfo
- Publication number
- CN111007937A CN111007937A CN201911208753.0A CN201911208753A CN111007937A CN 111007937 A CN111007937 A CN 111007937A CN 201911208753 A CN201911208753 A CN 201911208753A CN 111007937 A CN111007937 A CN 111007937A
- Authority
- CN
- China
- Prior art keywords
- server
- power consumption
- adjustment operation
- parameter
- configuration adjustment
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
- G06F1/3215—Monitoring of peripheral devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3206—Monitoring of events, devices or parameters that trigger a change in power modality
- G06F1/3215—Monitoring of peripheral devices
- G06F1/3225—Monitoring of peripheral devices of memory devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
The application discloses a server power consumption control method, which comprises the following steps: monitoring server parameters through a user mode thread; judging whether target server parameters meeting the switching conditions exist or not; if so, calling a driving interface to execute configuration adjustment operation on hardware corresponding to the server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjustment operation comprises loading or unloading. According to the method and the device, the server parameters are monitored through the user mode threads, the change of the server parameters can be obtained in time, and when the server parameters meet the switching conditions, the configuration of corresponding hardware is loaded or unloaded, so that the power consumption of the server is reduced, and the purpose of energy conservation is achieved. The application also discloses a server power consumption control device and electronic equipment, and the server power consumption control device and the electronic equipment have the same beneficial effects as the server power consumption control method.
Description
Technical Field
The present application relates to the field of servers, and in particular, to a method and an apparatus for controlling power consumption of a server, and related components.
Background
With the advent of the society information explosion era, the data volume is increasing day by day, the development of the storage server is also faster and faster, and the energy consumption of the storage server is increased due to the improvement of the configuration performance of the storage server. Under the trend that energy conservation and emission reduction are more and more intense, the function and stability of the storage server are controlled so as to achieve the purpose of energy conservation and emission reduction, but no scheme capable of controlling the power consumption of the server exists in the prior art.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a server power consumption control method, a server power consumption control device and electronic equipment, which can reduce the power consumption of a server and achieve the aim of energy conservation.
In order to solve the above technical problem, the present application provides a server power consumption control method, including:
monitoring server parameters through a user mode thread;
judging whether target server parameters meeting the switching conditions exist or not;
if so, calling a driving interface to execute configuration adjustment operation on the hardware corresponding to the target server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjustment operation comprises loading or unloading.
Preferably, the server parameters include:
CPU usage and/or memory usage and/or disk usage.
Preferably, the switching condition includes:
and the times that the server parameters are not in the corresponding preset range reach the preset times.
Preferably, when the target server parameter is the CPU utilization, the process of executing the configuration adjustment operation on the hardware corresponding to the target server parameter by the call driving interface is as follows:
and calling a virsh interface to load or unload the core number of the CPU.
Preferably, when the target server parameter is the disk usage rate, the process of invoking the driver interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter includes:
and calling the corresponding drive interface to operate the first hardware register so as to load or unload the corresponding disk.
Preferably, when the target server parameter is the memory usage rate, the process of invoking the driver interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter includes:
and calling the corresponding driving interface to operate the second hardware register so as to load or unload the corresponding memory bank.
Preferably, the server parameter further includes a chassis temperature of the server;
correspondingly, the process of executing the configuration adjustment operation on the hardware corresponding to the target server parameter by the calling driving interface specifically includes:
and calling the corresponding driving interface to adjust the rotating speed of the fan.
Preferably, the configuration adjustment operation further includes:
generating alarm information and/or generating a syslog.
In order to solve the above technical problem, the present application further provides a server power consumption control apparatus, including:
the monitoring module is used for monitoring server parameters through the user mode thread;
the judging module is used for judging whether target server parameters meeting the switching conditions exist or not, and if so, the adjusting module is triggered;
the adjusting module is used for calling a driving interface to execute configuration adjusting operation on hardware corresponding to the target server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjusting operation comprises loading or unloading.
In order to solve the above technical problem, the present application further provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the server power consumption control method as claimed in any one of the above when executing the computer program.
The application provides a server power consumption control method, server parameters are monitored through a user mode thread, changes of the server parameters can be obtained in time, and when the server parameters meet switching conditions, configuration of corresponding hardware is loaded or unloaded, so that the server power consumption is reduced, and the purpose of energy conservation is achieved. The application also provides a server power consumption control device and electronic equipment, and the server power consumption control device and the electronic equipment have the same beneficial effects as the server power consumption control method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the prior art and the embodiments are briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating steps of a server power consumption control method according to the present application;
fig. 2 is a schematic structural diagram of a server power consumption control apparatus provided in the present application;
fig. 3 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The core of the application is to provide a server power consumption control method, a server power consumption control device and electronic equipment, which can reduce the power consumption of the server and achieve the purpose of energy conservation.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the advent of the society information explosion era, the data volume is increasing day by day, the development of the storage server is also faster and faster, and the energy consumption of the storage server is increased due to the improvement of the configuration performance of the storage server. Under the trend that energy conservation and emission reduction are more and more intense, the function and stability of the storage server are controlled so as to achieve the purpose of energy conservation and emission reduction, but no scheme capable of controlling the power consumption of the server exists in the prior art. Based on various problems of the related art, the server power consumption control method provided by the following embodiments of the present application can achieve the purposes of reducing the server power consumption, saving energy and reducing emission.
The following describes a server power consumption control method provided by the present application in detail.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a server power consumption control method according to the present application, including:
s101: monitoring server parameters through a user mode thread;
specifically, the server parameters may include, but are not limited to, a CPU utilization rate, a memory utilization rate, a disk utilization rate, a chassis temperature, and the like, and a user mode thread corresponding to the server parameters is added in a user mode to monitor the server parameters, which may be respectively recorded as a temperature monitoring thread, a CPU utilization rate monitoring thread, a memory utilization rate monitoring thread, and a disk utilization rate monitoring thread. Further, the user mode threads may periodically obtain respective corresponding server parameters according to a preset period, so as to ensure that changes of the server parameters are obtained in time.
S102: judging whether target server parameters meeting the switching conditions exist or not, and if so, executing S103;
s103: and calling the driving interface to execute configuration adjustment operation on hardware corresponding to the target server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjustment operation comprises loading or unloading.
Specifically, when the server parameter is the CPU utilization rate, if the CPU utilization rate is not within the corresponding preset range for three times, it is determined that the CPU utilization rate is the target server parameter, and the operation of turning on the CPU core count and turning off the CPU core count is performed by calling the virsh interface, so as to implement dynamic adjustment of the CPU power, and when the CPU utilization rate exceeds a set abnormal threshold, a log alarm is performed, that is, alarm information is generated and/or a syslog is generated;
when the server parameter is the memory utilization rate, if the memory utilization rate is not in the corresponding preset range for three times, the memory utilization rate is judged to be the target server parameter, if the memory utilization rate is too low, the corresponding drive interface is called to operate the hardware register so as to unload redundant memory banks, if the memory utilization rate is too high, the corresponding drive interface is called to operate the hardware register so as to load the memory banks, and when the memory utilization rate exceeds the set abnormal threshold value, log alarm is carried out, namely alarm information is generated and/or syslog is generated;
when the server parameter is the utilization rate of a disk, firstly setting a time period according to a service access rule, operating a hardware register by calling a corresponding drive interface in the time period, powering off the disk, recovering the power on of the disk after the time period passes, and performing log alarm when the utilization rate of the disk exceeds a set abnormal threshold value, namely generating alarm information and/or generating a syslog;
further, when the server parameter is the case temperature, if the case temperature exceeds the corresponding preset range for three times, generating alarm information and/or generating a syslog, and calling an operation interface of the FAN through driving to realize setting and adjusting of the FAN rotation speed, canceling the alarm and sending the alarm cancellation log when the case temperature is restored and detected for three times and the restoration condition is met, and restoring the FAN rotation speed.
It can be understood that preset ranges of the temperature, the CPU utilization, the Memory utilization, and the disk utilization are set and then stored in a Non-Volatile Memory (NVM), so that recovery can be configured after the device is restarted, a corresponding preset range is read, and processing can be performed according to the preset range in subsequent processing.
In summary, in this embodiment, the preset range is configured in advance to meet the monitoring requirement of the user, the user mode thread performs monitoring to achieve the switching condition, the driving interface is called to perform configuration adjustment operation, the implementation is simple, the hardware configuration is intelligently coordinated to achieve the energy saving effect, and the high energy consumption of the server is reduced.
The application provides a server power consumption control method, which comprises the following steps: monitoring server parameters through a user mode thread; judging whether target server parameters meeting the switching conditions exist or not; if so, calling a driving interface to execute configuration adjustment operation on hardware corresponding to the server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjustment operation comprises loading or unloading.
In practical application, by adopting the scheme of the application, the server parameters are monitored through the user mode threads, the change of the server parameters can be obtained in real time, and when the server parameters meet the switching conditions, the configuration of corresponding hardware is loaded or unloaded, so that the power consumption of the server is reduced, and the aim of saving energy is fulfilled.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a server power consumption control apparatus provided in the present application, including:
the monitoring module 1 is used for monitoring server parameters through a user mode thread;
the judging module 2 is used for judging whether target server parameters meeting the switching conditions exist or not, and if so, the adjusting module 3 is triggered;
and the adjusting module 3 is used for calling the driving interface to execute configuration adjusting operation on hardware corresponding to the target server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjusting operation comprises loading or unloading.
Therefore, in the embodiment, the server parameters are monitored through the user mode threads, the change of the server parameters can be obtained in time, and when the server parameters meet the switching condition, the configuration of corresponding hardware is loaded or unloaded, so that the power consumption of the server is reduced, and the purpose of saving energy is achieved.
As a preferred embodiment, the server parameters include:
CPU usage and/or memory usage and/or disk usage.
As a preferred embodiment, the switching condition includes:
and the times that the server parameters are not in the corresponding preset range reach the preset times.
As a preferred embodiment, when the target server parameter is the CPU utilization, the process of calling the driver interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter is as follows:
and calling a virsh interface to load or unload the core number of the CPU.
As a preferred embodiment, when the target server parameter is a disk usage rate, the process of calling the driver interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter includes:
and calling the corresponding drive interface to operate the first hardware register so as to load or unload the corresponding disk.
As a preferred embodiment, when the target server parameter is the memory usage rate, the process of calling the driver interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter includes:
and calling the corresponding driving interface to operate the second hardware register so as to load or unload the corresponding memory bank.
As a preferred embodiment, the server parameter further includes a case temperature of the server;
correspondingly, the process of calling the driving interface to execute the configuration adjustment operation on the hardware corresponding to the target server parameter specifically includes:
and calling the corresponding driving interface to adjust the rotating speed of the fan.
As a preferred embodiment, the configuration adjustment operation further includes:
generating alarm information and/or generating a syslog.
On the other hand, the present application also provides an electronic device, as shown in fig. 3, which shows a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 2100 according to the embodiment may include: a processor 2101 and a memory 2102.
Optionally, the electronic device may further comprise a communication interface 2103, an input unit 2104 and a display 2105 and a communication bus 2106.
The processor 2101, the memory 2102, the communication interface 2103, the input unit 2104, the display 2105, and the like communicate with each other via the communication bus 2106.
In the embodiment of the present application, the processor 2101 may be a Central Processing Unit (CPU), an application specific integrated circuit (asic), a digital signal processor, an off-the-shelf programmable gate array (fpga) or other programmable logic device.
The processor may call a program stored in the memory 2102. Specifically, the processor may perform operations performed on the electronic device side in the embodiments of the server power consumption control method described below.
The memory 2102 stores one or more programs, which may include program code including computer operating instructions, and in this embodiment, at least one program for implementing the following functions is stored in the memory:
monitoring server parameters through a user mode thread;
judging whether target server parameters meeting the switching conditions exist or not;
if so, calling a driving interface to execute configuration adjustment operation on hardware corresponding to the target server parameter so as to enable the power consumption of the server to meet a preset value, wherein the configuration adjustment operation comprises loading or unloading.
Therefore, in the embodiment, the server parameters are monitored through the user mode threads, the change of the server parameters can be obtained in time, and when the server parameters meet the switching condition, the configuration of corresponding hardware is loaded or unloaded, so that the power consumption of the server is reduced, and the purpose of saving energy is achieved.
In one possible implementation, the memory 2102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a loading function, etc.), and the like; the storage data area may store data created according to the use of the computer.
Further, the memory 2102 may include high speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid state storage device.
The communication interface 2103 may be an interface of a communication module, such as an interface of a GSM module.
The present application may also include a display 2104 and an input unit 2105, among others.
Of course, the structure of the internet of things device shown in fig. 3 does not constitute a limitation on the internet of things device in the embodiment of the present application, and in practical applications, the electronic device may include more or less components than those shown in fig. 3, or some components in combination.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911208753.0A CN111007937A (en) | 2019-11-30 | 2019-11-30 | A server power consumption control method, device and related components |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911208753.0A CN111007937A (en) | 2019-11-30 | 2019-11-30 | A server power consumption control method, device and related components |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111007937A true CN111007937A (en) | 2020-04-14 |
Family
ID=70113482
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911208753.0A Withdrawn CN111007937A (en) | 2019-11-30 | 2019-11-30 | A server power consumption control method, device and related components |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111007937A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111929495A (en) * | 2020-09-17 | 2020-11-13 | 天津飞腾信息技术有限公司 | Memory power consumption testing device, system and application method thereof |
| CN112817746A (en) * | 2021-01-15 | 2021-05-18 | 浪潮电子信息产业股份有限公司 | CPU power adjusting method, device, equipment and readable storage medium |
| CN113625861A (en) * | 2021-08-27 | 2021-11-09 | 深圳供电局有限公司 | Method and system for saving power consumption |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090055665A1 (en) * | 2007-08-22 | 2009-02-26 | International Business Machines Corporation | Power Control of Servers Using Advanced Configuration and Power Interface (ACPI) States |
| CN104009883A (en) * | 2014-05-09 | 2014-08-27 | 烽火通信科技股份有限公司 | Computer resource centralized remote real-time monitoring system and method |
| CN105676996A (en) * | 2015-12-31 | 2016-06-15 | 曙光信息产业(北京)有限公司 | Loongson server power consumption control method and device |
| CN108983922A (en) * | 2018-06-27 | 2018-12-11 | 紫光华山信息技术有限公司 | Working frequency adjusting method, device and server |
-
2019
- 2019-11-30 CN CN201911208753.0A patent/CN111007937A/en not_active Withdrawn
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090055665A1 (en) * | 2007-08-22 | 2009-02-26 | International Business Machines Corporation | Power Control of Servers Using Advanced Configuration and Power Interface (ACPI) States |
| CN104009883A (en) * | 2014-05-09 | 2014-08-27 | 烽火通信科技股份有限公司 | Computer resource centralized remote real-time monitoring system and method |
| CN105676996A (en) * | 2015-12-31 | 2016-06-15 | 曙光信息产业(北京)有限公司 | Loongson server power consumption control method and device |
| CN108983922A (en) * | 2018-06-27 | 2018-12-11 | 紫光华山信息技术有限公司 | Working frequency adjusting method, device and server |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111929495A (en) * | 2020-09-17 | 2020-11-13 | 天津飞腾信息技术有限公司 | Memory power consumption testing device, system and application method thereof |
| CN112817746A (en) * | 2021-01-15 | 2021-05-18 | 浪潮电子信息产业股份有限公司 | CPU power adjusting method, device, equipment and readable storage medium |
| CN112817746B (en) * | 2021-01-15 | 2023-01-10 | 浪潮电子信息产业股份有限公司 | CPU power adjusting method, device, equipment and readable storage medium |
| CN113625861A (en) * | 2021-08-27 | 2021-11-09 | 深圳供电局有限公司 | Method and system for saving power consumption |
| CN113625861B (en) * | 2021-08-27 | 2024-04-19 | 深圳供电局有限公司 | Power consumption saving method and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7412565B2 (en) | Memory optimization for a computer system having a hibernation mode | |
| US9489029B2 (en) | Operating system independent network event handling | |
| CN111007937A (en) | A server power consumption control method, device and related components | |
| US7383450B2 (en) | Low power firmware | |
| JP2007511808A (en) | Adjustment of computer system power policy in response to positive instructions from users | |
| WO2024113563A1 (en) | Correctable error processing method and apparatus, device, and readable storage medium | |
| US20190146699A1 (en) | Dynamic configuration of compressed virtual memory | |
| CN107491373A (en) | A kind of task stack overflow monitoring method and system | |
| JP2017097633A (en) | Vehicle controller | |
| US20220050926A1 (en) | Protection against unintended content change in dram during standby mode | |
| US10628168B2 (en) | Management with respect to a basic input/output system policy | |
| TWI546661B (en) | Resuming a system using state information | |
| US11809299B2 (en) | Predicting storage array capacity | |
| US12483568B2 (en) | Policy management for data processing systems using a management controller | |
| US7716504B2 (en) | System for retaining power management settings across sleep states | |
| CN113468617A (en) | Method, equipment and storage medium for power failure protection of equipment | |
| US10776214B1 (en) | System protecting data stored on NVDIMM devices after BIOS update | |
| CN118170731A (en) | File management method and device based on server, server and program product | |
| CN117033084A (en) | Virtual machine backup method and device, electronic equipment and storage medium | |
| JP6386575B2 (en) | controller | |
| CN107357676A (en) | Restart method, apparatus, computer-readable recording medium and the storage control of cabinet management system | |
| JP6991404B2 (en) | Multitasking device and multitasking method | |
| US10866826B2 (en) | State-based system management migration | |
| TWI501588B (en) | Accessing a local storage device using an auxiliary processor | |
| CN106502813A (en) | A kind of server hard disc monitoring method and device |
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 | ||
| WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200414 |
|
| WW01 | Invention patent application withdrawn after publication |