Switching method for working modes of power supply unit and computing equipment
By switching the operating mode and firmware of the power supply unit in the server, the problem of low power conversion efficiency under low load is solved, and the energy efficiency of the server is improved.
Patent Information
- Application Number
- CN202510786803.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-26
AI Technical Summary
When the server load rate is lower than 20%, the PSU's power conversion efficiency is not high, resulting in low server energy efficiency.
By switching the operating mode of the power supply unit, using the baseboard management controller and basic input and output system to set the power supply unit to energy-saving mode or high-performance mode, and switching the firmware when the system power consumption changes, it is ensured that the firmware of the power supply unit maintains efficient energy conversion in different modes.
Improves the energy efficiency of the server by switching the working mode and firmware of the power supply unit under different load conditions to ensure a high level of power conversion efficiency.
Smart Images

Figure CN120704496A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servers, and in particular to a method for switching the working mode of a power supply unit in a server and a computing device. Background Art
[0002] In the server field, PSU (Power Supply Unit) is the power supply component in the server, responsible for converting standard AC power into low-voltage stable DC power for use by other components in the server.
[0003] In most user scenarios, the server workload is light, and the PSU load factor is usually below 20%. If the load factor is within this range, the PSU's power conversion efficiency will be low, resulting in low server energy efficiency. Summary of the Invention
[0004] An embodiment of the present application provides a method for switching the working mode of a power supply unit and a computing device. By switching the working mode of the working firmware in the power supply unit, the power supply unit can ensure that its conversion efficiency of electric energy is at a high level, thereby improving the energy efficiency of the server.
[0005] In a first aspect, an embodiment of the present application provides a method for switching an operating mode of a power supply unit, comprising:
[0006] A method for switching an operating mode of a power supply unit, wherein the power supply unit is provided in a server, wherein the method comprises:
[0007] In response to a user setting of the operating mode of the power supply unit, setting the operating mode of the power supply unit to an energy-saving mode;
[0008] Obtaining system power consumption of the server;
[0009] When the system power consumption is less than the target power consumption, updating the firmware of the power supply unit to a first firmware, wherein the working mode corresponding to the first firmware is an energy-saving mode, and the target power consumption is the power consumption of one power supply unit;
[0010] When the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to a second firmware, and the working mode corresponding to the second firmware is a high-performance mode.
[0011] Because the power supply unit's power conversion efficiency varies when the firmware operates in different modes, for example, at different power levels, firmware in different operating modes results in different power conversion efficiencies. Therefore, by switching the power supply unit's operating mode, the power supply unit's power conversion efficiency can be maintained at a high level, thereby improving the server's energy efficiency.
[0012] In an optional implementation manner, setting the operating mode of the power supply unit to an energy-saving mode includes:
[0013] Setting the operating mode of the power supply unit to an energy-saving mode through a baseboard management controller;
[0014] or
[0015] The working mode of the power supply unit is set to energy-saving mode through the basic input and output system.
[0016] By setting the working mode of the power supply unit to the energy-saving mode through the baseboard management controller and the basic input and output system, the setting method of the working mode of the power supply unit can be enriched to meet the service needs of users.
[0017] In an optional implementation, updating the firmware of the power supply unit to the second firmware includes:
[0018] Determining the candidate firmware that matches the power supply unit from among a plurality of candidate firmwares stored in the baseboard management controller as the second firmware; the candidate firmwares include first firmware and second firmware corresponding to different types of power supply units;
[0019] or,
[0020] The target firmware uploaded by the user through the management interface of the baseboard management controller is obtained, and the target firmware is determined as the second firmware of the power supply unit.
[0021] In the above implementation, by using a built-in firmware upgrade package in the BMC or obtaining the firmware upgrade package through the BMC interface, multiple firmware determination methods can be provided, thereby meeting different needs of users and having a wider range of applications.
[0022] In an optional embodiment, setting the working mode of the power supply unit to the energy-saving mode through the basic input and output system includes:
[0023] When the server is in standby mode, the baseboard management controller sends an energy-saving mode command to the power supply unit, wherein the energy-saving mode command is used to update the firmware of the power supply unit to the first firmware.
[0024] In the above embodiment, the technical solution of implementing working firmware switching by sending an energy-saving mode command to the power supply unit can shorten the communication time between the power supply unit and the BMC, thereby improving the firmware switching efficiency.
[0025] In an optional embodiment, the power supply unit includes a microcontroller unit, the first firmware and the second firmware are stored in the microcontroller unit, and the baseboard management controller sends an energy-saving mode command to the power supply unit, including:
[0026] The identifier corresponding to the firmware in the register of the microcontroller is modified to a first identifier, so as to update the firmware of the power supply unit to a second firmware; wherein the first identifier is the identifier corresponding to the second firmware.
[0027] In the above implementation, by modifying the flag in the register, the execution efficiency of the energy-saving mode command can be improved and the execution speed of the energy-saving mode command can be accelerated.
[0028] In an optional implementation, after the firmware of the power supply unit is updated to the first firmware, the method further includes:
[0029] If the system power consumption of the server is greater than the power consumption of a power supply unit within a preset time period, updating the firmware of the power supply unit to the second firmware;
[0030] or,
[0031] When the operating mode of the power supply unit in the server is set to a high-performance mode through a baseboard management controller or a basic input / output system, the firmware of the power supply unit is updated to the second firmware.
[0032] In the above implementation, flexible switching between firmware can be achieved, ensuring that the power supply unit has a high efficiency in converting electric energy, thereby improving the energy efficiency of the server.
[0033] In an optional embodiment, when the operating mode of the power supply unit in the server is set to a high-performance mode through the basic input and output system, updating the firmware of the power supply unit to the second firmware includes:
[0034] When the server is in standby mode, the firmware of the power supply unit is updated to a second firmware, so that the power supply unit operates in the high-performance mode.
[0035] In the above implementation, the method of setting the working mode of the power supply unit according to the BIOS and updating the firmware when the server is in standby mode can enrich the update channels of the firmware in the power supply unit and meet the needs of users.
[0036] In an optional implementation, when the server is in standby mode, updating the firmware of the power supply unit to the second firmware includes:
[0037] When the server is in standby mode, the baseboard management controller sends a high-performance mode command to the power supply unit, wherein the high-performance mode command is used to update the firmware of the power supply unit to a second firmware.
[0038] In the above embodiment, the technical solution of implementing working firmware switching by sending a high-performance mode command to the power supply unit can shorten the communication time between the power supply unit and the BMC, thereby improving the firmware switching efficiency.
[0039] In an optional embodiment, the server includes multiple power supply units, and updating the firmware of the power supply units to the first firmware includes:
[0040] The firmware of each of the power supply units is updated to the first firmware in sequence.
[0041] In the above implementation, it is possible to ensure that each power supply unit enters the energy-saving mode, thereby ensuring stable operation of the power supply unit and the server.
[0042] In a second aspect, an embodiment of the present application further provides a computing device comprising: a power supply unit and a baseboard management controller; the power supply unit and the baseboard management controller are electrically connected, the baseboard management controller comprises a memory, a processor and a computer program stored in the memory and runnable on the processor, and is characterized in that when the processor executes the program, a method for switching the working mode of the power supply unit in the computing device as described in any one of the first aspects is implemented.
[0043] The present application provides a method and server for switching the operating mode of a power supply unit. In an embodiment of the present application, in response to a user setting the operating mode of the power supply unit, the operating mode of the power supply unit is set to energy-saving mode; the system power consumption of the server is obtained; if the system power consumption is less than a target power consumption, the firmware of the power supply unit is updated to a first firmware, wherein the operating mode corresponding to the first firmware is energy-saving mode and the target power consumption is the power consumption of one power supply unit; if it is determined that the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to a second firmware, wherein the operating mode corresponding to the second firmware is high-performance mode.
[0044] Because the power supply unit's power conversion efficiency varies when the firmware operates in different modes, for example, at different power levels, firmware in different operating modes results in different power conversion efficiencies. Therefore, by switching the operating mode of the power supply unit's firmware, the power supply unit's power conversion efficiency can be maintained at a high level, thereby improving the server's energy efficiency.
[0045] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.
[0047] Figure 1 A flow chart showing a method for switching the working mode of a power supply unit in a server provided by an embodiment of the present application is shown;
[0048] Figure 2 A curve showing the relationship between the power and conversion efficiency of a power supply unit in an energy-saving mode and a high-performance mode provided by an embodiment of the present application;
[0049] Figure 3 A schematic diagram showing a method for setting the firmware of the first power supply unit provided in an embodiment of the present application is shown;
[0050] Figure 4 A schematic diagram showing a method for setting the firmware of the second power supply unit provided in an embodiment of the present application is shown;
[0051] Figure 5 A schematic diagram showing a method for setting the firmware of a third power supply unit provided in an embodiment of the present application is shown;
[0052] FIG6( a ) shows a flow chart of entering an energy-saving mode based on a BMC according to an embodiment of the present application;
[0053] FIG6( b ) shows a flowchart of a first BMC-based exit from energy-saving mode provided in an embodiment of the present application;
[0054] FIG6( c ) shows a flowchart of a second BMC-based exit from energy-saving mode provided in an embodiment of the present application;
[0055] FIG7( a ) shows a flowchart of a first method of entering a power-saving mode based on BIOS provided in an embodiment of the present application;
[0056] FIG7( b ) shows a flow chart of a second method of entering a power-saving mode based on BIOS provided in an embodiment of the present application;
[0057] FIG7( c ) shows a flowchart of a first method of exiting the energy-saving mode based on BIOS provided in an embodiment of the present application;
[0058] FIG7( d ) shows a flowchart of a second method of exiting the energy-saving mode based on BIOS provided in an embodiment of the present application;
[0059] Figure 8 A schematic diagram showing a device for switching the working mode of a power supply unit in a server provided by an embodiment of the present application is shown;
[0060] Figure 9 A schematic diagram of the link structure between the CPU, power supply unit and baseboard management control in a server provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0061] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0062] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not require further definition or explanation in subsequent drawings.
[0063] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0064] Before going into detail, the terms used in the embodiments of the present application are explained as follows:
[0065] PSU definition: In the field of computer hardware, PSU is the power supply component in computing equipment. Its function is to obtain electrical energy from the input power supply, then convert it into direct current suitable for computer use and distribute it to various components in the computer.
[0066] Intelligent Baseboard Management Controller (BMC): A dedicated controller used to monitor and manage servers. It is a core component of the service management system defined by the IPMI (Intelligent Platform Management Interface) protocol and is integrated into servers, network devices, and other computer systems. The BMC's primary functions include monitoring device hardware status, performing remote management operations, and providing device monitoring and control capabilities.
[0067] The Basic Input / Output System (BIOS) is a firmware interface used to initialize hardware, perform self-tests, and boot the operating system during computer startup. The BIOS is a program stored in a ROM (Read-Only Memory) chip on the motherboard and is responsible for basic input and output operations during computer startup.
[0068] Firmware: It is a software embedded in a hardware device (for example, a server), located between the hardware and the application, responsible for controlling the basic functions and operating logic of the hardware.
[0069] In most user scenarios, the server workload is light, and the PSU load factor is usually below 20%. If the load factor is in this range, the PSU's power conversion efficiency will be low, resulting in low server energy efficiency.
[0070] The present application provides a method for switching the operating mode of a power supply unit and a server, wherein the power supply unit is provided in the server. In an embodiment of the present application, in response to a user setting the operating mode of the power supply unit, the operating mode of the power supply unit is set to an energy-saving mode; the system power consumption of the server is obtained; if the system power consumption is less than a target power consumption, the firmware of the power supply unit is updated to a first firmware, wherein the operating mode corresponding to the first firmware is an energy-saving mode, and the target power consumption is the power consumption of one power supply unit; if it is determined that the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to a second firmware, wherein the operating mode corresponding to the second firmware is a high-performance mode.
[0071] Because the power supply unit's power conversion efficiency varies when the firmware operates in different modes, for example, at different power levels, firmware in different operating modes results in different power conversion efficiencies. Therefore, by switching the operating mode of the power supply unit's firmware, the power supply unit's power conversion efficiency can be maintained at a high level, thereby improving the server's energy efficiency.
[0072] To facilitate understanding of this embodiment, a method for switching the operating mode of a power supply unit in a server disclosed in an embodiment of the present application is first described in detail. In some possible implementations, the method for switching the operating mode of the power supply unit in the server can be implemented by a processor calling computer-readable instructions stored in a memory.
[0073] See also Figure 1 FIG. 1 is a flow chart of a method for switching the working mode of a power supply unit in a server provided by an embodiment of the present application. The method is applied to a BMC in a server. The method includes steps S101 to S104, wherein:
[0074] S101: In response to a user setting the working mode of the power supply unit, setting the working mode of the power supply unit to an energy-saving mode;
[0075] Here, you can use the BMC and BIOS to configure the operating mode of the server's power supply unit (PSU). Energy-saving mode maximizes energy savings by reducing CPU frequency, shutting down unnecessary background processes, and lowering cooling fan speed. High-performance mode provides near-full-load performance, with the CPU frequency approaching or reaching the maximum.
[0076] S102: Obtain the system power consumption of the server. The system power consumption is the total amount of electrical energy currently consumed by the server during operation. The system power consumption of the server is determined by the combined energy consumption of multiple components, including the processor, memory, hard disk, power supply, and other components.
[0077] S103: When the system power consumption is less than the target power consumption, update the firmware of the power supply unit to the first firmware, wherein the working mode corresponding to the first firmware is the energy-saving mode, and the target power consumption is the power consumption of one power supply unit.
[0078] S104: When the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to a second firmware, and the working mode corresponding to the second firmware is a high-performance mode.
[0079] In an embodiment of the present application, the BMC can control the working firmware of the PSU to be updated to the first firmware or the second firmware by upgrading the working firmware in the PSU or modifying the identifier of the MCU register inside the PSU.
[0080] In a server redundant power supply solution, power supply units typically use a PSU N+N or N+1 backup configuration. In this case, the BMC needs to sequentially control the switching of the working firmware of each PSU to switch the firmware of each PSU from the current firmware to the first firmware or the second firmware.
[0081] like Figure 2 The figure shows the power of the server power supply unit and the conversion efficiency of the power supply unit to electric energy, wherein the horizontal axis is power and the vertical axis is conversion efficiency. Curve 1 is the relationship between the power and conversion efficiency of the power supply unit in energy-saving mode, and curve 2 is the relationship between the power and conversion efficiency of the power supply unit in high-performance mode. Figure 2 As can be seen from the figure, before the intersection of curves 1 and 2, the power supply unit has a higher conversion efficiency in energy-saving mode, and after the intersection of curves 1 and 2, the power supply unit has a higher conversion efficiency in high-performance mode. A higher conversion efficiency indicates higher energy efficiency for the server. Based on this, the embodiments of the present application, by switching the operating mode of the operating firmware in the power supply unit, can ensure that the power supply unit maintains a high level of energy conversion efficiency, thereby improving the energy efficiency of the server.
[0082] In the embodiment of the present application, two firmwares are pre-set for each PSU, namely the first firmware and the second firmware. The operating mode corresponding to the second firmware is the high-performance mode, and the operating mode corresponding to the first firmware is the energy-saving mode. The first firmware and the second firmware can be set in the following manner:
[0083] Setting method 1:
[0084] One way to set the PSU firmware is to embed the PSU firmware into the firmware of the server BMC, for example, Figure 3As shown, firmware supporting the high-performance mode and energy-saving mode of PSU 31 can be built into the firmware 32 of BMC 32, for example, firmware supporting the high-performance mode and energy-saving mode of PSU 1 and PSU 2. For example, the first firmware / second firmware of the first type, the first firmware / second firmware of the second type, and the first firmware / second firmware of the nth type can be built into the BMC firmware.
[0085] During specific implementation, the BMC can determine the model of the power supply unit, and then determine the firmware that matches the model among various built-in firmwares, and burn the firmware to the corresponding power supply unit PSU.
[0086] Setting method 2:
[0087] Another way to set the PSU firmware is to upload the firmware of the corresponding model through the web interface.
[0088] When implementing it specifically, Figure 4 As shown, when switching the working firmware in the PSU, the user can upload the corresponding firmware 43 to the BMC42 through the BMC interface (management interaction interface), for example, energy-saving mode firmware or high-performance mode firmware, and then the BMC burns the firmware to the corresponding power supply unit PSU41.
[0089] Setting method three:
[0090] Another way to set the PSU firmware is to build it into the PSU's own MCU. Figure 5 As shown, the firmware for the two working modes can be built into the MCU of the PSU 51. In this case, the BMC 52 can trigger the PSU to switch the firmware of different working modes, thereby achieving real-time switching of the PSU working mode.
[0091] The above steps are introduced below in conjunction with specific implementation methods.
[0092] In the embodiment of the present application, the working mode of the power supply unit can be set to the energy-saving mode by the following methods:
[0093] In an optional implementation, the operating mode of the power supply unit may be set to an energy-saving mode through a baseboard management controller.
[0094] For example, the default working mode of the power supply unit is high-performance mode. According to needs, the user can set the working mode of the power supply unit to energy-saving mode through the BMC. After that, the system power consumption of the server can be obtained, and then the BMC determines whether the power supply unit meets the switching conditions of the energy-saving mode based on the system power consumption. Here, if the BMC compares the system power consumption and finds that it is less than the target power consumption, it is determined that the switching conditions are met, otherwise, the high-performance mode is maintained. Next, the BMC can prompt the user and confirm the risk, and after detecting the user's confirmation information, control the firmware of the power supply unit to switch to the first firmware to make the power supply unit enter the energy-saving mode. Among them, the risks include over-power consumption risk and power-off risk. The over-power consumption risk refers to the fact that the power consumed by the server during actual operation exceeds the rated power of the power supply, and the power-off risk refers to the sudden loss of power supply during the operation of the server.
[0095] In another optional embodiment, the working mode of the power supply unit can be set to the energy-saving mode through the basic input and output system.
[0096] For example, the user can set the working mode of the power supply unit through the BIOS. After the BMC detects that the user has set the working mode of the power supply unit to the energy-saving mode through the BIOS, the BMC can prompt the user and confirm the risk, and after detecting the user's confirmation information, obtain the system power consumption of the server. Then, the BMC can compare the system power consumption with the target power consumption. If the BMC finds that the system power consumption is less than the target power consumption, it determines that the switching condition is met. Otherwise, the high-performance mode is maintained. At this time, the BMC can control the firmware of the power supply unit to be updated to the first firmware to enable the power supply unit to enter the energy-saving mode.
[0097] In this embodiment, after the user's confirmation information is detected, if the server is in a standby power state, the firmware of the power supply unit is updated to the first firmware in the standby power state.
[0098] By setting the working mode of the power supply unit to the energy-saving mode through the baseboard management controller and the basic input and output system, the setting method of the working mode of the power supply unit can be enriched to meet the service needs of users.
[0099] In an embodiment of the present application, updating the firmware of the power supply unit to the first firmware specifically includes: obtaining the first firmware and burning the first firmware to the power supply unit, so that the firmware of the power supply unit is updated to the first firmware. If the server includes multiple power supply units, the firmware of each power supply unit can be updated to the first firmware in sequence.
[0100] Here, the power supply unit usually adopts PSU N+N or N+1 backup mode. In this case, the BMC needs to burn the corresponding first firmware to each PSU in turn. After the burning of the first firmware is completed, the power supply unit can enter the energy-saving mode.
[0101] In an optional implementation, a candidate firmware matching the power supply unit may be determined as the first firmware among a plurality of candidate firmwares stored in a baseboard management controller of the server.
[0102] If the PSU firmware is built into the server BMC, the BMC may determine a firmware model that matches the power supply unit to be upgraded from among multiple built-in candidate firmwares, and then determine a first firmware from among the matching firmware models.
[0103] For example, if Figure 3 As shown, the BMC determines that the firmware model that matches the power supply unit among the candidate firmware is the first type of firmware. The BMC can then determine the energy-saving mode firmware among the first type of firmware (i.e., the matching candidate firmware) as the first firmware. The BMC can then burn the first firmware to the power supply unit through the upgrade channel. By burning the first firmware, the firmware of the power supply unit can be switched to the first firmware, thereby implementing the firmware upgrade.
[0104] In another optional implementation manner, the target firmware uploaded by the user through the management interaction interface may be obtained, and the target firmware may be determined as the first firmware of the power supply unit.
[0105] like Figure 4 As shown, if the PSU firmware is set using the second setting method described above, that is, uploaded through the BMC interface (management interface), then after the BMC detects that the operating mode of the server's power supply unit is set to energy-saving mode, it can obtain the target firmware uploaded by the user through the management interface and then determine the uploaded target firmware as the first firmware of the power supply unit. The BMC can then burn the first firmware into the power supply unit through the upgrade channel. By burning the first firmware, the operating firmware of the power supply unit is switched to the first firmware, thereby achieving the firmware upgrade.
[0106] In the above implementation, by using a built-in firmware upgrade package in the BMC or obtaining the firmware upgrade package through the BMC interface, multiple firmware determination methods can be provided, thereby meeting different needs of users and having a wider range of applications.
[0107] In an embodiment of the present application, updating the firmware of the power supply unit to the first firmware specifically also includes: the baseboard management controller sends an energy-saving mode command to the power supply unit, wherein the energy-saving mode command is used to update the firmware of the power supply unit to the first firmware.
[0108] In an embodiment of the present application, in addition to the aforementioned method of setting the operating mode of the power supply unit to the energy-saving mode via the baseboard management controller and the basic input / output system, the firmware of the power supply unit can also be updated to the first firmware by issuing an energy-saving mode command. In a specific implementation, the BMC issues the energy-saving mode command to the power supply unit. After detecting the energy-saving mode command, the power supply unit can update its firmware according to the command content of the energy-saving mode command.
[0109] Based on the above-described embodiment, for example, when the operating mode of the power supply unit in the server is set to the energy-saving mode through the basic input and output system, the firmware of the power supply unit can be updated to the first firmware in the following manner:
[0110] If the server operates in a standby power state, the baseboard management controller sends an energy-saving mode command to the power supply unit, wherein the energy-saving mode command is used to update the firmware of the power supply unit to a first firmware.
[0111] During specific implementation, if the working mode of the power supply unit is set to energy-saving mode through BIOS, it can be determined whether the server is in standby power state, wherein, if so, the BMC can prompt the user and confirm the risk, and after detecting the user's confirmation information, the BMC sends an energy-saving mode command to the power supply unit. After detecting the energy-saving mode command, the power supply unit can update the firmware of the power supply unit according to the command content of the energy-saving mode command. In addition, the candidate firmware that matches the power supply unit can be determined as the first firmware among the multiple candidate firmwares stored in the baseboard management controller, and the target firmware uploaded by the user through the management interface of the baseboard management controller can be obtained, and the target firmware can be determined as the first firmware of the power supply unit.
[0112] In the above embodiment, the technical solution of implementing working firmware switching by sending an energy-saving mode command to the power supply unit can shorten the communication time between the power supply unit and the BMC, thereby improving the firmware switching efficiency.
[0113] Based on the above embodiment, if the power supply unit includes a microcontroller unit, and the first firmware and the second firmware are stored in the microcontroller unit, then the baseboard management controller sends an energy-saving mode command to the power supply unit, including:
[0114] The identifier in the register of the microcontroller is modified to a first identifier, so as to update the firmware of the power supply unit to a second firmware; wherein the first identifier is an identifier corresponding to the second firmware.
[0115] like Figure 5 As shown, if the PSU firmware is built into the PSU's own MCU, the BMC can modify the flag in the PSU's internal MCU register. By modifying the flag in this register, the power supply unit can switch from updating the first firmware to the second firmware. For example, the BMC can modify the flag in the register corresponding to the firmware to a second flag; wherein the second flag is used to switch the power supply unit's firmware to the first firmware. The power supply unit can periodically read the flag in this register and determine whether to update the firmware based on it.
[0116] In the above embodiment, the technical solution of implementing working firmware switching by sending an energy-saving mode command to the power supply unit can shorten the communication time between the power supply unit and the BMC, thereby improving the firmware switching efficiency.
[0117] In an embodiment of the present application, after the firmware of the power supply unit is updated to the first firmware, if the system power consumption of the server is greater than the power consumption of one power supply unit within a preset time period, the firmware of the power supply unit is updated to the second firmware.
[0118] Specifically, the power supply unit obtains the server's system power consumption over a continuous preset time period. For example, the system power consumption of the server may be obtained at regular intervals within the preset time period. The system power consumption is then compared with the power consumption of a power supply unit. If each obtained system power consumption is greater than the power consumption of a power supply unit, the BMC updates the power supply unit's firmware to a second firmware, thereby setting the power supply unit's operating mode to high-performance mode.
[0119] It should be noted that the server may include multiple power supply units, and each power supply unit has the same power consumption.
[0120] In an embodiment of the present application, after the firmware of the power supply unit is updated to the first firmware, the firmware of the power supply unit can also be updated to the second firmware when the working mode of the power supply unit in the server is set to high-performance mode through the baseboard management controller or the basic input and output system.
[0121] In a server redundant power supply solution, the power supply units typically work in a PSU N+N or N+1 backup mode. In this case, the BMC needs to sequentially control the firmware update of each PSU to the second firmware.
[0122] The following is an introduction to each situation.
[0123] Case 1: Set the high-performance mode through the baseboard management controller.
[0124] The power supply unit defaults to high-performance mode. Users can set this mode to high-performance mode through the BMC as needed. The BMC then determines whether the system power consumption exceeds the target power consumption. If so, it updates the power supply unit's firmware to the second firmware. Otherwise, it remains in energy-saving mode and reports the reason for not being able to enter high-performance mode.
[0125] Case 2: Set the high performance mode through the basic input and output system.
[0126] In an embodiment of the present application, the user can also set the working mode of the power supply unit to high-performance mode through BIOS.
[0127] In an optional implementation of the second scenario, after high-performance mode is set via the basic input / output system, the BMC can obtain the server's system power consumption and compare it with a target power consumption. If the BMC determines that the system power consumption is greater than the target power consumption, the BMC determines that the conditions for switching to high-performance mode are met. Otherwise, the BMC maintains energy-saving mode and reports the reason for failing to enter high-performance mode. The BMC can then control the power supply unit's firmware to be updated to a second firmware to enable the power supply unit to enter high-performance mode.
[0128] In the above embodiment, by updating the firmware of the power supply unit to the second firmware when it is determined that the system power consumption is greater than the target power consumption, the server can be kept in a powered-on state without losing power, thereby ensuring normal operation of the server.
[0129] In another optional implementation of the second scenario, updating the firmware of the power supply unit to the second firmware specifically includes:
[0130] When the working mode of the power supply unit in the server is set to high-performance mode through the basic input and output system, if the server is in a standby power state, the firmware of the power supply unit is updated to a second firmware so that the power supply unit works in the high-performance mode.
[0131] In specific implementation, when the server is in standby state, that is, other components inside the server are not powered on and are in standby mode, for example, the central processing unit, memory, hard disk and other devices are in standby state. At this time, only the BMC is in normal working state, and the server is in standby power (that is, STBY state). The working mode of the power supply unit can be set to high-performance mode through BIOS. That is to say, when the server is in standby state, the firmware of the power supply unit can be updated to the second firmware, thereby switching the working mode of the power supply unit to high-performance mode, and then the server can be powered on.
[0132] In the embodiment of the present application, the firmware of the power supply unit may be updated to the second firmware in the following manner, specifically including:
[0133] Determining, from a plurality of candidate firmwares stored in a baseboard management controller, that a candidate firmware matching the power supply unit is the second firmware; the candidate firmwares include first firmware and second firmware corresponding to different types of power supply units;
[0134] or,
[0135] The target firmware uploaded by the user through the management interface of the baseboard management controller is obtained, and the target firmware is determined as the second firmware of the power supply unit.
[0136] If the PSU firmware is built into the server's BMC, the BMC can identify a firmware model that matches the power supply unit to be upgraded from among multiple built-in candidate firmwares. It then selects the high-performance mode firmware (i.e., the second firmware) from among the matching firmware models. The BMC can then burn the second firmware into the power supply unit through the upgrade channel. By burning the second firmware, the power supply unit's firmware is switched to the second firmware, thus completing the firmware upgrade.
[0137] If the PSU firmware is uploaded through the BMC interface (management interface), the BMC can obtain the target firmware uploaded by the user through the management interface and then determine the uploaded target firmware as the second firmware of the power supply unit. The BMC can then burn the second firmware to the power supply unit through the upgrade channel. By burning the second firmware, the operating firmware of the power supply unit is switched to the second firmware, thus completing the firmware upgrade.
[0138] In the above embodiment, by embedding the PSU firmware into the BMC and burning the corresponding firmware to the PSU through the BMC, the working mode switching is realized. This can save the server hardware cost while realizing the switching of the working firmware in the power supply unit, thereby ensuring that the power supply unit has a high efficiency in converting electric energy, thereby improving the energy efficiency of the server.
[0139] In the embodiment of the present application, the firmware of the power supply unit may be updated to the second firmware in the following manner, specifically including:
[0140] The baseboard management controller sends a high-performance mode command to the power supply unit, so that the firmware of the power supply unit is switched to the second firmware.
[0141] The BMC may send a high-performance mode command to the power supply unit via a communication channel with the power supply unit. After receiving the high-performance mode command, the power supply unit may switch its firmware to the second firmware, thereby changing its operating mode to the high-performance mode.
[0142] In an embodiment of the present application, for example, when the server is in standby mode, updating the firmware of the power supply unit to the second firmware specifically includes:
[0143] When the server is in standby mode, the baseboard management controller sends a high-performance mode command to the power supply unit, wherein the high-performance mode command is used to update the firmware of the power supply unit to a second firmware.
[0144] In the second configuration described above, the BIOS switches the power supply unit's operating mode to high-performance mode. At this point, while the server is not yet powered on and is in standby mode, the BMC can issue a high-performance mode command to the power supply unit via its communication channel. Upon receiving this high-performance mode command, the power supply unit can switch its firmware to the second firmware, thereby changing its operating mode to high-performance mode. The server can then be powered on.
[0145] In specific implementation, the identifier corresponding to the firmware in the register of the microcontroller in the power supply unit can be modified to the first identifier. The power supply unit can periodically read the identifier in the register. If it is determined that the read identifier has changed, the firmware of the power supply unit is updated to the second firmware.
[0146] The following will be combined Figures 6(a) to 7(d) The following describes how to switch the working mode of the power supply unit in the server according to different situations.
[0147] Case 1: The PSU firmware is set in setting method 1, setting method 2, and setting method 3. In this case, the flowchart of entering energy-saving mode based on BMC and the flowchart of exiting energy-saving mode based on BMC are as follows: Figures 6(a) to 6(c) shown.
[0148] As shown in Figure 6(a), the flowchart of entering energy-saving mode based on BMC specifically includes the following steps:
[0149] S6011: The BMC sets the power supply unit to energy-saving mode.
[0150] S6012: Obtain the system power consumption of the server;
[0151] S6013: Determine whether the system power consumption is less than the target power consumption; if it is determined that the system power consumption is less than the target power consumption, execute step S6014; otherwise, execute step S6016;
[0152] S6014: Prompt the user and confirm the risk;
[0153] S6015: After detecting the user's confirmation information, control the firmware of the power supply unit to switch to the first firmware;
[0154] Here, a candidate firmware matching the power supply unit can be determined as the first firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the first firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and the target firmware is determined as the first firmware of the power supply unit; then, the first firmware is burned into the power supply unit.
[0155] Here, an energy-saving mode command may also be sent to the power supply unit; wherein the energy-saving mode command is used to instruct the power supply unit to update the firmware to the first firmware.
[0156] S6016: Maintain high performance mode.
[0157] As shown in Figure 6(b), the flowchart of exiting the energy-saving mode based on the BMC specifically includes the following steps:
[0158] S6021: The BMC sets the power supply unit to high-performance mode.
[0159] S6022: Determine whether the system power consumption of the server is greater than the target power consumption; if so, execute S6023; otherwise, execute S6024;
[0160] S6023: Control the firmware of the power supply unit to be updated to the second firmware;
[0161] Here, a candidate firmware matching the power supply unit can be determined as the second firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the second firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and determined as the second firmware of the power supply unit; then, the second firmware is burned into the power supply unit.
[0162] Here, a high-performance mode command may also be sent to the power supply unit; wherein the high-performance mode command is used to instruct the power supply unit to update the firmware to the second firmware.
[0163] S6024: Maintain energy-saving mode and report the reason for not being able to enter high-performance mode.
[0164] As shown in Figure 6(c), the flowchart of exiting the energy-saving mode based on the BMC specifically includes the following steps:
[0165] S6031: Obtaining alarm information for exiting the energy-saving mode reported by the power supply unit. The alarm information is information sent by the power supply unit to the BMC when it determines that the system power consumption of the server exceeds the power consumption of one power supply unit within a preset time period.
[0166] S6032: Control the firmware of the power supply unit to be updated to the second firmware.
[0167] Here, a candidate firmware matching the power supply unit can be determined as the second firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the second firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and determined as the second firmware of the power supply unit; then, the second firmware is burned into the power supply unit.
[0168] Here, a high-performance mode command may also be sent to the power supply unit; wherein the high-performance mode command is used to instruct the power supply unit to update the firmware to the second firmware.
[0169] Case 2: The PSU firmware is set in method 1, method 2, or method 3. In this case, the flowchart for entering energy-saving mode based on BIOS and the flowchart for exiting energy-saving mode based on BMC are as follows: Figures 7(a) to 7(d) shown.
[0170] As shown in FIG7( a ), the flowchart of entering the energy-saving mode based on the BIOS specifically includes the following steps:
[0171] S7011: Set the power supply unit to energy-saving mode through BIOS.
[0172] S7012: Prompt the user and confirm the risk;
[0173] S7013: After detecting the user's confirmation information, obtain the system power consumption of the server;
[0174] S7014: Determine whether the system power consumption is less than the target power consumption. If so, execute step S7015; otherwise, execute step S7016;
[0175] S7015: Controlling the firmware of the power supply unit to be updated to the first firmware;
[0176] Here, a candidate firmware matching the power supply unit can be determined as the first firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the first firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and the target firmware is determined as the first firmware of the power supply unit; then, the first firmware is burned into the power supply unit.
[0177] Here, an energy-saving mode command may also be sent to the power supply unit; wherein the energy-saving mode command is used to instruct the power supply unit to update the firmware to the first firmware.
[0178] S7016: Maintain high performance mode.
[0179] As shown in FIG7( b ), the flowchart of entering the energy-saving mode based on the BIOS specifically includes the following steps:
[0180] S7021: When the server is in standby mode, set the power supply unit to energy-saving mode through the BIOS;
[0181] S7022: Prompt the user and confirm the risk;
[0182] S7023: After detecting the user's confirmation information, controlling the firmware of the power supply unit to be updated to the first firmware;
[0183] Here, a candidate firmware matching the power supply unit can be determined as the first firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the first firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and the target firmware is determined as the first firmware of the power supply unit; then, the first firmware is burned into the power supply unit.
[0184] Here, an energy-saving mode command may also be sent to the power supply unit; wherein the energy-saving mode command is used to instruct the power supply unit to update the firmware to the first firmware.
[0185] S7024: Main power supply for the server.
[0186] As shown in FIG7( c ), the flowchart of exiting the energy-saving mode based on the BIOS specifically includes the following steps:
[0187] S7031: Set the power supply unit to high-performance mode through BIOS.
[0188] S7032: Determine whether the system power consumption is less than the target power consumption. If so, execute S7033; otherwise, execute S7034;
[0189] S7033: Control the firmware of the power supply unit to be updated to the second firmware;
[0190] Here, a candidate firmware matching the power supply unit can be determined as the second firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the second firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and determined as the second firmware of the power supply unit; then, the second firmware is burned into the power supply unit.
[0191] Here, a high-performance mode command may also be sent to the power supply unit; wherein the high-performance mode command is used to instruct the power supply unit to update the firmware to the second firmware.
[0192] S7034: Maintain energy-saving mode and report the reason for not being able to enter high-performance mode.
[0193] As shown in FIG7( d ), the flowchart of exiting the energy-saving mode based on the BIOS specifically includes the following steps:
[0194] S7041: When the server is in standby mode, set the power supply unit to high-performance mode through the BIOS;
[0195] S7042: Control the firmware of the power supply unit to be updated to the second firmware;
[0196] Here, a candidate firmware matching the power supply unit can be determined as the second firmware from among multiple candidate firmwares built into the baseboard management controller of the server; then, the second firmware is burned into the power supply unit. Alternatively, a target firmware uploaded by a user through a management interaction interface is obtained and determined as the second firmware of the power supply unit; then, the second firmware is burned into the power supply unit.
[0197] Here, a high-performance mode command may also be sent to the power supply unit; wherein the high-performance mode command is used to instruct the power supply unit to update the firmware to the second firmware.
[0198] S7043: Main power supply for the server.
[0199] It should be noted that in the standby power state of the server, only the BMC in the server is in working state, and the other components are not working normally. The standby power can be 3.3V. The main power on the server means that the components in the server can enter the normal working state, which can be 12V. For example, the central processing unit, memory and other components can work normally.
[0200] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0201] Based on the same inventive concept, an embodiment of the present application also provides a device for switching the working mode of the power supply unit in the server corresponding to the method for switching the working mode of the power supply unit in the server. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the method for switching the working mode of the power supply unit in the server in the above-mentioned embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0202] Reference Figure 8 , which is a schematic diagram of a device for switching the working mode of a power supply unit in a server provided by an embodiment of the present application, the device includes: a setting unit 10, an acquisition unit 20, a first updating unit 30 and a second updating unit 40;
[0203] A setting unit 10 is configured to set the operating mode of the power supply unit in the server to an energy-saving mode in response to a setting of the operating mode of the power supply unit in the server by a user;
[0204] An acquiring unit 20 is configured to acquire the system power consumption of the server;
[0205] a first updating unit 30 configured to update the firmware of the power supply unit to a first firmware if it is determined that the system power consumption is less than a target power consumption, wherein the operating mode corresponding to the first firmware is an energy-saving mode and the target power consumption is the power consumption of one power supply unit;
[0206] The second updating unit 40 is configured to update the firmware of the power supply unit to a second firmware if it is determined that the system power consumption is greater than the target power consumption, wherein the working mode corresponding to the second firmware is a high-performance mode.
[0207] In a possible implementation, the setting unit 10 is further configured to:
[0208] Setting the operating mode of the power supply unit to an energy-saving mode through a baseboard management controller;
[0209] or
[0210] The working mode of the power supply unit is set to energy-saving mode through the basic input and output system.
[0211] By setting the working mode of the power supply unit to the energy-saving mode through the baseboard management controller and the basic input and output system, the setting method of the working mode of the power supply unit can be enriched to meet the service needs of users.
[0212] In a possible implementation manner, the second updating unit 40 is further configured to:
[0213] Determining, from a plurality of candidate firmwares stored in a baseboard management controller, that a candidate firmware matching the power supply unit is the second firmware; the candidate firmwares include first firmware and second firmware corresponding to different types of power supply units;
[0214] or,
[0215] The target firmware uploaded by the user through the management interface of the baseboard management controller is obtained, and the target firmware is determined as the second firmware of the power supply unit.
[0216] In the above implementation, by using a built-in firmware upgrade package in the BMC or obtaining the firmware upgrade package through the BMC interface, multiple firmware determination methods can be provided, thereby meeting different needs of users and having a wider range of applications.
[0217] In a possible implementation, the first updating unit 30 is further configured to:
[0218] When the working mode of the power supply unit in the server is set to the energy-saving mode through the basic input and output system, if the server is working in the standby power state, the baseboard management controller sends an energy-saving mode command to the power supply unit, wherein the energy-saving mode command is used to update the firmware of the power supply unit to the first firmware.
[0219] In a possible implementation, when the power supply unit includes a micro control unit and the first firmware and the second firmware are stored in the micro control unit, the second update unit 40 is further configured to:
[0220] The identifier in the register of the microcontroller is modified to a first identifier, so as to update the firmware of the power supply unit to a second firmware; wherein the first identifier is an identifier corresponding to the second firmware.
[0221] In the above embodiment, the technical solution of switching the working firmware by sending the energy-saving mode command to the power supply unit can shorten the communication time between the power supply unit and the BMC, thereby improving the efficiency of firmware switching.
[0222] In a possible implementation manner, the device is further configured to: after the firmware of the power supply unit is updated to the first firmware,
[0223] If the system power consumption of the server is greater than the power consumption of a power supply unit within a preset time period, updating the firmware of the power supply unit to the second firmware;
[0224] or,
[0225] When the operating mode of the power supply unit in the server is set to a high-performance mode through a baseboard management controller or a basic input / output system, the firmware of the power supply unit is updated to the second firmware.
[0226] In a possible implementation manner, the device is further used for:
[0227] When the operating mode of the power supply unit in the server is set to high-performance mode through the basic input and output system, if the server is operating in standby mode, the firmware of the power supply unit is updated to the second firmware to enable the power supply unit to operate in the high-performance mode.
[0228] In a possible implementation manner, the device is further used for:
[0229] When the server operates in standby mode, the baseboard management controller sends a high-performance mode command to the power supply unit, wherein the high-performance mode command is used to update the firmware of the power supply unit to a second firmware.
[0230] In a possible implementation, when the server includes multiple power supply units, the first updating unit 30 is further configured to:
[0231] The firmware of each of the power supply units is updated to the first firmware in sequence.
[0232] like Figure 9As shown, CPU 1101, PSU 1102 and BMC 1103 are all set on the mainboard 912 of the server, and the CPU is provided with the operating system OS program and BIOS program. The PSU supplies power to the components on the mainboard. For example, when the server is powered on, the PSU can provide power for the normal operation of each component in the server. When the server is in standby mode, the PSU can only provide power to the BMC, and other components are not working. The BMC is used to monitor the working status of each component on the mainboard. Figure 9 As shown, there may be multiple power supply units PSU, and the multiple power supply units are arranged in parallel. The CPU is in communication with the baseboard management controller BMC and each power supply unit through the voltage regulation controller 1104 .
[0233] In an embodiment of the present application, the operating mode of the power supply unit PSU in the server can be set to the energy-saving mode through the BIOS program in the CPU or the BMC; thereafter, the BMC obtains the system power consumption of the server, and when it is determined that the system power consumption is less than the target power consumption, the firmware of the power supply unit is updated to the first firmware, and when it is determined that the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to the second firmware. The operating mode corresponding to the first firmware is the energy-saving mode, and the operating mode corresponding to the second firmware is the high-performance mode.
[0234] The present application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes the steps of the method for switching the operating mode of a power supply unit in a server as described in the above method embodiment. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0235] An embodiment of the present application also provides a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the method for switching the working mode of the power supply unit in the server described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.
[0236] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0237] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0238] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0239] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0240] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0241] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.
Claims
1. A method for switching the working mode of a power supply unit, wherein the power supply unit is provided in a server, wherein: The method comprises: In response to a user setting of the operating mode of the power supply unit, setting the operating mode of the power supply unit to an energy-saving mode; Obtaining system power consumption of the server; When the system power consumption is less than the target power consumption, updating the firmware of the power supply unit to a first firmware, wherein the working mode corresponding to the first firmware is an energy-saving mode, and the target power consumption is the power consumption of one power supply unit; When the system power consumption is greater than the target power consumption, the firmware of the power supply unit is updated to a second firmware, and the working mode corresponding to the second firmware is a high-performance mode.
2. The method according to claim 1, characterized in that Setting the working mode of the power supply unit to the energy-saving mode includes: Setting the operating mode of the power supply unit to an energy-saving mode through a baseboard management controller; or The working mode of the power supply unit is set to energy-saving mode through the basic input and output system.
3. The method according to claim 1, characterized in that Updating the firmware of the power supply unit to the second firmware includes: Determining, from a plurality of candidate firmwares stored in a baseboard management controller, that a candidate firmware matching the power supply unit is the second firmware; the candidate firmwares include first firmware and second firmware corresponding to different power supply unit types; or, The target firmware uploaded by the user through the management interface of the baseboard management controller is obtained, and the target firmware is determined as the second firmware of the power supply unit.
4. The method according to claim 2, characterized in that The step of setting the working mode of the power supply unit to the energy-saving mode through the basic input and output system includes: When the server is in standby mode, the baseboard management controller sends an energy-saving mode command to the power supply unit, wherein the energy-saving mode command is used to update the firmware of the power supply unit to the first firmware.
5. The method according to claim 4, characterized in that The power supply unit includes a micro control unit, the first firmware and the second firmware are stored in the micro control unit, and the baseboard management controller sends an energy-saving mode command to the power supply unit, including: The identifier corresponding to the firmware in the register of the microcontroller is modified to a first identifier, so as to update the firmware of the power supply unit to a second firmware; wherein the first identifier is the identifier corresponding to the second firmware.
6. The method according to any one of claims 1 to 5, characterized in that After the firmware of the power supply unit is updated to the first firmware, the method further includes: If the system power consumption of the server is greater than the power consumption of a power supply unit within a preset time period, updating the firmware of the power supply unit to the second firmware; or, When the operating mode of the power supply unit in the server is set to a high-performance mode through a baseboard management controller or a basic input / output system, the firmware of the power supply unit is updated to the second firmware.
7. The method according to claim 6, characterized in that When the operating mode of the power supply unit in the server is set to a high-performance mode through the basic input / output system, updating the firmware of the power supply unit to the second firmware includes: When the server is in standby mode, the firmware of the power supply unit is updated to a second firmware, so that the power supply unit operates in the high-performance mode.
8. The method according to claim 7, characterized in that When the server is in standby mode, updating the firmware of the power supply unit to the second firmware includes: When the server is in standby mode, the baseboard management controller sends a high-performance mode command to the power supply unit, wherein the high-performance mode command is used to update the firmware of the power supply unit to a second firmware.
9. The method according to claim 1, characterized in that The server includes a plurality of power supply units, and updating the firmware of the power supply units to first firmware includes: The firmware of each of the power supply units is updated to the first firmware in sequence.
10. A computing device, characterized in that include: A power supply unit and a baseboard management controller; the power supply unit and the baseboard management controller are electrically connected, the baseboard management controller includes a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, a method for switching the working mode of the power supply unit in the computing device according to any one of claims 1 to 9 is implemented.