Method for adjusting clock rate frequency of processing unit of server

By introducing a frequency adjustment flag into the server, the clock frequency of the processing unit is dynamically adjusted according to the occurrence of overload events within a continuous day, the existing servers have solved the problems of insufficient performance and power waste in the processing unit's clock frequency adjustment, and achieved more efficient power management and performance optimization.

CN120020678APending Publication Date: 2025-05-20MITAC COMP (SHUN DE) LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311554256.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

Existing servers have problems with insufficient performance and waste of power in processing unit timing pulse frequency adjustment, especially when the central processor is at the highest timing pulse frequency for a long time, excessive power supply and down-frequency may lead to insufficient performance or crash.

Method used

By introducing a frequency adjustment flag into the server, the clock frequency of the processing unit is dynamically adjusted according to the occurrence of overload events within a continuous number of days. The specific steps include judging the frequency adjustment flag value, and if an overload event occurs within a number of consecutive days, increase the clock frequency; otherwise, reduce the clock frequency to optimize performance and save power.

Benefits of technology

It realizes dynamic adjustment of the clock frequency according to the load of the processing unit, improves the server's performance under high load conditions, and saves power when the load is low, avoiding the problems of power waste and insufficient performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020678A_ABST
    Figure CN120020678A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a clock rate frequency adjusting method for a processing unit of a server, which is implemented by a server and comprises the following steps of: (A) judging whether a flag value of a frequency adjusting flag is a first preset value which indicates that an overload event of the server continuously occurs for a preset number of days or not; (B) when the flag value of the frequency adjustment flag is judged to be the first preset value, increasing the clock rate frequency during the current operation, the flag value of the frequency adjustment flag is updated to be a second preset value which is different from the first preset value and indicates that the server does not have the overload event for the preset number of days continuously; and (C) when the flag value of the frequency adjustment flag is judged not to be the first preset value, the clock rate frequency in the current operation is reduced, and the steps (A)-(C) are carried out in the starting-up self-detection stage of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular, to a method for adjusting the clock frequency of a processing unit of a server. Background Art

[0002] With the continuous improvement of server hardware specifications, the power consumption of server power supplies has been increasing day by day. Among them, the Central Processing Unit (CPU) is one of the main culprits causing server power consumption.

[0003] In existing servers, regardless of whether the central processing unit performs processing that consumes less hardware resources or software that consumes extremely high hardware resources, the central processing unit is always at the highest clock rate.

[0004] However, users may not always need to use the maximum performance of the central processing unit for a long time. The central processing unit being at the highest clock rate for a long time means that the power supply unit provides the maximum power for a long time, resulting in over - supply of power. However, if the clock frequency of the central processing unit is suddenly reduced, resulting in insufficient performance, it may cause the server to crash. Summary of the Invention

[0005] Therefore, an object of the present invention is to provide a method for adjusting the clock frequency of a processing unit of a server that can adjust the clock frequency according to the load of the processing unit.

[0006] To achieve the above object, the present invention provides the following technical solutions: A method for adjusting the clock frequency of a processing unit of a server, implemented by a server. The server includes a storage unit and a processing unit electrically connected to the storage unit. The storage unit stores a frequency adjustment flag, and a flag value of the frequency adjustment flag is one of a first predetermined value indicating that the server has experienced an overload event for a continuous predetermined number of days and a second predetermined value different from the first predetermined value indicating that the server has not experienced the overload event for the continuous predetermined number of days. The method includes the following steps: (A) The processing unit determines whether the flag value of the frequency adjustment flag is the first predetermined value; (B) When it is determined that the flag value of the frequency adjustment flag is the first predetermined value, the processing unit increases the clock frequency during the current operation and updates the flag value of the frequency adjustment flag to the second predetermined value; and (C) When it is determined that the flag value of the frequency adjustment flag is not the first predetermined value, the processing unit decreases the clock frequency during the current operation. Among them, steps (A) to (C) are performed during the power - on self - test stage of the server.

[0007] Preferably, before step (A), the following steps are further included: (D) when the overload event occurs, the processing unit generates and stores an overload event occurrence time in the storage unit; (E) the processing unit triggers an overload event system management interrupt program to determine whether to update a consecutive days count value of a consecutive days counter related to counting the consecutive days of occurrence of the overload event according to all the overload event occurrence times stored in the storage unit; and (F) the processing unit triggers a periodic system management interrupt program to determine whether to update the flag value of the frequency adjustment flag according to the consecutive days count value of the consecutive days counter; wherein, steps (D) to (F) are performed during the execution phase of the server.

[0008] Preferably, the overload event system management interrupt program includes the following sub-steps: (E-1) the processing unit determines whether the storage unit stores an initial time; (E-2) when it is determined that the storage unit does not store the initial time, the processing unit stores the overload event occurrence time as the initial time in the storage unit; (E-3) the processing unit determines whether the period from the initial time to a current time is greater than or equal to a predetermined time period; (E-4) when it is determined that the period from the initial time to the current time is greater than or equal to the predetermined time period, the processing unit determines whether the overload event occurs during the period from the initial time to the current time; (E-5) when it is determined that the overload event occurs during the period from the initial time to the current time, the processing unit updates the consecutive days count value of the consecutive days counter and closes the overload event system management interrupt program; (E-6) when the overload event does not occur during the period from the initial time to the current time, the processing unit resets the consecutive days count value of the consecutive days counter; and (E-7) the processing unit uses the current time as the initial time.

[0009] Preferably, in sub-step (E-4), the processing unit determines whether the storage unit stores a target overload event occurrence time during the period from the initial time to the current time to determine whether the overload event occurs during the period from the initial time to the current time. When it is determined that the storage unit stores the target overload event occurrence time, the processing unit determines that the overload event occurs during the period from the initial time to the current time. When it is determined that the storage unit does not store the target overload event occurrence time, the processing unit determines that the overload event does not occur during the period from the initial time to the current time.

[0010] Preferably, the periodic system management interrupt program includes the following sub-steps: (F-1) The processing unit determines whether the continuous day count value of the continuous days counter is greater than or equal to a predetermined value; (F-2) When it is determined that the continuous day count value of the continuous days counter is greater than or equal to the predetermined value, the processing unit updates the flag value of the frequency adjustment flag to the first predetermined value; (F-3) The processing unit closes the periodic system management interrupt program and triggers the overload event system management interrupt program.

[0011] Preferably, the overload event is that the power consumption of the server exceeds a power limit.

[0012] Preferably, the clock frequency of the processing unit has 1 to N levels, N>1. Among them, in step (B), the processing unit increases by 1 level each time, and in step (C), the processing unit decreases by 1 level each time, rising to the Nth level at most and dropping to the 1st level at least.

[0013] The efficacy of the present invention is that when the overload event occurs for the continuous predetermined number of days, the processing unit increases the clock frequency during the current operation to improve the efficiency of the processing unit; when the overload event does not occur for the continuous predetermined number of days, the processing unit decreases the clock frequency during the current operation to save power. Description of the Drawings

[0014] Figure 1 is a block diagram illustrating a server for implementing the method for adjusting the clock frequency of the processing unit of the server of the present invention; Figure 2 is a flowchart illustrating a trigger program of an embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention; Figure 3 is a flowchart illustrating the overload event system management interrupt program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention; Figure 4 is a flowchart illustrating the periodic system management interrupt program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention; and Figure 5 is a flowchart illustrating the clock frequency adjustment program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention. Embodiments

[0015] Before the present invention is described in detail, it should be noted that in the following description, similar elements are denoted by the same reference numerals.

[0016] Refer to Figure 1, A server 1 for implementing the method for adjusting the clock frequency of the processing unit of the server according to the present invention is described. The server 1 includes a storage unit 11 and a processing unit 12 electrically connected to the storage unit 11.

[0017] The storage unit 11 stores a frequency adjustment flag. A flag value of the frequency adjustment flag is one of a first predetermined value indicating that the server 1 has had an overload event occur continuously for a predetermined number of days, and a second predetermined value different from the first predetermined value and indicating that the server 1 has not had the overload event occur continuously for the predetermined number of days.

[0018] It should be noted that, in this embodiment, the storage unit 11 is a non-volatile memory (Non-Volatile Memory, NVM), the processing unit 12 is a central processing unit (Central Processing Unit, CPU), the predetermined number of days is 5 days, and the overload event is that the power consumption of the server 1 exceeds a power limit, but not limited thereto.

[0019] An embodiment of the method for adjusting the clock frequency of the processing unit of the server according to the present invention includes a trigger program, an overload event system management interrupt (System Management Interrupt, SMI) program, a periodic system management interrupt program, and a clock frequency adjustment program.

[0020] Refer to Figure 1 、 2 , For the trigger program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server according to the present invention, the trigger program is performed when the server 1 is powered on for the first time and enters the execution stage (runtime). The steps included in the trigger program are described below.

[0021] In step 201, when the overload event occurs, the processing unit 12 generates and stores an overload event occurrence time in the storage unit 11.

[0022] In step 202, the processing unit 12 triggers an overload event system management interrupt program to determine whether to update a consecutive days count value of a consecutive days counter related to counting the consecutive days of occurrence of the overload event according to all the overload event occurrence times stored in the storage unit 11.

[0023] In step 203, the processing unit 12 triggers a periodic system management interrupt program to determine whether to update the flag value of the frequency adjustment flag according to the consecutive days count value of the consecutive days counter.

[0024] In step 204, the processing unit 12 continuously executes an operating system (OS).

[0025] It should be particularly noted that the processing unit 12 periodically executes the overload event system management interrupt program and / or the periodic system management interrupt program until the overload event system management interrupt program and / or the periodic system management interrupt program is turned off.

[0026] Refer to Figure 1 、 3 , for the overload event system management interrupt program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention, the overload event system management interrupt program is performed during the execution stage of the server 1. The following describes the steps included in the overload event system management interrupt program.

[0027] In step 301, the processing unit 12 determines whether the storage unit 11 stores an initial time. When it is determined that the storage unit 11 does not store the initial time, the process proceeds to step 302; when it is determined that the storage unit 11 stores the initial time, the process proceeds to step 303.

[0028] In step 302, the processing unit 12 stores the overload event occurrence time as the initial time in the storage unit 11.

[0029] It should be particularly noted that if the storage unit 11 does not store the initial time, it means that the overload event occurs for the first time, so the overload event occurrence time is used as the initial time.

[0030] In step 303 after steps 301 and 302, the processing unit 12 determines whether the period from the initial time to a current time is greater than or equal to a predetermined time period. When it is determined that the period from the initial time to the current time is greater than or equal to the predetermined time period, the process proceeds to step 304; when it is determined that the period from the initial time to the current time is less than the predetermined time period, the process proceeds to step 308.

[0031] It is worth noting that in this embodiment, the predetermined time period is one day, but it is not limited thereto.

[0032] In step 304, the processing unit 12 determines whether the overload event occurs during the period from the initial time to the current time. When it is determined that the overload event occurs during the period from the initial time to the current time, the process proceeds to step 305; when it is determined that the overload event does not occur during the period from the initial time to the current time, the process proceeds to step 306.

[0033] It should be noted that, in this embodiment, the processing unit 12 determines whether the storage unit 11 stores a target overload event occurrence time during the period from the initial time to the current time, so as to determine whether the overload event occurs during the period from the initial time to the current time. When it is determined that the storage unit 11 stores the target overload event occurrence time, the processing unit 12 determines that the overload event occurs during the period from the initial time to the current time. When it is determined that the storage unit 11 does not store the target overload event occurrence time, the processing unit 12 determines that the overload event does not occur during the period from the initial time to the current time, but not limited thereto.

[0034] In step 305, the processing unit 12 updates the consecutive days count value of the consecutive days counter and closes the overload event system management interrupt program.

[0035] It should be noted that, in this embodiment, the processing unit 12 increments the consecutive days count value of the consecutive days counter by one, but not limited thereto.

[0036] In step 306, the processing unit 12 resets the consecutive days count value of the consecutive days counter.

[0037] In step 307, the processing unit 12 uses the current time as the initial time.

[0038] In step 308, the processing unit 12 continuously executes the operating system.

[0039] For example, the initial time is 0:00 on January 1st. At 0:00 on January 2nd, if the overload event occurs between 0:00 on January 1st and 0:00 on January 2nd, the processing unit 12 increments the consecutive days count value of the consecutive days counter by 1, indicating that the overload event occurs continuously for 1 day, and uses 0:00 on January 2nd as the initial time. At 0:00 on January 3rd, if the overload event occurs between 0:00 on January 2nd and 0:00 on January 3rd, the processing unit 12 increments the consecutive days count value of the consecutive days counter by 1 again, indicating that the overload event occurs continuously for 2 days, and so on.

[0040] Refer to Figure 1 、 4 , for the periodic system management interrupt program of the embodiment of the processing unit clock frequency adjustment method of the server of the present invention, the periodic system management interrupt program is performed during the execution stage of the server 1. The following describes the steps included in the periodic system management interrupt program.

[0041] In step 401, the processing unit 12 determines whether the count value of the consecutive days counter is greater than or equal to a predetermined value. When it is determined that the count value of the consecutive days counter is greater than or equal to the predetermined value, the process proceeds to step 402; when it is determined that the count value of the consecutive days counter is less than the predetermined value, the process proceeds to step 404.

[0042] It should be noted that, in this embodiment, the predetermined value is 5, which means determining whether the overload event occurs for more than 5 consecutive days, but not limited thereto.

[0043] In step 402, the processing unit 12 updates the flag value of the frequency adjustment flag to the first predetermined value.

[0044] In step 403, the processing unit 12 closes the periodic system management interrupt program and triggers the overload event system management interrupt program.

[0045] In step 404, the processing unit 12 continuously executes the operating system.

[0046] Refer to Figure 1 、 5 For the clock frequency adjustment program of the embodiment of the method for adjusting the clock frequency of the processing unit of the server of the present invention, the clock frequency adjustment program is performed during the power-on self-test (POST) phase when the server 1 is powered on and starts up. The following describes the steps included in the clock frequency adjustment program.

[0047] In step 501, the processing unit 12 determines whether the flag value of the frequency adjustment flag is the first predetermined value. When it is determined that the flag value of the frequency adjustment flag is the first predetermined value, the process proceeds to step 502; when it is determined that the flag value of the frequency adjustment flag is not the first predetermined value, the process proceeds to step 503.

[0048] In step 502, the processing unit 12 increases the clock frequency during the current operation and updates the flag value of the frequency adjustment flag to the second predetermined value.

[0049] In step 503, the processing unit 12 decreases the clock frequency during the current operation.

[0050] It should be particularly noted that the processing unit 12 rises and falls according to the established hierarchy of the CPU Specification (SPEC). For example, the clock frequency of the processing unit 12 has a total of 1 to N levels, N>1. Each time the processing unit 12 increases or decreases by 1 level, it rises to the Nth level at most and drops to the 1st level at least.

[0051] In step 504, the processing unit 12 continues to power on.

[0052] It should be particularly noted that the steps included in the embodiments of the method for adjusting the clock frequency of the processing unit of the server of the present invention can be implemented by a Basic Input / Output System (hereinafter referred to as BIOS) program, and the BIOS program is stored in the storage unit 11 or in a flash memory electrically connected to the storage unit 11 and the processing unit 12.

[0053] In summary, for the method for adjusting the clock frequency of the processing unit of the server of the present invention, when the overload event occurs, the processing unit 12 generates and stores the occurrence time of the overload event in the storage unit 11, and triggers the overload event system management interrupt program to determine whether to update the count value of the consecutive days counter, and triggers the periodic system management interrupt program to determine whether to update the flag value of the frequency adjustment flag. When the overload event occurs continuously for the predetermined number of days, the processing unit 12 increases the clock frequency during the current operation to improve the performance of the processing unit 12; when the overload event does not occur continuously for the predetermined number of days, the processing unit 12 decreases the clock frequency during the current operation to save power. Therefore, the object of the present invention can be truly achieved.

[0054] However, the above are only the embodiments of the present invention, and the scope of implementation of the present invention cannot be limited thereby. All simple equivalent changes and modifications made according to the scope of the patent application of the present invention and the content of the patent specification still fall within the scope covered by the patent of the present invention.

Claims

1. A method for adjusting the clock frequency of a processing unit of a server, implemented by a server, the server comprising a storage unit and a processing unit electrically connected to the storage unit, the storage unit storing a frequency adjustment flag, a flag value of the frequency adjustment flag being one of a first predetermined value indicating that an overload event has occurred on the server for a predetermined number of consecutive days, and a second predetermined value different from the first predetermined value and indicating that the overload event has not occurred on the server for the predetermined number of consecutive days, characterized in that: The method comprises the following steps: (A) the processing unit determines whether the flag value of the frequency adjustment flag is the first predetermined value; (B) when it is determined that the flag value of the frequency adjustment flag is the first predetermined value, the processing unit increases the clock frequency during the current operation and updates the flag value of the frequency adjustment flag to the second predetermined value; and (C) When it is determined that the flag value of the frequency adjustment flag is not the first predetermined value, the processing unit reduces the clock frequency of the current operation Wherein, steps (A) to (C) are performed during the self-detection phase of the server startup.

2. The method for adjusting the clock frequency of a processing unit of a server according to claim 1, characterized in that: Before step (A), the following steps are also included: (D) when the overload event occurs, the processing unit generates and stores an overload event occurrence time in the storage unit; (E) the processing unit triggers an overload event system management interrupt program to determine whether to update a continuous day count value of a continuous day counter related to counting the number of consecutive days on which the overload event occurs based on the occurrence time of all overload events stored in the storage unit; and (F) the processing unit triggers a periodic system management interrupt program to determine whether to update the flag value of the frequency adjustment flag according to the continuous day count value of the continuous day counter; Wherein, steps (D) to (F) are performed during the execution phase of the server.

3. The method for adjusting the clock frequency of a processing unit of a server according to claim 2, wherein: The overload event system management interrupt procedure includes the following sub-steps: (E-1) the processing unit determines whether the storage unit stores an initial time; (E-2) when it is determined that the storage unit does not store the initial time, the processing unit stores the time when the overload event occurs as the initial time in the storage unit; (E-3) the processing unit determines whether the period from the initial time to a current time is greater than or equal to a predetermined time period; (E-4) when it is determined that the period from the initial time to the current time is greater than or equal to the predetermined time period, the processing unit determines whether the overload event occurs during the period from the initial time to the current time; (E-5) when it is determined that the overload event occurs during the period from the initial time to the current time, the processing unit updates the continuous day count value of the continuous day counter and turns off the overload event system management interrupt program; (E-6) when the overload event does not occur during the period from the initial time to the current time, the processing unit resets the continuous day count value of the continuous day counter; and (E-7) The processing unit uses the current time as the initial time.

4. The method for adjusting the clock frequency of a processing unit of a server according to claim 3, characterized in that: In sub-step (E-4), the processing unit determines whether the storage unit stores a target overload event occurrence time within the period from the initial time to the current time, so as to determine whether the overload event occurs within the period from the initial time to the current time. When it is determined that the storage unit stores the target overload event occurrence time, the processing unit determines that the overload event occurs within the period from the initial time to the current time. When it is determined that the storage unit does not store the target overload event occurrence time, the processing unit determines that the overload event does not occur within the period from the initial time to the current time.

5. The method for adjusting the clock frequency of a processing unit of a server according to claim 2, wherein: The periodic system management interruption procedure includes the following sub-steps: (F-1) the processing unit determines whether the continuous day count value of the continuous day counter is greater than or equal to a predetermined value; (F-2) when it is determined that the continuous day count value of the continuous day counter is greater than or equal to the predetermined value, the processing unit updates the flag value of the frequency adjustment flag to the first predetermined value; (F-3) The processing unit disables the periodic system management interrupt program and triggers the overload event system management interrupt program.

6. The method for adjusting the clock frequency of a processing unit of a server according to claim 1, wherein: The overload event is when a power consumption of the server exceeds a power limit.

7. The method for adjusting the clock frequency of a processing unit of a server according to claim 1, wherein: The clock frequency of the processing unit has 1~N levels, N>1, wherein in step (B), the processing unit increases by 1 level each time, and in step (C), the processing unit decreases by 1 level each time, with the highest level being N levels and the lowest level being 1 levels.