Storage equipment energy-saving method and device, equipment, medium and product

By obtaining the activity status information of the I/O scheduling queue, the equipment pressure evaluation and energy-saving parameters are determined, which solves the problem of limited energy saving effect of storage devices and achieves efficient energy saving and economical operation.

CN120428842APending Publication Date: 2025-08-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410171457.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

Existing server storage devices have limited energy saving effects, resulting in high operating costs and the inability to achieve efficient energy saving without losing performance.

Method used

By obtaining the target I/O activity status information of the operating system's I/O scheduling queue in the preset clock cycle, performing device pressure evaluation, obtaining the energy-saving parameters of the target storage device, determining the energy-saving strategy based on the evaluation results and parameters, and performing energy-saving operations for the storage device.

Benefits of technology

The optimal balance between performance and power consumption is achieved, and the storage device can operate efficiently and economically during operation, maximizing energy savings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428842A_ABST
    Figure CN120428842A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a storage device energy saving method and device, equipment, a medium and a product. The method comprises the steps that target I / O activity state information of an I / O scheduling queue of a current operating system in a preset clock period is obtained, and a target storage device corresponding to the I / O scheduling queue is obtained; performing device pressure evaluation on the target storage device according to the target I / O activity state information to obtain a pressure evaluation result; obtaining an energy-saving parameter corresponding to the target storage device, wherein the energy-saving parameter is used for representing a power consumption adjustment index for the device; and determining an energy-saving strategy corresponding to the target storage device according to the pressure evaluation result and the energy-saving parameter, and executing an energy-saving operation for the target storage device according to the energy-saving strategy. According to the technical scheme provided by the embodiment of the invention, the optimal balance between the performance and the power consumption can be realized, and the storage equipment can operate in a high-efficiency and economical manner while the performance of the storage equipment is not lost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of device energy saving technology, and more specifically, to a storage device energy saving method, a storage device energy saving device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Currently, common server storage devices all have one or more different low-power modes. The power consumption mode is mainly controlled by the storage device itself based on the access situation within a period of time. For example, when there is no data access within a period of time, it first enters the low-power state A; if there is still no data access, it enters the even lower power state B, and so on; when there is a read or write request, it exits the low-power state. In actual application scenarios, the performance of the storage device is prioritized. Its power consumption setting is relatively conservative, and even the energy-saving feature is directly disabled. The energy-saving effect is limited, resulting in high operating costs. Summary of the Invention

[0003] Embodiments of the present application provide a storage device energy-saving method, a storage device energy-saving device, an electronic device, a computer-readable storage medium, and a computer program product, which can achieve an optimal balance between performance and power consumption, and enable the storage device to operate in an efficient and economical manner when working without sacrificing the performance of the storage device.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0005] According to one aspect of an embodiment of the present application, a storage device energy-saving method is provided, comprising: obtaining target I / O activity status information of an I / O scheduling queue of a current operating system within a preset clock cycle, and obtaining a target storage device corresponding to the I / O scheduling queue; performing a device stress assessment on the target storage device based on the target I / O activity status information to obtain a stress assessment result; obtaining energy-saving parameters corresponding to the target storage device, the energy-saving parameters being used to characterize a power consumption adjustment index for the device; determining an energy-saving strategy corresponding to the target storage device based on the pressure assessment result and the energy-saving parameters, and executing an energy-saving operation for the target storage device based on the energy-saving strategy.

[0006] According to one aspect of an embodiment of the present application, a storage device energy-saving device is provided, the device comprising: an acquisition module for acquiring target I / O activity status information of an I / O scheduling queue of a current operating system within a preset clock cycle, and acquiring a target storage device corresponding to the I / O scheduling queue; an evaluation module for performing a device stress evaluation on the target storage device based on the target I / O activity status information to obtain a stress evaluation result; the acquisition module is further used to acquire energy-saving parameters corresponding to the target storage device, the energy-saving parameters being used to characterize power consumption adjustment indicators for the device; an execution module for determining an energy-saving strategy corresponding to the target storage device based on the pressure evaluation result and the energy-saving parameters, and executing energy-saving operations for the target storage device based on the energy-saving strategy.

[0007] In one embodiment of the present application, the acquisition module is further used to traverse multiple I / O scheduling queues in the current operating system within the current queue acquisition cycle; obtain the I / O activity status information of the target I / O scheduling queue currently traversed; if the next queue acquisition cycle is reached, traverse multiple I / O scheduling queues in the current operating system within the next queue acquisition cycle to obtain the I / O activity status information of the target I / O scheduling queue within the next queue acquisition cycle; generate the target I / O activity status information within the preset clock cycle based on the I / O activity status information of the target I / O scheduling queue acquired within multiple queue acquisition cycles.

[0008] In one embodiment of the present application, the acquisition module is further used to obtain device information of the target I / O scheduling queue, wherein each storage device corresponds to an independent scheduling queue; determine the queue depth of the target I / O scheduling queue based on the request information in the target I / O scheduling queue, and the queue depth is used to reflect the load status of the device; and generate I / O activity status information of the target I / O scheduling queue based on the device information, the request information and the queue depth.

[0009] In one embodiment of the present application, the evaluation module is further used to extract the device type of the target storage device and the queue depth of the I / O scheduling queue from the target I / O activity status information; if the queue depth continues to maintain the specified depth within the preset clock cycle, the device pressure is determined to be no pressure; if the queue depth does not continue to maintain the specified depth within the preset clock cycle, the device pressure of the target storage device is evaluated according to the device type and the depth value of the queue depth to obtain a pressure evaluation result.

[0010] In one embodiment of the present application, the evaluation module is further used to determine multiple queue depths within the preset clock cycle based on the total number of queue depths within the preset clock cycle if the device type is a solid-state drive type; when the depth values of the multiple queue depths are all greater than a first preset proportion of the maximum depth value, determine the pressure level of the device pressure based on the correspondence between the depth values of the multiple queue depths and the pressure level, and the pressure level is positively correlated with the queue depth value.

[0011] In one embodiment of the present application, the evaluation module is further used to obtain the I / O request type of the I / O scheduling queue when the depth values of the multiple queue depths are all less than a first preset proportion of the maximum depth value; if the I / O request type is not a read-write type, then the pressure level of the device pressure is determined to be a first pressure level; if the I / O request type is a read-write type, then the pressure level of the device pressure is determined to be a second pressure level, and the second pressure level is greater than the first pressure level.

[0012] In one embodiment of the present application, the pressure assessment result includes the pressure level of the target storage device; the execution module is further used to determine multiple adjustable power consumption modes of the target storage device based on the energy-saving parameters; determine the target power consumption mode of the target storage device based on the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device; determine the sending density of I / O requests in the I / O scheduling queue sent to the target storage device based on the energy-saving parameters; and generate the energy-saving strategy based on the target power consumption mode and the sending density.

[0013] In one embodiment of the present application, the execution module is further used to determine that the power consumption mode of the target storage device is an initial power consumption mode based on the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device; predict the pressure of the target storage device in a future time period based on the target I / O activity status information; and adjust the initial power consumption mode based on the prediction result to obtain the target power consumption mode of the target storage device.

[0014] In one embodiment of the present application, the execution module is further used to extract the request type of the I / O request in the I / O scheduling queue from the target I / O activity status information; if the request type includes the target request type, and the proportion of I / O requests of the target request type exceeds a preset proportion threshold of the total number of I / O requests in the I / O scheduling queue, then it is predicted that the device pressure of the target storage device in the future time period is an increasing type, wherein the target request type includes at least one of a pre-read type and a cache synchronization type.

[0015] In one embodiment of the present application, the energy-saving parameters include the waiting time when issuing an I / O request; the execution module is further used to obtain the operating mode of the current operating system, and adjust the waiting time according to the operating mode to obtain a target waiting time; according to the target waiting time, adjust the sending density of the I / O requests in the I / O scheduling queue sent by the I / O scheduler to the target storage device.

[0016] In one embodiment of the present application, the execution module is further used to obtain the queue depth of the I / O scheduling queue if the operating mode is the balanced mode, and when the queue depth of the I / O scheduling queue is less than a preset depth threshold, increase the waiting time to obtain the target waiting time; if the operating mode is the energy-saving mode, increase the waiting time to obtain the target waiting time.

[0017] In one embodiment of the present application, the execution module is further used to send a command request to the target storage device to enter the target power consumption mode, or configure the file node corresponding to the target storage device, and adjust the current power consumption mode of the target storage device to the target power consumption mode by reading and writing the file node; control the I / O scheduler to send the I / O requests in the I / O scheduling queue based on the sending density when the target waiting time is reached.

[0018] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the storage device energy saving method as described above.

[0019] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor of an electronic device, the electronic device executes the storage device energy saving method as described above.

[0020] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the storage device energy saving method as described above.

[0021] In the technical solution provided in the embodiments of the present application, by obtaining the target I / O activity status information of the I / O scheduling queue of the current operating system within a preset clock cycle, and obtaining the target storage device corresponding to the I / O scheduling queue, the actual I / O business situation in the operating system is known, and the device pressure assessment is performed on the target storage device according to the target I / O activity status information to obtain a pressure assessment result, and then the energy-saving parameters corresponding to the target storage device are obtained, and the energy-saving parameters are used to characterize the power consumption adjustment index for the device; the energy-saving strategy corresponding to the target storage device is determined according to the pressure assessment result and the energy-saving parameters; that is, the energy-saving strategy is determined in combination with the actual I / O pressure situation and the relevant energy efficiency characteristics to achieve the best balance between performance and power consumption, and maximize the energy saving of the storage device without losing the performance of the storage device, and then perform energy-saving operations on the target storage device according to the energy-saving strategy, so that the storage device can operate in an efficient and economical manner when working, thereby achieving the purpose of server energy saving.

[0022] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. Obviously, the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0024] Figure 1 It is a schematic diagram of an implementation environment involved in this application;

[0025] Figure 2 is a flow chart of a storage device energy saving method shown in an exemplary embodiment of the present application;

[0026] Figure 3 is a flow chart of a storage device energy saving method shown in an exemplary embodiment of the present application;

[0027] Figure 4 is a flow chart of a storage device energy saving method shown in an exemplary embodiment of the present application;

[0028] Figure 5 is a flow chart of another storage device energy saving method shown in an exemplary embodiment of the present application;

[0029] Figure 6 is a flow chart of another storage device energy saving method shown in an exemplary embodiment of the present application;

[0030] Figure 7 is a flow chart of another storage device energy saving method shown in an exemplary embodiment of the present application;

[0031] Figure 8 is a flow chart of another storage device energy saving method shown in an exemplary embodiment of the present application;

[0032] Figure 9 is a flow chart of a storage device energy saving method shown in another exemplary embodiment of the present application;

[0033] Figure 10 is a general flow chart of energy saving of a storage device according to another exemplary embodiment of the present application;

[0034] Figure 11 is a flowchart of obtaining I / O information shown in an exemplary embodiment of the present application;

[0035] Figure 12 is a flow chart of an SSD power consumption strategy shown in an exemplary embodiment of the present application;

[0036] Figure 13 is a structural block diagram of a storage device energy-saving device shown in another exemplary embodiment of the present application;

[0037] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0038] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0039] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0040] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0041] It should also be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0042] The technical solutions of the embodiments of the present application relate to the field of cloud technology. Before introducing the technical solutions of the embodiments of the present application, a brief introduction to cloud technology is first given.

[0043] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called the "cloud." To users, the resources in the cloud appear infinitely scalable, readily accessible, usable on demand, and scalable at any time, with a pay-per-use policy.

[0044] Cloud storage is a new concept that has been extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0045] Currently, storage systems utilize a method for creating logical volumes. When creating a logical volume, physical storage space is allocated for each logical volume. This physical storage space may consist of disks on a specific storage device or several storage devices. When a client stores data on a logical volume, it stores the data on a file system. The file system divides the data into multiple parts, each of which is an object. An object contains not only the data but also additional information such as the data identifier (ID) of the data entity. The file system writes each object to the physical storage space of the logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can provide access to the data based on the storage location information of each object.

[0046] Based on the above-mentioned cloud storage, the storage devices in the embodiments of the present application can be combined to work together through application software or application interfaces to form a storage system, and the corresponding data is stored in the physical storage space of the storage device, and then the upper layer can interact with the storage device to read or write data in the storage space.

[0047] The technical solutions of the embodiments of the present application also involve the field of artificial intelligence (AI) technology. Before introducing the technical solutions of the embodiments of the present application, a brief introduction to AI technology is given. AI is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, AI is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. AI is the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0048] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of AI and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0049] The technical solution of the embodiment of the present application specifically involves machine learning technology in AI, specifically an I / O model trained based on machine learning technology, and then using the I / O model to predict the pressure of the storage device.

[0050] The following is a detailed introduction to the technical solutions of the embodiments of the present application in combination with the above technologies:

[0051] See also Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment involved in the present application, wherein the implementation environment includes a server 10 running an operating system 110 , the server may be configured with a processing device 120 , and may further be configured with a storage device 130 .

[0052] Among them, the processing device of the server is used to obtain the target I / O activity status information of the I / O scheduling queue of the current operating system within a preset clock cycle, and obtain the target storage device corresponding to the I / O scheduling queue, and then perform device stress assessment on the target storage device according to the target I / O activity status information to obtain a stress assessment result; obtain the energy-saving parameters corresponding to the target storage device, the energy-saving parameters are used to characterize the power consumption adjustment index of the device, and then determine the energy-saving strategy corresponding to the target storage device according to the pressure assessment result and the energy-saving parameters, and execute energy-saving operations for the target storage device according to the energy-saving strategy.

[0053] The storage device can also be a hard disk in the server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This does not restrict this.

[0054] In one example, the storage device may be independent of the server, such as a hard disk in a smartphone, tablet, laptop, computer, intelligent voice interaction device, smart home appliance, vehicle-mounted terminal, aircraft, or other terminal.

[0055] In other embodiments of the present application, the storage device energy-saving method can also be independently applied to a terminal running an operating system, whereby the terminal obtains target I / O activity status information, determines an energy-saving strategy corresponding to the target storage device, and executes corresponding energy-saving operations.

[0056] In the embodiment of the present application, it can be applied to various application scenarios. If the storage device is a solid-state hard disk in a vehicle-mounted terminal, the storage device stores driving videos recorded in the vehicle's driving recorder, and the vehicle is deployed with a Linux operating system, then the target I / O activity status information of the I / O scheduling queue of the Linux operating system within a preset clock cycle is obtained, and then the device pressure of the target storage device is evaluated, and the energy-saving strategy corresponding to the target storage device is determined to achieve energy saving for the solid-state hard disk.

[0057] It should be noted that in the specific implementation of this application, if at least one of the I / O scheduling queue, I / O activity status information and energy-saving parameters involves object-relatedness, then when the embodiment of this application is applied to a specific product or technology, it is necessary to obtain object permission or consent, and the collection, use and processing of relevant data need to comply with the relevant regulations and standards of relevant countries and regions.

[0058] The following describes in detail the various implementation details of the technical solutions of the embodiments of the present application:

[0059] like Figure 2 As shown, Figure 2 This is a flowchart of a storage device energy saving method according to an embodiment of the present application. The method can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 The storage device energy saving method may be executed by the server shown in FIG. 2 , and may include steps S210 to S240, which are described in detail as follows:

[0060] S210: Obtain target I / O activity status information of an I / O scheduling queue of the current operating system within a preset clock cycle, and obtain a target storage device corresponding to the I / O scheduling queue.

[0061] It can be understood that the operating system (OS) is a computer program that manages and controls computer hardware and software resources. It is the most basic system software that runs directly on the computer. Any other software must be supported by the operating system to run. In the embodiment of the present application, the current operating system can be a Linux operating system, a Windows operating system, a Chrome OS, etc. The I / O scheduling queue is a queue used to manage I / O requests so that these requests can be executed in a certain order, thereby improving the efficiency of I / O operations. In other words, the I / O scheduling queue includes one or more I / O requests, and an I / O request refers to a request for input / output (I / O) operations issued by a device or application to the operating system, such as an I / O request is a request for an application to exchange data with a storage device.

[0062] The target I / O activity status information of an I / O scheduling queue within a preset clock cycle is used to reflect the I / O load and performance within a certain time window. This I / O activity status information includes, but is not limited to, queue length, request type, request size, request latency, and other information that can characterize the I / O activity status. The preset clock cycle can be flexibly adjusted based on actual conditions and can include both the current time cycle and historical time cycles. In an operating system, the I / O scheduler is responsible for scheduling a group of I / O requests. Therefore, a server can obtain the target I / O activity status information corresponding to one or more I / O scheduling queues from the I / O scheduler.

[0063] It is worth noting that in an embodiment of the present application, an independent request queue is allocated to each storage device. Therefore, based on the queue identifier of the I / O scheduling queue, the device identifier associated with the queue identifier can be determined, and then the target storage device corresponding to the I / O scheduling queue can be determined.

[0064] S220 : Perform device pressure assessment on the target storage device according to the target I / O activity status information to obtain a pressure assessment result.

[0065] As described above, the I / O activity status information can reflect the I / O load and performance, while the target I / O activity status information is for the target storage device. The target I / O activity status information can then be used to perform a device stress assessment on the target storage device to obtain a stress assessment result. The stress assessment result includes the stress level of the target storage device. It can be understood that the more active the I / O activity status and the greater the I / O load, the greater the stress level of the target storage device.

[0066] S230: Obtain energy-saving parameters corresponding to the target storage device, where the energy-saving parameters are used to represent power consumption adjustment indicators for the device.

[0067] In an embodiment of the present application, the energy-saving parameter corresponding to the target storage device is used to characterize the power consumption adjustment index for the target storage device, and the power consumption adjustment index is used to determine the adjustment of the power consumption mode of the target storage device; wherein, the energy-saving parameter can be pre-set by the object for the device, or can be automatically determined by the server based on the device status of the target storage device, which is not limited here.

[0068] S240: Determine an energy-saving strategy corresponding to the target storage device according to the pressure assessment result and the energy-saving parameter, and perform an energy-saving operation on the target storage device according to the energy-saving strategy.

[0069] In an embodiment of the present application, the energy-saving strategy includes one or more energy-saving operations that adjust power consumption to achieve an energy-saving target, and the energy-saving strategy is determined by the pressure assessment results and the energy-saving parameters, so as to achieve the best balance between performance and power consumption; in one example, the energy-saving parameters can be dynamically adjusted according to the pressure assessment results, and then the energy-saving strategy for the target storage device can be determined based on the adjusted energy-saving parameters; in another example, the energy-saving strategy can also be determined in combination with the pressure assessment results and the energy-saving parameters, such as determining the first energy-saving strategy according to the pressure assessment results, and determining the second energy-saving strategy according to the energy-saving parameters, and then jointly determining the final energy-saving strategy.

[0070] After determining the energy-saving strategy, energy-saving operations can be executed for the target storage device. These energy-saving operations can be performed directly on the target storage device or on other devices, thereby affecting the target storage device's operations. If there are multiple energy-saving operations, and there is a logical order between the multiple energy-saving operations, the multiple operations are executed based on the logical order.

[0071] In an embodiment of the present application, by obtaining the target I / O activity status information of the I / O scheduling queue of the current operating system within a preset clock cycle, and obtaining the target storage device corresponding to the I / O scheduling queue, the actual I / O business situation in the operating system is known, and a device stress assessment is performed on the target storage device according to the target I / O activity status information to obtain a stress assessment result, and then the energy-saving parameter corresponding to the target storage device is obtained, and the energy-saving parameter is used to characterize the power consumption adjustment index for the device; the energy-saving strategy corresponding to the target storage device is determined according to the stress assessment result and the energy-saving parameter; that is, the energy-saving strategy is determined in combination with the actual I / O pressure situation and the relevant energy efficiency characteristics to achieve the best balance between performance and power consumption, and maximize the energy saving of the storage device without losing the performance of the storage device, and then perform energy-saving operations on the target storage device according to the energy-saving strategy, so that the storage device can operate in an efficient and economical manner when working, thereby achieving the purpose of server energy saving.

[0072] In one embodiment of the present application, another storage device energy saving method is provided, which can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 The server shown is executed as Figure 3 As shown, the storage device energy saving method is Figure 2 Based on the above, step S210 is expanded into S310 to S340. Steps S310 to S340 are described in detail as follows:

[0073] S310: traverse multiple I / O scheduling queues in the current operating system within the current queue collection cycle.

[0074] In an embodiment of the present application, the server can determine each queue collection cycle based on the parameters set by the object, and then obtain I / O activity status information within the queue collection cycle; wherein, the current operating system includes multiple independent I / O scheduling queues; if the current queue collection task is triggered based on time, multiple I / O scheduling queues are traversed within the current queue collection cycle, wherein, when traversing, the queue identifiers of the multiple I / O scheduling queues can be traversed in sequence, or the queue start time of the multiple I / O scheduling queues can be traversed in sequence.

[0075] S320: Obtain I / O activity status information of the currently traversed target I / O scheduling queue.

[0076] The currently traversed scheduling queue is used as the target I / O scheduling queue, and the I / O activity status information of the target I / O scheduling queue is obtained from the I / O scheduler, and then each I / O scheduling queue is traversed within the current queue collection cycle.

[0077] S330: If the next queue collection cycle is reached, multiple I / O scheduling queues in the current operating system are traversed in the next queue collection cycle to obtain I / O activity status information of the target I / O scheduling queue in the next queue collection cycle.

[0078] In one example, after traversing all I / O scheduling queues in the current queue collection cycle and obtaining the I / O activity status information of all I / O scheduling queues, the next queue collection cycle is reached after a preset time interval, and the I / O activity status information of each I / O queue is obtained again in the next queue collection cycle.

[0079] In another example, regardless of whether all scheduling queues are collected in the current queue collection cycle, according to the collection cycle time of each queue collection cycle, when the next queue collection is reached, the I / O activity status information of each I / O queue is obtained again in the next queue collection cycle; wherein, when traversing the queues in the next queue collection cycle, collection can start from the queues that have not been collected in the current queue collection cycle. For example, there are 5 I / O scheduling queues 1 to 5, and the I / O activity status information of queues 1 to 3 is collected in the current queue collection cycle, then in the next queue collection cycle, traversal and collection will start from queue 4.

[0080] S340 : Generate target I / O activity status information within a preset clock cycle based on the I / O activity status information of the target I / O scheduling queue acquired within at least one queue collection cycle.

[0081] In an embodiment of the present application, the server saves the I / O activity status information obtained in each queue collection cycle, and then combines the information collected in at least one queue collection cycle to generate target I / O activity status information; in one example, the I / O activity status information of each queue collection cycle can be used as the target I / O activity status information; or the I / O activity status information of some queue collection cycles in multiple queue collection cycles can be used as the target I / O activity status information, such as the I / O activity status information of the n queue collection cycles closest to the current time as the target I / O activity status information, where n is a positive integer and can be flexibly adjusted according to actual conditions.

[0082] In other embodiments, the server can determine the storage time of the information collected by the queue collection cycle according to the object settings, and can also determine the multiple queue collection cycles according to the object settings, such as using the information collected by the queue collection cycle within the storage time as the target I / O activity status information.

[0083] It should be noted that Figure 3 For more detailed information on steps S220 to S240, see Figure 2Steps S220 to S240 are shown and will not be described in detail here.

[0084] In an embodiment of the present application, the variable I / O scheduling queue obtains I / O activity status information in each queue collection cycle to ensure the orderliness of information acquisition, and then combines the information obtained in multiple queue collection cycles to generate activity status information within a preset clock cycle, so as to facilitate subsequent accurate evaluation of device pressure over a period of time and avoid randomness in the evaluation.

[0085] The present invention provides another method for energy saving of a storage device. The method can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 The server shown is executed as Figure 4 As shown, the storage device energy saving method is Figure 3 On the basis of , step S320 is expanded into steps S410 to S430. Steps S410 to S430 are described in detail as follows:

[0086] S410: Obtain device information of a target I / O scheduling queue, wherein each storage device corresponds to an independent scheduling queue.

[0087] As described above, each storage device corresponds to an independent scheduling queue, and the corresponding device information is obtained through the queue identifier of the target I / O scheduling queue. The device information includes the device identifier, device type, and the current device status of the device, such as working status, sleep status, etc.

[0088] S420: Determine the queue depth of the target I / O scheduling queue according to the request information in the target I / O scheduling queue. The queue depth is used to reflect the load status of the device.

[0089] In an embodiment of the present application, the request information in the target I / O scheduling queue includes the number of requests and the request size. The queue depth of the target I / O scheduling queue can be determined through the request information. The queue depth can reflect the load status of the device. For example, the larger the number of requests, the larger the request size, and the larger the queue depth, the greater the load on the device.

[0090] In an embodiment of the present application, the request information further includes a request type, which includes at least one of a read operation, a write operation, and a pre-read operation, where the pre-read operation is used to pre-load potentially required data into the cache.

[0091] S430: Generate I / O activity status information of the target I / O scheduling queue according to the device information, the request information, and the queue depth.

[0092] Device information such as device type, request type, and queue depth may be provided as I / O activity status information.

[0093] It should be noted that Figure 4 For a detailed description of steps S310, S330-S340, and S220-S240, see Figure 3 Steps S310, S330-S340, and S220-S240 are not described in detail here.

[0094] In an embodiment of the present application, I / O acquisition status information is generated by obtaining device information, request information and queue depth of the scheduling queue, thereby effectively capturing and analyzing the I / O activity status of the current system.

[0095] The present application also provides another storage device energy saving method, which can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 , as shown in the server to execute Figure 5 As shown, the storage device energy saving method is Figure 2 Based on the above, S220 is expanded to S510 to S530. Steps S510 to S530 are described in detail as follows:

[0096] S510: Extract the device type of the target storage device and the queue depth of the I / O scheduling queue from the target I / O activity status information.

[0097] S520: If the queue depth continues to maintain a specified depth within a preset clock cycle, it is determined that the device pressure is no pressure.

[0098] In an embodiment of the present application, the target I / O activity status information includes the device type of the target storage device and the queue depth of the I / O scheduling queue; wherein the device type of the storage device includes a mechanical hard disk type and a solid state disk type.

[0099] Among them, no matter what the device type of the storage device is, when it is detected that the queue depth continues to maintain a specified depth within a preset clock cycle, the specified depth can be 0, and the device pressure is directly determined to be no pressure; in one example, the device pressure is determined to be no pressure only when the queue depth continues to maintain the specified depth for a preset time.

[0100] S530: If the queue depth does not continuously maintain the specified depth within the preset clock cycle, evaluate the device pressure of the target storage device according to the device type and the depth value of the queue depth to obtain a pressure evaluation result.

[0101] When it is detected that the queue depth does not continuously maintain the specified depth within the preset clock cycle, the corresponding device pressure evaluation process is different depending on the device type. Therefore, it is necessary to evaluate the device pressure of the target storage device according to the device type and the depth value of the queue depth to obtain the pressure evaluation result.

[0102] Among them, if the device type is a mechanical hard disk type, as long as the device receives a command request, the magnetic head in the mechanical hard disk will rotate. Therefore, in the embodiment of the present application, there are only two pressure levels for the mechanical hard disk type storage device, namely the default pressure level and the no pressure level. When it is detected that the queue depth does not continue to maintain the specified depth within the preset clock cycle, it means that the queue contains a command request within the preset clock cycle, and the device pressure of the target storage device is determined to be the default pressure level.

[0103] It is worth noting that if the device type is a solid-state drive type, when it is detected that the queue depth does not continuously maintain the specified depth within the preset clock cycle, and the duration of continuously maintaining the specified depth does not reach the set time period, the device pressure of the target storage device is determined to be the lowest pressure level other than no pressure, and when the duration of continuously maintaining the specified depth reaches the set time period, the device pressure is determined to be no pressure; wherein, the set time period can be set by the object.

[0104] Then, multiple queue depths within the preset clock cycle are determined based on the total number of queue depths within the preset clock cycle; when the depth values of the multiple queue depths are all greater than a first preset proportion of the maximum depth value, the pressure level of the device pressure is determined based on the correspondence between the depth values of the multiple queue depths and the pressure level, and the pressure level is positively correlated with the queue depth value.

[0105] The number of queue depths within a preset clock cycle is the same as the number of queue collection cycles, that is, for the same I / O scheduling queue, the queue depth of the scheduling queue will be obtained in each queue collection cycle; since the queue depth value in each queue collection cycle may be different, in order to effectively capture and analyze the I / O activity status of the current system, it is necessary to determine multiple queue depths within the preset clock cycle based on the total number of queue depths, and the number of the multiple queue depths is less than the total number of queue depths within the preset clock cycle; for example, the number of multiple queue depths can be a preset ratio of the total number of queue depths. For example, if the queue depth is 9, 6 queue depths are determined.

[0106] The maximum depth value is the maximum value of all queue depth values within the preset clock cycle. The first preset proportion of the maximum depth value can be flexibly adjusted according to actual conditions. For example, if the first preset proportion is 40%, when the depth values of multiple queue depths are all greater than 40% of the maximum depth value, it is necessary to further determine the specific pressure level of the device pressure based on the correspondence between the depth values of the multiple queue depths and the pressure levels; for example, if the depth values of multiple queue depths are between the first preset proportion and the second preset proportion of the maximum depth value, the corresponding pressure level of the device pressure is the third pressure level; if the depth values of multiple queue depths are between the second preset proportion and the third preset proportion of the maximum depth value, the corresponding pressure level is the fourth pressure level; if the depth values of multiple queue depths are greater than the third preset proportion of the maximum depth value, the corresponding pressure level is the fifth pressure level.

[0107] In other embodiments of the present application, if the depth of multiple queues is greater than a first preset proportion of the maximum depth value within a preset clock cycle, the specific pressure level of the device pressure can also be determined based on the correspondence between the average of all queue depths in the queue and the pressure level; if the average of all queue depths is greater than the first depth threshold, the corresponding pressure level is determined to be the third pressure level; if it is greater than the second depth threshold, the corresponding pressure level is determined to be the fourth pressure level, and so on.

[0108] It is worth noting that for a solid-state drive device, when the depth values of multiple queue depths are all less than a first preset proportion of the maximum depth value, such as when the depth values of multiple queue depths of multiple queues are between 0 and 40% of the maximum depth value, it is necessary to obtain the I / O request type of the I / O scheduling queue, and then determine the pressure level of the device pressure based on the I / O request type.

[0109] If the I / O request type is not a read-write type, it means that the read-write pressure of the target storage device is relatively small, and only operations such as drive letter checks are performed regularly. Therefore, the pressure level of the device pressure can be determined to be the first pressure level; if the I / O request type is a read-write type, the read-write pressure of the target storage device is relatively large, and the pressure level of the device pressure is determined to be the second pressure level, which is greater than the first pressure level.

[0110] It should be noted that Figure 5 For more details on steps S210, S230 to S240, see Figure 2 Steps S210, S230-S240 shown in FIG will not be repeated here.

[0111] In an embodiment of the present application, different pressure assessment methods are used for different types of storage devices. For solid-state drive type storage devices, the pressure level corresponding to the queue depth and maximum depth value within a preset period is further assessed based on the relationship between the queue depth and the maximum depth value, and the I / O request type is combined to ensure the accuracy and reliability of the pressure assessment.

[0112] In one embodiment of the present application, another storage device energy saving method is provided. The storage device energy saving method can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 , as shown in the server to execute Figure 6 As shown, the storage device energy saving method is Figures 2 to 5 Based on the example shown in FIG, S240 is expanded to S610 to S640, wherein the pressure evaluation result includes the pressure level of the target storage device, which can be obtained by Figure 5 The pressure level is determined as shown; steps S610 to S640 are described in detail as follows:

[0113] S610: Determine multiple adjustable power consumption modes of a target storage device according to energy-saving parameters.

[0114] In an embodiment of the present application, for a storage device of the mechanical hard disk type, its corresponding power consumption mode cannot be adjusted, while for a storage device of the solid state disk type, multiple power consumption modes are configured, and the multiple power consumption modes can be switched and adjusted; wherein, the energy-saving parameters include power consumption energy-saving parameters acting on the target storage device, and the power consumption energy-saving parameters include an adjustable power consumption mode identifier of the target storage device, therefore, the multiple adjustable power consumption modes of the target storage device can be determined based on the power consumption energy-saving parameters.

[0115] S620: Determine a target power consumption mode of the target storage device according to the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device.

[0116] In one example, there are eight power consumption modes for solid-state drive-type storage devices. The target storage device has different corresponding power consumption modes depending on its stress level. The server pre-configures a correspondence between stress levels and power consumption modes, and then compares the target storage device's stress level with this correspondence to determine the target power consumption mode for the target storage device. The higher the stress level, the higher the corresponding power consumption. For example, if the stress level is the third stress level, the corresponding power consumption mode is power2 mode, and if the stress level is the fourth stress level, the corresponding power consumption mode is power1 mode. Devices in power2 mode consume less power than devices in power1 mode. When the stress level is zero, the corresponding power consumption mode is sleep mode.

[0117] S630: Determine the sending density of I / O requests in the I / O scheduling queue sent to the target storage device according to the energy-saving parameter.

[0118] It should be noted that the energy-saving parameters also include request-issuing energy-saving parameters that act on the I / O scheduler. These request-issuing energy-saving parameters are used to influence the density at which the I / O scheduler issues I / O requests to the target storage device. The density is determined based on the number of I / O requests issued each time and the time period during which the requests are issued. In one example, the request-issuing energy-saving parameters include a specific density at which I / O requests are issued to the target storage device. This ensures that under appropriate I / O pressure, the I / O scheduler can issue I / O requests at a lower density, allowing the target storage device to have more sleep time to save energy.

[0119] S640: Generate an energy-saving policy according to the target power consumption mode and the delivery density, and perform an energy-saving operation on the target storage device according to the energy-saving policy.

[0120] In an embodiment of the present application, a first energy-saving strategy for adjusting the current power consumption mode of the target storage device to the target power consumption mode is generated according to the target power consumption mode, and a second energy-saving strategy for adjusting the sending density of I / O requests sent by the I / O scheduler is generated according to the sending density, and then the first energy-saving strategy and the second energy-saving strategy are used as the energy-saving strategies of the target storage device.

[0121] It should be noted that Figure 6 For more details on steps S210 to S230, see Figure 2 Steps S210 to S230 are not described in detail here.

[0122] In the embodiment of the present application, an energy-saving strategy is generated through two aspects. On the one hand, the target power consumption mode of the device is determined through the correspondence between the pressure level and the power consumption mode. On the other hand, by influencing the issuance of requests to the device, the energy-saving effect of the device is improved while maintaining the effective performance of the device.

[0123] The present invention provides a method for energy saving of a storage device. The method for energy saving of a storage device includes the following steps: Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 The server shown is executed as Figure 7 As shown, the storage device energy saving method is Figure 6 Based on the above, S620 is expanded to S710 to S730. Steps S710 to S730 are described in detail as follows:

[0124] S710: Determine, based on the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device, that the power consumption mode of the target storage device is an initial power consumption mode.

[0125] In the embodiment of the present application, the pressure level of the target storage device is compared with the corresponding relationship to determine that the power consumption mode of the target storage device is the initial power consumption mode.

[0126] S720: Predict the pressure of the target storage device in a future time period according to the target I / O activity status information.

[0127] In the embodiment of the present application, the I / O activity status information can not only determine the current pressure status of the target storage device, but also predict the pressure of the target storage device in a future time period.

[0128] In one example, part of the I / O activity status information and stress level based on a preset clock cycle is used as a training set for a neural network model. The part of the I / O activity status information can be I / O activity status information that is far away from the current time, or it can be historical I / O activity status of historical clock cycles. The neural network model is a neural network model based on a time series. The I / O model is obtained by training based on the training set, and then the device stress is predicted through the I / O model, that is, the I / O activity status information that is close to the current time is used as the input of the I / O model, and the I / O model outputs the prediction result of the stress level of the target storage device in the future time period.

[0129] In another example, the target I / O activity status information includes the request type of the I / O request. If the request type of the I / O request includes the target request type, and the proportion of I / O requests of the target request type exceeds a preset proportion threshold of the total number of I / O requests in the I / O scheduling queue, it is predicted that the device pressure of the target storage device in the future time period is an increasing type, and the pressure level in the future time period is greater than the current pressure level, wherein the target request type includes at least one of a pre-read type and a cache synchronization type, and the cache synchronization type refers to a request type that synchronizes cached writes to the storage device; the preset proportion threshold can be flexibly adjusted according to actual conditions, such as the preset proportion threshold is 50%.

[0130] S730: Adjust the initial power consumption mode according to the prediction result to obtain a target power consumption mode of the target storage device.

[0131] Among them, the initial power consumption mode is adjusted according to the prediction results to obtain the target power consumption mode; for example, if the pressure level in the future time period is the same as the current pressure level, the initial power consumption mode is directly used as the target power consumption mode; if the pressure level in the future time period is greater than the current pressure level, it means that the equipment pressure will continue to increase, and the initial power consumption mode is increased by one power consumption level mode; if the pressure level in the future time period is less than the current pressure level, and the level difference is less than the preset level difference threshold, the initial power consumption mode can be directly used as the target power consumption mode. If the level difference is equal to or greater than the preset level difference threshold, it means that the equipment pressure will continue to decrease, and the initial power consumption mode can be reduced by one power consumption level mode.

[0132] It should be noted that Figure 7 For more detailed information on steps S210 to S230, S610, and S630 to S640, see Figure 6 Steps S210 to S230, S610, and S630 to S640 are shown and will not be described in detail here.

[0133] In an embodiment of the present application, when determining the target power consumption mode of the device, not only the actual I / O business within the clock cycle is taken into consideration, but also the I / O pressure in the future period is predicted, and then the current power consumption mode is adjusted in advance based on the predicted pressure, making the power consumption mode adjustment more accurate and reliable.

[0134] The embodiment of the present application provides another storage device energy saving method, which includes a method that can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 , as shown in the server to execute Figure 8 As shown, the storage device energy saving method is Figure 6 Based on this, S630 is expanded to S810-S820. The waiting time for issuing an I / O request in S630 is used to provide the I / O scheduler with a time to wait for new I / O requests to enter the queue for merging. This waiting time varies depending on the scheduling algorithm used by the I / O scheduler. Steps S810-S820 are described in detail below:

[0135] S810: Obtain the system mode of the current operating system, and adjust the waiting time according to the system mode to obtain a target waiting time.

[0136] In an embodiment of the present application, the operating mode of the current operating system can be obtained based on the object setting, and the operating mode includes performance mode, balanced mode and energy-saving mode. In the present application, the behavior of the I / O scheduler sending requests can be dynamically affected by setting the operating mode, that is, the waiting time determined based on the scheduling algorithm is adjusted to obtain the target waiting time; it can be understood that different operating modes have different ways of adjusting the waiting time, which can be flexibly adjusted according to actual conditions or object settings.

[0137] In one example, if the operating mode is balanced mode, the queue depth of the I / O scheduling queue is obtained, and when the queue depth of the I / O scheduling queue is less than a preset depth threshold, the waiting time is increased to obtain a target waiting time, wherein the preset depth threshold can be a preset percentage of the maximum depth of the I / O scheduling queue. For example, when the operating mode is balanced mode and the queue depth of the scheduling queue is less than 30% of the maximum depth, the specified time is added to the waiting time to obtain the target waiting time. The specified time can be flexibly adjusted according to actual conditions.

[0138] It should be noted that if the queue depth of the subsequent scheduling queue exceeds 30% of the maximum depth, the waiting time needs to be restored to the waiting time determined by the scheduling algorithm.

[0139] If the operation mode is the energy-saving mode, the waiting time is increased to obtain the target waiting time, that is, in the energy-saving mode, the waiting time is directly increased without considering other conditions.

[0140] If the operating mode is performance mode, the waiting time can be kept unchanged, that is, the waiting time is used as the target waiting time to obtain the best response performance.

[0141] S820: Adjust the density of the I / O requests in the I / O scheduling queue sent by the I / O scheduler to the target storage device according to the target waiting time.

[0142] As described above, the waiting time is used to provide the scheduling algorithm with time to wait for new I / O requests to enter the queue for merging. A longer target waiting time increases the latency of the current I / O scheduling, but also increases the probability of merging or overlapping I / O requests, which can reduce the I / O delivery density to a certain extent, thereby reducing throughput. Conversely, a shorter target waiting time reduces the latency of the current I / O scheduling, but increases the delivery density, thereby improving throughput.

[0143] In one example, the sending density is adjusted according to the target waiting time. Corresponding sending densities may be allocated to different waiting times in advance, and then the sending density corresponding to the target waiting time is determined.

[0144] In one example, in order to improve the utilization of the target storage device, in addition to the target waiting time, the number of I / O requests sent by the I / O scheduler to the target storage device each time and the time slice for each I / O request sent can also be affected, and the sending density can be adjusted by the time slice and the sending number.

[0145] It should be noted that Figure 8 For more detailed information on steps S210 to S230, S610 to S620, and S640, see Figure 6 Steps S210 to S230, S610 to S620, and S640 are shown and will not be described in detail here.

[0146] In an embodiment of the present application, based on the waiting time for the I / O scheduler to send a request, the waiting time is adjusted in combination with the operating mode of the current operating system, thereby dynamically affecting the behavior of the I / O scheduler to adjust the sleep time of the device, thereby ensuring the performance of the device and providing energy-saving effects for the device.

[0147] The embodiment of the present application provides another storage device energy saving method, which includes a method that can be applied to Figure 1 In the implementation environment shown, the method can be implemented by Figure 1 , as shown in the server to execute Figure 9 As shown, the storage device energy saving method is Figure 6 Based on the above, S640 is expanded into steps S910 to S930. Steps S910 to S930 are described in detail as follows:

[0148] S910: Generate an energy-saving strategy according to the target power consumption mode and the delivery density.

[0149] S920: Send a command request to the target storage device to enter the target power consumption mode, or configure a file node corresponding to the target storage device, and adjust the current power consumption mode of the target storage device to the target power consumption mode by reading and writing the file node.

[0150] In an embodiment of the present application, the server can directly send a specified command request to the target storage device, and then the target storage device parses the command request to perform power switching; for example, a target storage device of the mechanical hard disk type can send an ATA instruction of SET_IDLE.

[0151] In an embodiment of the present application, the sysfs file system provided by the Linux kernel can also be used to map some variables or registers in the driver to file nodes in the object space, so that the data in the driver can be accessed and modified by reading and writing files. This makes it convenient for object-state programs or commands to control the energy-saving parameters of the hard disk, such as modifying specific registers of the storage device to adjust the power consumption mode, without having to write a special driver or send a special command request; for example, the DEVICE_ATTR macro is used in the driver to declare a sysfs node and specify the node's name, permissions, read and write functions, etc. The read and write functions of the sysfs node are implemented in the driver, and the energy-saving parameters of the hard disk are set or obtained according to the data input by the object.

[0152] S930 : Control the I / O scheduler to send the I / O requests in the I / O scheduling queue based on the sending density when the target waiting time is reached.

[0153] In an embodiment of the present application, the server can send a control instruction to the I / O scheduler, and through the control instruction, the I / O scheduler is controlled to send the I / O requests in the I / O scheduling queue based on the sending density when the target waiting time is reached after the last I / O request is sent, thereby ensuring that under appropriate I / O pressure conditions, the I / O scheduler can send I / O requests at a lower density, thereby ensuring that the device can have more sleep time.

[0154] It should be noted that Figure 9 For more detailed information on steps S210 to S230 and S610 to S630, see Figure 6 Steps S210 to S230 and S610 to S630 are shown and will not be described in detail here.

[0155] In the embodiment of the present application, not only can the power consumption of the device be adjusted by sending commands, but the energy-saving parameters of the hard disk can also be adjusted through the configuration file node, thereby realizing the adjustment of the power consumption mode, ensuring the diversity of power consumption adjustment, and being applicable to various application scenarios. By controlling the behavior of the I / O scheduler to issue I / O requests, the energy-saving effect will be more significant.

[0156] For ease of understanding, the following is based on Figure 1 The implementation environment shown is used to describe in detail the energy-saving method for storage devices provided in the embodiment of the present application:

[0157] The storage device energy saving method provided in this embodiment is deployed on all servers running the Linux operating system and is not limited to specific scenarios. The server is configured with an acquisition module and an execution mode. The acquisition module is responsible for obtaining the information of the current I / O scheduling queue and passing the information to the execution module. The execution module performs specific energy saving operations according to the logic set by the parameter settings. Figure 10 As shown, the storage device energy saving method specifically includes:

[0158] S1001, system side read and write request.

[0159] S1002: The read and write requests are processed by the system I / O layer and placed into the I / O scheduling queue.

[0160] In an embodiment of the present application, in the architecture of the Linux operating system, I / O requests from the upper layer are inserted into a unified I / O scheduling queue according to certain rules (such as first-in-first-out, shortest seek time first, etc.). The I / O request can be a read and write instruction such as a file system, virtual memory, etc. The I / O scheduling queue corresponds to the storage device.

[0161] S1003: The acquisition module acquires I / O information within a certain time window.

[0162] By monitoring the dynamics of the I / O scheduling queue within a certain time window, we can effectively capture and analyze the current operating system's I / O activity. This data not only helps evaluate the current operating system's I / O activity, but also provides a basis for predicting storage device performance.

[0163] To comprehensively assess the system's I / O load over time, rather than just the momentary state, the system retains this periodically collected data. The data retention period is determined by the eval_cycle parameter set in the object state and can be adjusted based on different application scenarios. Furthermore, the acquisition module also determines the interval between two consecutive collections based on the cycle_interval_us parameter set in the object state, that is, the number of seconds between each collection.

[0164] Among them, I / O information includes the target device of the I / O request, the depth of the I / O scheduling queue and the type of I / O request; Figure 11 As shown, the acquisition module obtains I / O information specifically including:

[0165] Find all I / O scheduling queues in the operating system, sort them, randomly obtain one of the queues, and obtain the device information corresponding to the current scheduling queue. Since the Linux I / O subsystem allocates an independent request queue for each storage device, it is only necessary to detect the device information corresponding to the queue. Then obtain the queue depth of the current scheduling queue. If the queue depth is empty, that is, the queue depth is zero, it means there is no I / O activity. At this time, the current collection cycle will be terminated. If the queue depth is non-zero, obtain the I / O request type in the current scheduling queue. The request type can be determined by the I / O request identifier. For example, REQ_OP_READ: identifies the I / O request as a read operation; REQ_OP_WRITE: identifies the I / O request as a write operation; REQ_RAHEAD: identifies the I / O request as a pre-read operation.

[0166] Then, it is detected whether there are other scheduling queues. If there are other scheduling queues, the I / O requests of the other scheduling queues are continuously obtained. If there are no other scheduling queues, it is detected whether the next collection cycle has arrived. If not, the acquisition module is put into hibernation. In one example, it is also possible to detect whether the next collection cycle has arrived after obtaining the I / O information of the current scheduling queue.

[0167] The acquisition module determines the acquisition cycle of each acquisition queue according to the parameters set in the object state, and then acquires the I / O information within the preset clock cycle based on the I / O information of the acquisition scheduling queue within the acquisition cycle.

[0168] S1004: The execution module evaluates and makes decisions on I / O activities based on the acquired information and the set energy-saving parameters.

[0169] The set energy-saving parameters include power-saving parameters of the power consumption mode of the storage device. The execution module evaluates the I / O activity according to the acquired information and determines the power consumption mode of the storage device in combination with the power-saving parameters.

[0170] It is understandable that different storage devices have different power consumption modes, and the power consumption evaluation standards set for them are also different, and the corresponding specific power consumption execution actions are also different. Therefore, it is necessary to first obtain the device type of the storage device corresponding to the current queue. Among them, the specific device type varies depending on the application field of the storage device. Here, the commercial field is used as an example to illustrate. In the commercial field, the device type includes HHD (Hard Disk Drive, HDD) mechanical hard disk and SSD (Solid State Disk, SSD) solid state disk.

[0171] like Figure 12 As shown in the figure, for HHD mechanical hard disk storage devices, the HHD power consumption strategy includes:

[0172] Since HHDs don't have multiple power consumption modes, only two: starting and stopping the disk. Therefore, their strategy is relatively simple. If the queue depth remains at zero for a given clock cycle, the HHD is assumed to enter sleep mode, effectively stopping the disk head. The HHD automatically wakes up upon receiving a command request. Therefore, if the history queue is not zero, there's no need to wake the HHD. This clock cycle encompasses multiple acquisition cycles.

[0173] Continue to see Figure 12 As shown in the figure, for SSD solid-state drive storage devices, the SSD power consumption strategy includes:

[0174] According to the protocol, the power consumption mode of the SSD solid state drive device is set to 7 power consumption modes, represented by power0 to 6, and the corresponding power consumption is arranged from high to low.

[0175] First, the I / O information collected by the acquisition module is analyzed and the device stress is determined by evaluating the current and historical I / O loads. The SSD power consumption mode is then set based on the device stress.

[0176] If the queue depth remains at 0 within a clock cycle, the SSD is set to enter the low-power power5 mode.

[0177] When the queue depth within a clock cycle is less than 40% of the maximum depth and there is no read or write type in the command request, it is considered that the current read and write pressure of the storage device is small and it is only performing operations such as drive letter checks periodically. In this case, the SSD is set to enter power4 mode. Otherwise, it enters power3 mode.

[0178] When the queue depth within a clock cycle is between 40% and 60% of the maximum depth, the storage device is considered to be under moderate pressure, and the SSD is set to power2 mode.

[0179] If the queue depth is between 60% and 80 of the maximum depth within a clock cycle, it is considered that the storage device is under high pressure, and the SSD is set to power1 mode.

[0180] If the queue depth is greater than 80% within a clock cycle, it is considered that the storage device is under extremely high pressure and the SSD is set to power0 mode.

[0181] If the queue depth remains at 0 for ilde_max (a parameter set by the object) time, the SSD is set to enter power6 sleep.

[0182] It should be noted that after setting the power consumption mode of the SSD according to the device pressure, the embodiment of the present application can also predict the I / O pressure in the future period of time, and then adjust the power consumption mode; if it is found during statistics that the pre-read type and sync instructions account for more than 50% of the I / O types, it is expected that the system I / O pressure will continue to increase in the short term, and then the SSD will be set to a default higher gear mode based on the power consumption mode set according to the I / O load in advance; if the power consumption mode of the SSD is set to power3 mode according to the device pressure, it will be increased to power4 mode.

[0183] S1005: Influencing the I / O scheduler to issue a read / write request to a corresponding device.

[0184] It is understandable that the I / O scheduler optimizes the I / O scheduling queue based on the current algorithms and strategies, such as merging adjacent or overlapping requests, sorting requests, allocating time slices, etc., to reduce disk seek time and rotational delay, and improve disk utilization; and then dispatches the requests in the optimized I / O scheduling queue to the designated storage hard disk in a certain order, and the hard disk driver performs the actual read and write operations and returns the results and status.

[0185] Among them, in this application, the issuance behavior of the system I / O scheduler's issuance request can be dynamically influenced by adjusting parameters.

[0186] The I / O scheduler supports multiple I / O scheduling algorithms. For common I / O scheduling algorithms such as Completely Fair Queuing (CFQ) and BFQ (Budget Fair Queueing), there is a waiting time (slice_idle) when issuing I / O. This time is mainly used to provide the scheduling algorithm with a waiting time to see whether there are new I / O requests entering the queue for merging. Increasing this time usually increases the latency of the current I / O scheduling and reduces the throughput, but can reduce the number and density of I / O issuance to a certain extent. Therefore, by setting this time, the behavior of the current scheduling algorithm in issuing I / O requests can be adjusted to ensure that under appropriate I / O pressure conditions, the I / O scheduler can issue I / O requests at a lower density, ensuring that the device has more sleep time.

[0187] In the embodiment of the present application, by setting the power_mode node of the object state, the operating mode of the current system can be set, which is divided into: performance (performance mode), powersave (energy saving mode), and balanced (balanced mode).

[0188] When the object is set to performance mode, keep the default slice_idle unchanged to obtain the best responsiveness.

[0189] When the object is set to balanced mode, the slice_idle value is dynamically adjusted. When the queue depth is less than 30% of the maximum depth within the clock cycle, the slice_idle value is increased by 10% based on the original value. When the depth exceeds 30%, the default value is restored to ensure performance under high pressure.

[0190] When the object is set to powersave mode, slice_idle is kept increased by 10% based on the original value, which continuously affects the scheduler's next behavior.

[0191] S1006. Send a corresponding energy-saving command to the corresponding device.

[0192] There are two ways to implement the desired power consumption mode in the evaluation and decision-making process by interacting with the storage device in a manner specified by the Linux operating system:

[0193] a) Configure the file nodes exposed by the driver and adjust the energy-saving parameters of the hard disk through the file nodes. For example, some NVMe devices have a power driver path / sys / class / nvme / nvme0 / device / power / . You can use the exposed interface to set specific registers of the storage device to adjust the power consumption mode.

[0194] b) Send a special command request. For example, a mechanical hard disk can send the SET_IDLE ATA command, which is parsed by the hard disk master controller and performs the corresponding power switching work.

[0195] S1007: The storage device executes the corresponding request.

[0196] Here, we introduce an apparatus embodiment of the present application, which can be used to implement the storage device energy saving method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the storage device energy saving method of the present application.

[0197] The embodiment of the present application provides a storage device energy saving device, such as Figure 13 As shown, the storage device energy-saving device can be configured in a server, and the device includes:

[0198] An acquisition module 1310 is configured to acquire target I / O activity status information of an I / O scheduling queue of the current operating system within a preset clock cycle, and acquire a target storage device corresponding to the I / O scheduling queue;

[0199] An evaluation module 1320 is configured to perform a device stress evaluation on the target storage device according to the target I / O activity status information to obtain a stress evaluation result;

[0200] The acquisition module 1310 is further configured to acquire energy-saving parameters corresponding to the target storage device, where the energy-saving parameters are used to represent power consumption adjustment indicators for the device;

[0201] The execution module 1330 is configured to determine an energy-saving policy corresponding to the target storage device according to the pressure assessment result and the energy-saving parameter, and execute an energy-saving operation for the target storage device according to the energy-saving policy.

[0202] In one embodiment of the present application, based on the aforementioned scheme, the acquisition module is further used to traverse multiple I / O scheduling queues in the current operating system within the current queue acquisition cycle; obtain the I / O activity status information of the target I / O scheduling queue currently traversed; if the next queue acquisition cycle is reached, traverse multiple I / O scheduling queues in the current operating system within the next queue acquisition cycle to obtain the I / O activity status information of the target I / O scheduling queue within the next queue acquisition cycle; generate the target I / O activity status information within the preset clock cycle based on the I / O activity status information of the target I / O scheduling queue acquired within multiple queue acquisition cycles.

[0203] In one embodiment of the present application, based on the aforementioned scheme, the acquisition module is further used to obtain device information of the target I / O scheduling queue, wherein each storage device corresponds to an independent scheduling queue; determine the queue depth of the target I / O scheduling queue based on the request information in the target I / O scheduling queue, and the queue depth is used to reflect the load status of the device; and generate I / O activity status information of the target I / O scheduling queue based on the device information, the request information and the queue depth.

[0204] In one embodiment of the present application, based on the aforementioned scheme, the evaluation module is further used to extract the device type of the target storage device and the queue depth of the I / O scheduling queue from the target I / O activity status information; if the queue depth continues to maintain the specified depth within the preset clock cycle, the device pressure is determined to be no pressure; if the queue depth does not continue to maintain the specified depth within the preset clock cycle, the device pressure of the target storage device is evaluated according to the device type and the depth value of the queue depth to obtain a pressure evaluation result.

[0205] In one embodiment of the present application, based on the aforementioned scheme, the evaluation module is further used to determine multiple queue depths within the preset clock cycle based on the total number of queue depths within the preset clock cycle if the device type is a solid-state drive type; when the depth values of the multiple queue depths are all greater than a first preset proportion of the maximum depth value, determine the pressure level of the device pressure based on the corresponding relationship between the depth values of the multiple queue depths and the pressure level, and the pressure level is positively correlated with the queue depth value.

[0206] In one embodiment of the present application, based on the aforementioned scheme, the evaluation module is further used to obtain the I / O request type of the I / O scheduling queue when the depth values of the multiple queue depths are all less than a first preset proportion of the maximum depth value; if the I / O request type is not a read-write type, then the pressure level of the device pressure is determined to be a first pressure level; if the I / O request type is a read-write type, then the pressure level of the device pressure is determined to be a second pressure level, and the second pressure level is greater than the first pressure level.

[0207] In one embodiment of the present application, based on the aforementioned scheme, the pressure assessment result includes the pressure level of the target storage device; the execution module is further used to determine multiple adjustable power consumption modes of the target storage device based on the energy-saving parameters; determine the target power consumption mode of the target storage device based on the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device; determine the sending density of I / O requests in the I / O scheduling queue sent to the target storage device based on the energy-saving parameters; and generate the energy-saving strategy based on the target power consumption mode and the sending density.

[0208] In one embodiment of the present application, based on the aforementioned scheme, the execution module is further used to determine that the power consumption mode of the target storage device is an initial power consumption mode based on the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device; predict the pressure of the target storage device in a future time period based on the target I / O activity status information; and adjust the initial power consumption mode based on the prediction result to obtain the target power consumption mode of the target storage device.

[0209] In one embodiment of the present application, based on the aforementioned scheme, the execution module is further used to extract the request type of the I / O request in the I / O scheduling queue from the target I / O activity status information; if the request type includes the target request type, and the proportion of I / O requests of the target request type exceeds a preset proportion threshold of the total number of I / O requests in the I / O scheduling queue, then it is predicted that the device pressure of the target storage device in the future time period is of the growth type, wherein the target request type includes at least one of the pre-read type and the cache synchronization type.

[0210] In one embodiment of the present application, based on the aforementioned scheme, the energy-saving parameters include the waiting time when issuing an I / O request; the execution module is further used to obtain the operating mode of the current operating system, and adjust the waiting time according to the operating mode to obtain the target waiting time; according to the target waiting time, the I / O scheduler adjusts the sending density of the I / O requests in the I / O scheduling queue to the target storage device.

[0211] In one embodiment of the present application, based on the aforementioned scheme, the execution module is further used to obtain the queue depth of the I / O scheduling queue if the operating mode is the balanced mode, and when the queue depth of the I / O scheduling queue is less than a preset depth threshold, increase the waiting time to obtain the target waiting time; if the operating mode is the energy-saving mode, increase the waiting time to obtain the target waiting time.

[0212] In one embodiment of the present application, based on the aforementioned scheme, the execution module is further used to send a command request to the target storage device to enter the target power consumption mode, or configure the file node corresponding to the target storage device, and adjust the current power consumption mode of the target storage device to the target power consumption mode by reading and writing the file node; control the I / O scheduler to send the I / O requests in the I / O scheduling queue based on the sending density when the target waiting time is reached.

[0213] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.

[0214] An embodiment of the present application also provides an electronic device, comprising one or more processors and a storage device, wherein the storage device is used to store one or more computer programs, and when the one or more computer programs are executed by one or more processors, the electronic device implements the storage device energy saving method as described above.

[0215] Figure 14 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown.

[0216] It should be noted that Figure 14 The computer system 1400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application, wherein the electronic device can be a client or a server.

[0217] like Figure 14As shown, computer system 1400 includes a processor (Central Processing Unit, CPU) 1401, which can perform various appropriate actions and processes according to the program stored in read-only memory (Read-Only Memory, ROM) 1402 or the program loaded from storage part 1408 into random access memory (Random Access Memory, RAM) 1403, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in RAM 1403. CPU 1401, ROM 1402 and RAM 1403 are connected to each other via bus 1404. Input / output (I / O) interface 1405 is also connected to bus 1404.

[0218] In some embodiments, the following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, and the like; an output section 1407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1408 including a hard disk; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. Removable media 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is installed in the drive 1410 as needed, so that computer programs read therefrom can be installed into the storage section 1408 as needed.

[0219] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1409, and / or installed from the removable medium 1411. When the computer program is executed by the processor (CPU) 1401, the various functions defined in the system of the present application are executed.

[0220] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0221] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.

[0222] The units or modules described in the embodiments of the present application may be implemented in software or hardware, and the units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, limit the units or modules themselves.

[0223] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device.

[0224] Another aspect of the present application further provides a computer program product, the computer program product including a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the electronic device to perform the methods provided in the above-mentioned embodiments.

[0225] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0226] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

[0227] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A storage device energy saving method, characterized in that: include: Obtaining target I / O activity status information of an I / O scheduling queue of the current operating system within a preset clock cycle, and obtaining a target storage device corresponding to the I / O scheduling queue; Performing a device pressure assessment on the target storage device according to the target I / O activity state information to obtain a pressure assessment result; Obtaining energy-saving parameters corresponding to the target storage device, where the energy-saving parameters are used to represent power consumption adjustment indicators for the device; An energy-saving policy corresponding to the target storage device is determined according to the pressure assessment result and the energy-saving parameter, and an energy-saving operation is performed on the target storage device according to the energy-saving policy.

2. The method according to claim 1, characterized in that The obtaining of target I / O activity status information of the I / O scheduling queue of the current operating system within a preset clock cycle includes: Traversing multiple I / O scheduling queues in the current operating system within a current queue collection period; Get the I / O activity status information of the target I / O dispatch queue currently traversed; If the next queue collection cycle is reached, traversing multiple I / O scheduling queues in the current operating system within the next queue collection cycle to obtain I / O activity status information of the target I / O scheduling queue within the next queue collection cycle; The target I / O activity state information within the preset clock cycle is generated according to the I / O activity state information of the target I / O scheduling queue acquired within at least one queue acquisition cycle.

3. The method according to claim 2, characterized in that The obtaining of the I / O activity status information of the currently traversed target I / O dispatch queue includes: Obtaining device information of the target I / O scheduling queue, wherein each storage device corresponds to an independent scheduling queue; Determining a queue depth of the target I / O scheduling queue according to the request information in the target I / O scheduling queue, wherein the queue depth is used to reflect a load condition of the device; I / O activity status information of the target I / O scheduling queue is generated according to the device information, the request information, and the queue depth.

4. The method according to claim 1, wherein The evaluating the device pressure of the target storage device according to the target I / O activity state information to obtain a pressure evaluation result includes: Extracting the device type of the target storage device and the queue depth of the I / O scheduling queue from the target I / O activity status information; If the queue depth continuously maintains a specified depth within the preset clock cycle, determining that the device pressure is no pressure; If the queue depth does not continuously maintain the specified depth within a preset clock cycle, the device pressure of the target storage device is evaluated according to the device type and the depth value of the queue depth to obtain a pressure evaluation result.

5. The method according to claim 4, characterized in that The evaluating the device pressure of the target storage device according to the device type and the queue depth value to obtain a pressure evaluation result includes: If the device type is a solid state drive type, determining a plurality of queue depths within the preset clock cycle according to the total number of queue depths within the preset clock cycle; When the depth values of the multiple queue depths are all greater than a first preset proportion of the maximum depth value, the pressure level of the device pressure is determined according to the corresponding relationship between the depth values of the multiple queue depths and the pressure level, and the pressure level is positively correlated with the queue depth value.

6. The method according to claim 5, characterized in that The method further comprises: When the depth values of the multiple queue depths are all less than a first preset proportion of the maximum depth value, obtaining the I / O request type of the I / O scheduling queue; If the I / O request type is not a read-write type, determining the pressure level of the device pressure to be a first pressure level; If the I / O request type is a read-write type, the pressure level of the device pressure is determined to be a second pressure level, and the second pressure level is greater than the first pressure level.

7. The method according to any one of claims 1 to 6, characterized in that The pressure assessment result includes a pressure level of the target storage device; and determining an energy-saving strategy corresponding to the target storage device according to the pressure assessment result and the energy-saving parameter includes: determining a plurality of adjustable power consumption modes of the target storage device according to the energy-saving parameter; Determining a target power consumption mode of the target storage device according to a correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device; determining, according to the energy-saving parameter, a density of I / O requests in the I / O scheduling queue that are sent to the target storage device; The energy-saving strategy is generated according to the target power consumption mode and the delivery density.

8. The method according to claim 7, characterized in that The determining the target power consumption mode of the target storage device according to the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device includes: Determining, according to the correspondence between the pressure level and the power consumption mode and the pressure level of the target storage device, that the power consumption mode of the target storage device is an initial power consumption mode; predicting the pressure of the target storage device in a future time period according to the target I / O activity status information; The initial power consumption mode is adjusted according to the prediction result to obtain a target power consumption mode of the target storage device.

9. The method according to claim 8, characterized in that The predicting the pressure of the target storage device in a future time period according to the target I / O activity state information includes: Extracting a request type of the I / O request in the I / O scheduling queue from the target I / O activity state information; If the request type includes a target request type, and the proportion of I / O requests of the target request type exceeds a preset proportion threshold of the total number of I / O requests in the I / O scheduling queue, it is predicted that the device pressure of the target storage device in the future time period is an increasing type, wherein the target request type includes at least one of a pre-read type and a cache synchronization type.

10. The method according to claim 7, characterized in that The energy-saving parameter includes a waiting time when issuing an I / O request; and determining the issuance density of the I / O requests in the I / O scheduling queue issued to the target storage device according to the energy-saving parameter includes: Obtaining an operating mode of the current operating system, and adjusting the waiting time according to the operating mode to obtain a target waiting time; The sending density of the I / O requests in the I / O scheduling queue sent by the I / O scheduler to the target storage device is adjusted according to the target waiting time.

11. The method according to claim 10, characterized in that The adjusting the waiting time according to the operating mode to obtain a target waiting time includes: If the operation mode is the balanced mode, obtaining the queue depth of the I / O scheduling queue, and when the queue depth of the I / O scheduling queue is less than a preset depth threshold, increasing the waiting time to obtain the target waiting time; If the operation mode is the energy-saving mode, the waiting time is increased to obtain the target waiting time.

12. The method according to claim 10, characterized in that The performing the energy-saving operation on the target storage device according to the energy-saving policy includes: Sending a command request to the target storage device to enter the target power consumption mode, or configuring a file node corresponding to the target storage device, and adjusting the current power consumption mode of the target storage device to the target power consumption mode by reading and writing the file node; The I / O scheduler is controlled to send the I / O requests in the I / O scheduling queue based on the sending density when the target waiting time is reached.

13. A storage device energy saving device, characterized in that: include: An acquisition module is used to obtain target I / O activity status information of an I / O scheduling queue of the current operating system within a preset clock cycle, and to obtain a target storage device corresponding to the I / O scheduling queue; An evaluation module, configured to perform a device stress evaluation on the target storage device according to the target I / O activity status information to obtain a stress evaluation result; The acquisition module is further configured to acquire energy-saving parameters corresponding to the target storage device, where the energy-saving parameters are used to represent power consumption adjustment indicators for the device; An execution module is configured to determine an energy-saving strategy corresponding to the target storage device according to the pressure assessment result and the energy-saving parameter, and execute an energy-saving operation for the target storage device according to the energy-saving strategy.

14. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, causes the electronic device to execute the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 12.

16. A computer program product, characterized in that The computer program product includes a computer program stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, causing the electronic device to perform the method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Storage device awakening method and electronic device

    CN122470245A