Power consumption perception pre-reading scheduling method and device, equipment and medium

By monitoring system power consumption and I/O load metrics in real time and dynamically selecting prefetch modes and strategies, the problem of balancing performance and energy consumption in existing prefetch technologies is solved, achieving an intelligent balance between performance and energy consumption in the storage system and extending device battery life.

CN121596985APending Publication Date: 2026-03-03成都芯忆联信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511797192.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

While existing read-ahead technologies improve data reading performance, they fail to effectively control system power consumption, especially under low load or random read load, resulting in ineffective power consumption, shortening device battery life, and limiting their application scope.

Method used

By acquiring system power consumption status and I/O load metrics in real time, the system dynamically selects a prefetch strategy that prioritizes performance, power consumption, or a balanced approach. This includes narrowing the prefetch window and performing prefetch I/O aggregation operations, thereby achieving an intelligent trade-off between performance and energy consumption.

Benefits of technology

It effectively reduces invalid prefetching and energy waste, extends device battery life, and is suitable for power-sensitive mobile and edge computing scenarios, solving the inherent defect of traditional prefetching technology that ignores energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121596985A_ABST
    Figure CN121596985A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption perception pre-reading scheduling method, device and equipment and a medium, and relates to the technical field of pre-reading, and the method comprises the steps: obtaining a power consumption state index and an I / O load index of a system in real time; based on the power consumption state index and the I / O load index, selecting a target pre-reading mode from a plurality of pre-defined pre-reading modes, the plurality of pre-reading modes at least comprising a performance priority mode and a power consumption priority mode; and executing a data pre-reading operation according to a pre-reading strategy corresponding to the target pre-reading mode. By monitoring system power consumption and I / O load indexes in real time, pre-reading modes such as performance priority and power consumption priority are dynamically selected, and differential pre-reading strategies are executed, so that intelligent balance between performance and energy consumption of the storage system is realized. The method can effectively reduce invalid pre-reading and energy waste, prolongs equipment endurance, is especially suitable for mobile and edge computing scenes sensitive to power consumption, and solves the inherent defect that the traditional pre-reading technology neglects energy efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of prefetching technology, and in particular to a power consumption-aware prefetching scheduling method, apparatus, device, and medium. Background Technology

[0002] In enterprise-level storage systems, read-ahead technology is widely used to improve data read performance. It effectively reduces read operation latency by predicting and loading potentially accessed data into the cache in advance.

[0003] Existing read-ahead algorithms generally focus on improving read-ahead hit rate and cache efficiency, aiming to maximize I / O performance. However, these methods have significant design limitations; their singular performance orientation does not adequately consider the overall energy consumption of the system.

[0004] Specifically, when the system is under low load or processing random read loads, a continuously aggressive read-ahead strategy will still frequently initiate I / O requests, preventing the storage device from entering a low-power state and resulting in wasted energy. This problem is particularly prominent in battery-powered mobile devices or edge computing scenarios, where traditional read-ahead mechanisms significantly shorten device battery life and limit their application scope. Summary of the Invention

[0005] This invention provides a power consumption-aware pre-read scheduling method, apparatus, device, and medium. The technical problem it aims to solve is: how to provide a pre-read method that can effectively control system power consumption while maintaining performance, so as to achieve an effective balance between input / output performance and system energy consumption.

[0006] In a first aspect, embodiments of the present invention provide a power-aware pre-read scheduling method, comprising: Real-time acquisition of system power consumption status indicators and I / O load indicators; Based on the power consumption status indicator and the I / O load indicator, a target prefetch mode is selected from a plurality of prefetch modes, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode; According to the pre-read strategy corresponding to the target pre-read mode, perform data pre-read operation.

[0007] A further technical solution is that the power consumption status indicators include at least one of the following: system power supply source, remaining battery power, and current power consumption status of the storage device; The I / O load metrics include at least one of the following: I / O request frequency, read-to-write ratio, and read-prefetch hit rate.

[0008] A further technical solution is that, based on the power consumption status indicator and the I / O load indicator, a target prefetch mode is selected from a plurality of prefetch modes, including: If the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, the system switches to the power consumption priority mode.

[0009] A further technical solution is that, if the target pre-read mode is a power-priority mode, the step of performing data pre-read operation according to the pre-read strategy corresponding to the target pre-read mode includes: Reduce the size of the read-ahead window, and / or perform read-ahead I / O aggregation operations.

[0010] A further technical solution is that the pre-read I / O aggregation operation includes: Multiple read-ahead requests awaiting issuance are temporarily stored; The multiple read-ahead requests are merged into a single aggregate I / O request; The aggregated I / O request is sent to the storage device.

[0011] A further technical solution is that the method further includes: The I / O load index and the power consumption status index are reacquired using a preset time period as the evaluation period. If the changes in the I / O load and power status indicators after reacquisition meet the prefetch mode switching conditions, then a switch from the current prefetch mode to the corresponding target prefetch mode will be triggered.

[0012] A further technical solution is that the multiple pre-read modes also include a balanced mode; the step of selecting a target pre-read mode from the predefined multiple pre-read modes based on the power consumption status index and the I / O load index includes: If the system power source is AC and the I / O load index is higher than the preset third preset threshold, switch to the performance priority mode; If the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

[0013] Secondly, embodiments of the present invention also provide a power-aware pre-read scheduling apparatus, which includes a unit for performing the above-described method.

[0014] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0016] This invention provides a power-aware prefetching scheduling method, apparatus, device, and medium. The method includes: acquiring system power consumption status indicators and I / O load indicators in real time; selecting a target prefetching mode from a plurality of predefined prefetching modes based on the power consumption status indicators and the I / O load indicators, wherein the plurality of prefetching modes includes at least a performance-priority mode and a power-priority mode; and performing data prefetching operations according to the prefetching strategy corresponding to the target prefetching mode. By monitoring system power consumption and I / O load indicators in real time, dynamically selecting performance-priority, power-priority, and other prefetching modes, and executing differentiated prefetching strategies, an intelligent trade-off between performance and energy consumption is achieved in the storage system. This invention effectively reduces ineffective prefetching and energy waste, extends device battery life, and is particularly suitable for power-sensitive mobile and edge computing scenarios, overcoming the inherent defect of traditional prefetching technologies that neglect energy efficiency. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a power-aware prefetching scheduling method provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0023] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0024] Please see Figure 1 This invention provides a power-aware pre-read scheduling method. By constructing a complete technical solution that includes system status monitoring, intelligent mode decision-making, and differentiated strategy execution, it achieves the core technical effect of fundamentally optimizing the energy efficiency of the storage system while ensuring its I / O performance. Specifically, the method includes the following steps: S1 acquires the system's power consumption status indicators and I / O load indicators in real time.

[0025] In practical implementation, real-time dynamic acquisition of system power consumption status indicators and I / O load indicators lays the data foundation for subsequent intelligent decision-making. This enables the pre-read system to fully perceive its own operating context and environmental constraints for the first time. Specifically, monitoring power consumption status indicators allows the system to clearly understand its energy supply status and the urgency of energy conservation. For example, sensing that the system is powered by a battery will naturally trigger sensitivity to energy consumption. Monitoring I / O load indicators allows the system to accurately grasp the current and recent data processing pressure and access pattern characteristics. For example, the system's busy level can be judged by the frequency of I / O requests, and the effectiveness of the existing pre-read strategy can be evaluated by the pre-read hit rate. This embodiment of the invention transforms the system's operating status into quantifiable decision parameters, breaking the limitation of traditional pre-read algorithms that only focus on access pattern prediction, and providing an objective and real-time basis for judging the trade-off between performance and power consumption, two often conflicting objectives.

[0026] In some preferred embodiments, the power consumption status indicators include at least one of the following: system power source, remaining battery power, and current power consumption status of the storage device; the I / O load indicators include at least one of the following: I / O request frequency, ratio of read operations to write operations, and pre-read hit rate.

[0027] In practice, power status indicators are specified as the system's power source, remaining battery power, and the current power status of the storage device, enabling the system to accurately assess its energy status from multiple dimensions. For example, knowing whether the power source is AC or battery can directly determine whether the system needs strict power control; knowing the remaining battery power helps in more refined energy budget management, such as adopting more extreme energy-saving strategies when the battery is extremely low; and understanding the power status of the storage device itself can prevent it from being interrupted by untimely read requests when it is about to enter a low-power state.

[0028] On the other hand, specifying I / O load metrics as I / O request frequency, read-write ratio, and prefetch hit rate allows the system to gain a deeper understanding of the characteristics of the current workload and the effectiveness of the prefetch strategy. High I / O request frequency usually means the system is busy and requires more aggressive prefetching; the read-write ratio affects the focus of the caching strategy; and the prefetch hit rate directly reflects the accuracy of the current prefetch algorithm. A low hit rate indicates that prefetching may be creating invalid I / O.

[0029] By comprehensively utilizing these specific and key indicators, the system's mode selection is no longer based on fuzzy inferences, but on a precise profile of the energy situation and load characteristics. This greatly improves the scientific nature of decision-making, avoids the blindness of mode switching, and ensures that the system can always find the most suitable balance between performance and power consumption.

[0030] S2, based on the power consumption status indicator and the I / O load indicator, select a target prefetch mode from a plurality of prefetch modes, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode.

[0031] In practical implementation, based on the aforementioned multi-dimensional power consumption status indicators and I / O load indicators, a target pre-read mode is selected from multiple predefined modes, including at least a performance-priority mode and a power-priority mode. This achieves a leap from static fixation to dynamic adaptation in the pre-read strategy. In this embodiment of the invention, the system switches between different pre-read modes according to the actual needs reflected by the monitoring data. For example, when the system is powered by external AC and handling heavy loads with high concurrency and strong sequentiality, the performance-priority mode is selected to fully utilize the sufficient energy supply to maximize data throughput and ensure the lowest possible service response latency. Conversely, when the system detects that it is powered by battery, in a low-load idle period, or has an extremely low pre-read hit rate indicating poor pre-read accuracy, it switches to the power-priority mode to actively suppress unnecessary performance overhead in order to prioritize battery life or reduce operating costs. This real-time status-based mode decision-making transforms the pre-read operation from blindly aggressive execution to goal-oriented, context-aware intelligent behavior, realizing a fundamental shift in the on-demand allocation of system resources.

[0032] In some preferred embodiments, the above step "selecting a target pre-read mode from a plurality of pre-defined pre-read modes based on the power consumption status index and the I / O load index" specifically includes the following steps: if the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, switch to the power consumption priority mode.

[0033] In practical implementation, when the system is powered by battery, this is the most direct power-sensitive signal. Regardless of the load, extending device battery life should be prioritized, making switching to power-priority mode an inevitable choice. When the I / O load index is below the first preset threshold, it indicates the system is under light load or idle. Continuing with an aggressive performance-priority prefetch strategy at this point will likely result in most prefetched data being unused, leading to read amplification and pure energy waste. Switching to power mode at this moment can promptly stop this ineffective prefetching behavior. When the prefetch hit rate is below the second preset threshold, it directly indicates a severe mismatch between the current prefetch prediction algorithm and the actual access pattern. Continuing to prefetch is extremely cost-effective, not only failing to improve performance but also wasting I / O bandwidth and storage device power. Switching to a conservative power mode at this point can immediately mitigate the damage. Through the logical combination of these three conditions, the system can keenly detect changes in multiple dimensions, from the external power supply environment to internal load efficiency, and automatically and quickly switch from a high-performance state to a low-power state, thereby maximizing overall system energy savings while ensuring basic functionality.

[0034] In some preferred embodiments, the plurality of prefetch modes further includes a balanced mode; the above step "selecting a target prefetch mode from a plurality of predefined prefetch modes based on the power consumption status index and the I / O load index" specifically includes the following steps: if the system power source is AC and the I / O load index is higher than a preset third preset threshold, switch to the performance priority mode; if the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

[0035] In practice, by introducing a balanced mode and further refining the switching conditions of the performance-first mode, a more refined and robust three-state decision model is constructed. This avoids the policy oscillations or performance mutations that may be caused by binary switching, which is either / or, and enables the system to achieve smoother and more reasonable state transitions under complex operating conditions.

[0036] This invention explicitly expands the prefetching mode to three types: performance-first, balanced, and power-first. The balanced mode, as an important intermediate state, plays a crucial role in bridging these three modes. It stipulates that the system switches to performance-first mode when the system power source is AC and the I / O load index exceeds a third preset threshold. This ensures that the system will only activate the most energy-intensive aggressive prefetching strategy under the dual conditions of sufficient external energy and sufficiently high internal processing pressure. This represents a cautious and conditional use of high-performance resources.

[0037] The stipulation that the system switches to Balanced Mode when powered by AC and the load is between the first and third preset thresholds is a precise definition of the normal operating state. In this state, the system does not need to pursue extreme speed at the expense of Performance Mode, nor does it need to exert extreme restraint as much as Power Mode. It can use the system's default, long-proven stable read-ahead parameters. This design prevents the system from jumping back and forth between Performance Mode and Power Mode directly when the load fluctuates slightly. Such jumping not only incurs additional mode switching overhead but may also cause I / O performance jitter, affecting the user experience. The existence of Balanced Mode provides the system with a stable safe zone or buffer, enabling the system to operate in a balanced and reliable manner under most normal loads.

[0038] The I / O load metrics include at least one of I / O request frequency, the ratio of read operations to write operations, and pre-read hit rate. Each I / O load metric corresponds to a first preset threshold, a second preset threshold, and a third preset threshold.

[0039] S3, perform data pre-reading operation according to the pre-reading strategy corresponding to the target pre-reading mode.

[0040] In practice, the corresponding pre-read strategy is executed according to the selected target pre-read mode, accurately translating the intelligent decision of the previous step into specific system behaviors that can generate actual energy-saving benefits or performance improvements. If the system decision enters the performance-first mode, the execution layer will adopt aggressive strategies such as expanding the pre-read window to load data into the cache as early as possible, significantly reducing the access latency of subsequent read requests and meeting the needs of high-performance applications. If the decision enters the power-first mode, the execution layer will activate corresponding energy-saving strategies, such as significantly reducing the pre-read window to reduce the amount of invalid data reads that may be caused by inaccurate pre-reading, directly reducing the energy consumption of reading and writing storage media and the occupation of cache space; furthermore, pre-read I / O aggregation operations can be performed to temporarily store and merge multiple scattered small requests into a small number of large requests before sending them out, which can significantly reduce the frequency of access to storage devices. The underlying principle is that the power consumption of storage devices (especially solid-state drives) is closely related to the number of commands that are woken up and processed. Frequent small requests will prevent the device from entering a low-power sleep state, while the merged large requests are not only more efficient in processing, but more importantly, they create a long continuous idle window for the device, allowing it to enter a deeper low-power state, thereby achieving a significant reduction in energy consumption from a physical perspective.

[0041] This invention enables storage systems to intelligently respond to dynamic changes in their power supply environment and workload, ensuring high performance when needed and precisely converging when low power consumption is required, ultimately successfully resolving the inherent contradiction in existing technologies where performance and power consumption are difficult to balance.

[0042] In some preferred embodiments, if the target prefetch mode is a power-priority mode, the above step "execute data prefetch operation according to the prefetch strategy corresponding to the target prefetch mode" specifically includes the following steps: reducing the size of the prefetch window, and / or, performing prefetch I / O aggregation operation.

[0043] In specific implementation, two core prefetch strategies are defined for use in the power-priority mode. The technical effect lies in translating the energy-saving decision into tangible energy reduction through targeted technical means. Reducing the size of the prefetch window is a direct method to reduce workload at the source. The prefetch window determines the amount of data read continuously in each prefetch operation. Reducing this window in power-priority mode means that the amount of data involved in each prefetch I / O request initiated by the system is less. This directly brings two energy-saving benefits: first, it reduces the total amount of data read from the storage medium, lowering the energy consumption of the storage controller and the medium itself during read / write operations; second, because the amount of data read is reduced, the amount of data stored in the cache is also reduced accordingly, which not only saves cache space but also reduces the potential background I / O overhead caused by subsequent cache management (such as eviction and swapping).

[0044] Furthermore, performing read-ahead I / O aggregation optimizes the I / O request scheduling. In traditional mode, multiple small read-ahead requests might be immediately and scattered to the storage device, frequently waking up devices in low-power states and preventing them from accumulating sufficient idle time to enter a deeper sleep state. Through I / O aggregation, the system temporarily stores multiple discrete, small-volume read-ahead requests generated over a period of time, merging them into a larger, continuous data request at the appropriate time and then sending it all at once. This significantly reduces the frequency of interaction with the storage device, allowing it to process more data during a single activation and thus gain longer, continuous idle time. This is crucial for storage devices, especially SSDs and HDDs with dynamic power management, to enter and maintain a low-power state. These two strategies complement each other, working together to ensure that in power-first mode, the system can maintain necessary read-ahead functionality while achieving a significant reduction in energy consumption.

[0045] In some preferred embodiments, the prefetch I / O aggregation operation includes: temporarily storing multiple prefetch requests to be sent; merging the multiple prefetch requests into a single aggregated I / O request; and sending the aggregated I / O request to the storage device.

[0046] In practice, the read-ahead I / O aggregation operation involves three consecutive steps: pausing, merging, and dispatching. Pausing multiple read-ahead requests to be dispatched is a prerequisite for aggregation. It creates a buffer period, allowing the system to reorganize and optimize upcoming I / O operations, rather than passively and immediately responding to each read-ahead instruction.

[0047] The core processing step is merging multiple read-ahead requests into a single aggregated I / O request. Essentially, this involves logically reorganizing multiple potentially randomly distributed small data block access requests into a larger, sequential data block access request. This merging operation perfectly suits the physical characteristics of modern storage media (such as NAND flash memory and traditional hard disks), which are far more efficient at processing sequential large blocks of data than at processing random small blocks. Therefore, the merged single aggregated request not only reduces protocol and addressing overhead but also improves the efficiency of the internal data processing flow of the storage device, thereby reducing the energy consumed to process a unit of data.

[0048] Finally, the aggregated I / O request is sent to the storage device, a step that realizes the efficiency improvement. Because the number of requests is significantly reduced, the burden on the storage device controller is lightened, and its active working time is relatively shortened. More importantly, frequent small requests prevent the device from entering a low-power state, while a single, concentrated large request allows the device to obtain a longer and more continuous idle period, creating excellent conditions for the device to enter a deeper, more power-efficient sleep state. In summary, the aggregation operation defined in this claim, by changing the spatiotemporal distribution characteristics of I / O requests, synergistically reduces the overall energy consumption of the storage subsystem from two dimensions: reducing the number of requests and improving the efficiency of a single request.

[0049] Furthermore, in balanced mode, the prefetch strategy is characterized by using the system's default prefetch parameters to perform data prefetching operations. This strategy does not actively adjust the size of the prefetch window, nor does it enable targeted input / output aggregation functions. Instead, it maintains a robust compromise, ensuring basic input / output performance while avoiding the introduction of additional energy consumption. It is suitable for scenarios where the system power supply is stable and the input / output load is under typical operating conditions.

[0050] In performance-first mode, the prefetch strategy is characterized by dynamically increasing the size of the prefetch window and employing a more aggressive prefetch algorithm. This strategy aims to maximize cache hit rate and I / O throughput by increasing the amount of data acquired in a single prefetch operation, significantly reducing data access latency to meet the extreme performance demands of high-load businesses. It is particularly suitable for enterprise-level storage systems powered by AC and handling high-intensity sequential read / write tasks.

[0051] The two read-ahead strategies and the power-first mode together constitute a complete dynamic decision-making system. By responding to real-time power consumption status indicators and input / output load indicators, the storage system achieves an adaptive balance between performance and energy consumption.

[0052] In some preferred embodiments, the method further includes: re-acquiring the I / O load index and the power consumption status index with a preset time period as the evaluation period; if the changes in the re-acquired I / O load index and power consumption status index meet the pre-read mode switching conditions, then triggering a switch from the current pre-read mode to the corresponding target pre-read mode.

[0053] In its implementation, a periodic feedback adjustment mechanism is introduced, giving the entire pre-read scheduling system dynamic adaptive capabilities. This allows it to continuously track changes in system state and respond promptly, ensuring that the power consumption and performance balance strategy remains optimal over the long term and avoiding strategy failure due to environmental changes after the initial decision. The system uses a preset time period as its evaluation cycle, periodically re-collecting I / O load and power status indicators to prevent judgments based on outdated information.

[0054] For example, a system might initially be in a power-priority mode due to a light load, but as new tasks flood in, the I / O load could surge within minutes. Without periodic feedback, the system would continue its conservative prefetch strategy, failing to meet the performance demands of new tasks and causing processing delays. Conversely, if the system fails to detect a load decrease in a timely manner when switching from high-performance mode, it will continue to generate invalid prefetches, wasting energy. The mechanism in this embodiment effectively solves this problem. Through periodic sampling, it continuously monitors the trend of indicator changes, and immediately triggers a mode switch once the reacquired indicators meet the conditions for mode switching. This means that the system's operating mode is not static but dynamically adjusted according to the ebb and flow of workload and changes in power supply conditions. This dynamic adaptability enables the technical solution to cope with the complex and ever-changing computing environments in the real world. Whether dealing with sudden traffic spikes in cloud data centers or handling intermittent user interactions on mobile devices, the system can self-adjust to always provide the prefetch service best suited to the current scenario, thereby achieving a long-term, stable, and efficient energy efficiency ratio.

[0055] This invention proposes a power-aware prefetch scheduling method, comprising: acquiring system power consumption status indicators and I / O load indicators in real time; selecting a target prefetch mode from a plurality of predefined prefetch modes based on the power consumption status indicators and the I / O load indicators, wherein the plurality of prefetch modes include at least a performance-priority mode and a power-priority mode; and performing data prefetch operations according to the prefetch strategy corresponding to the target prefetch mode. By monitoring system power consumption and I / O load indicators in real time, dynamically selecting performance-priority, power-priority, and other prefetch modes, and executing differentiated prefetch strategies, an intelligent trade-off between performance and energy consumption in the storage system is achieved. This invention can effectively reduce invalid prefetches and energy waste, extend device battery life, and is particularly suitable for power-sensitive mobile and edge computing scenarios, solving the inherent defect of traditional prefetch technologies that ignore energy efficiency.

[0056] Corresponding to the above power-aware prefetching scheduling method, the present invention also provides a power-aware prefetching scheduling apparatus. This power-aware prefetching scheduling apparatus includes a unit for executing the above-described power-aware prefetching scheduling method, and can be configured in a desktop computer, tablet computer, laptop computer, or other terminal. Specifically, the power-aware prefetching scheduling apparatus includes: The acquisition unit is used to acquire the system's power consumption status indicators and I / O load indicators in real time. The selection unit is configured to select a target prefetch mode from a plurality of prefetch modes based on the power consumption status index and the I / O load index, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode. The execution unit is used to perform data pre-reading operations according to the pre-reading strategy corresponding to the target pre-reading mode.

[0057] In some preferred embodiments, the power consumption status indicators include at least one of the following: system power source, remaining battery power, and current power consumption status of the storage device; The I / O load metrics include at least one of the following: I / O request frequency, read-to-write ratio, and read-prefetch hit rate.

[0058] In some preferred embodiments, selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, the system switches to the power consumption priority mode.

[0059] In some preferred embodiments, if the target prefetch mode is a power-priority mode, the step of performing data prefetching operation according to the prefetching strategy corresponding to the target prefetch mode includes: Reduce the size of the read-ahead window, and / or perform read-ahead I / O aggregation operations.

[0060] In some preferred embodiments, the read-ahead I / O aggregation operation includes: Multiple read-ahead requests awaiting issuance are temporarily stored; The multiple read-ahead requests are merged into a single aggregate I / O request; The aggregated I / O request is sent to the storage device.

[0061] In some preferred embodiments, it further includes: The evaluation unit is used to re-acquire the I / O load index and the power consumption status index at a preset time period. The triggering unit is used to trigger a switch from the current pre-read mode to the corresponding target pre-read mode if the changes in the reacquired I / O load indicators and power consumption status indicators meet the pre-read mode switching conditions.

[0062] In some preferred embodiments, the plurality of prefetch modes further includes a balanced mode; the step of selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system power source is AC and the I / O load index is higher than the preset third preset threshold, switch to the performance priority mode; If the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

[0063] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the power consumption-aware pre-read scheduling device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0064] The aforementioned power-aware read-ahead scheduling device can be implemented as a computer program, which can, for example... Figure 2 It runs on the computer device shown.

[0065] Please see Figure 2 , Figure 2This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.

[0066] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0067] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform a power-aware read-ahead scheduling method.

[0068] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0069] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform a power-aware read-ahead scheduling method.

[0070] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0071] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: Real-time acquisition of system power consumption status indicators and I / O load indicators; Based on the power consumption status indicator and the I / O load indicator, a target prefetch mode is selected from a plurality of prefetch modes, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode; According to the pre-read strategy corresponding to the target pre-read mode, perform data pre-read operation.

[0072] In some preferred embodiments, the power consumption status indicators include at least one of the following: system power source, remaining battery power, and current power consumption status of the storage device; The I / O load metrics include at least one of the following: I / O request frequency, read-to-write ratio, and read-prefetch hit rate.

[0073] In some preferred embodiments, selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, the system switches to the power consumption priority mode.

[0074] In some preferred embodiments, if the target prefetch mode is a power-priority mode, the step of performing data prefetching operation according to the prefetching strategy corresponding to the target prefetch mode includes: Reduce the size of the read-ahead window, and / or perform read-ahead I / O aggregation operations.

[0075] In some preferred embodiments, the read-ahead I / O aggregation operation includes: Multiple read-ahead requests awaiting issuance are temporarily stored; The multiple read-ahead requests are merged into a single aggregate I / O request; The aggregated I / O request is sent to the storage device.

[0076] In some preferred embodiments, the method further includes: The I / O load index and the power consumption status index are reacquired using a preset time period as the evaluation period. If the changes in the I / O load and power status indicators after reacquisition meet the prefetch mode switching conditions, then a switch from the current prefetch mode to the corresponding target prefetch mode will be triggered.

[0077] In some preferred embodiments, the plurality of prefetch modes further includes a balanced mode; the step of selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system power source is AC and the I / O load index is higher than the preset third preset threshold, switch to the performance priority mode; If the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

[0078] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0079] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0080] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: Real-time acquisition of system power consumption status indicators and I / O load indicators; Based on the power consumption status indicator and the I / O load indicator, a target prefetch mode is selected from a plurality of prefetch modes, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode; According to the pre-read strategy corresponding to the target pre-read mode, perform data pre-read operation.

[0081] In some preferred embodiments, the power consumption status indicators include at least one of the following: system power source, remaining battery power, and current power consumption status of the storage device; The I / O load metrics include at least one of the following: I / O request frequency, read-to-write ratio, and read-prefetch hit rate.

[0082] In some preferred embodiments, selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, the system switches to the power consumption priority mode.

[0083] In some preferred embodiments, if the target prefetch mode is a power-priority mode, the step of performing data prefetching operation according to the prefetching strategy corresponding to the target prefetch mode includes: Reduce the size of the read-ahead window, and / or perform read-ahead I / O aggregation operations.

[0084] In some preferred embodiments, the read-ahead I / O aggregation operation includes: Multiple read-ahead requests awaiting issuance are temporarily stored; The multiple read-ahead requests are merged into a single aggregate I / O request; The aggregated I / O request is sent to the storage device.

[0085] In some preferred embodiments, the method further includes: The I / O load index and the power consumption status index are reacquired using a preset time period as the evaluation period. If the changes in the I / O load and power status indicators after reacquisition meet the prefetch mode switching conditions, then a switch from the current prefetch mode to the corresponding target prefetch mode will be triggered.

[0086] In some preferred embodiments, the plurality of prefetch modes further includes a balanced mode; the step of selecting a target prefetch mode from a predefined plurality of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system power source is AC and the I / O load index is higher than the preset third preset threshold, switch to the performance priority mode; If the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

[0087] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0089] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0090] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0091] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0092] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0093] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0094] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A power-aware prefetching scheduling method, characterized in that, include: Real-time acquisition of system power consumption status indicators and I / O load indicators; Based on the power consumption status indicator and the I / O load indicator, a target prefetch mode is selected from a plurality of prefetch modes, wherein the plurality of prefetch modes include at least a performance priority mode and a power consumption priority mode; According to the pre-read strategy corresponding to the target pre-read mode, perform data pre-read operation.

2. The power consumption-aware pre-fetching scheduling method according to claim 1, characterized in that, The power consumption status indicators include at least one of the following: system power source, remaining battery power, and current power consumption status of storage device; The I / O load metrics include at least one of the following: I / O request frequency, read-to-write ratio, and read-prefetch hit rate.

3. The power consumption-aware pre-fetching scheduling method according to claim 1, characterized in that, The step of selecting a target prefetch mode from a predefined set of prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system is powered by battery, and / or the I / O load index is lower than a first preset threshold, and / or the pre-read hit rate is lower than a second preset threshold, the system switches to the power consumption priority mode.

4. The power consumption-aware pre-fetching scheduling method according to claim 1, characterized in that, If the target pre-read mode is a power-priority mode, the step of performing data pre-read operation according to the pre-read strategy corresponding to the target pre-read mode includes: Reduce the size of the read-ahead window, and / or perform read-ahead I / O aggregation operations.

5. The power consumption-aware pre-fetching scheduling method according to claim 4, characterized in that, The read-ahead I / O aggregation operation includes: Storing multiple pre-read requests that are yet to be issued; The multiple read-ahead requests are merged into a single aggregate I / O request; The aggregated I / O request is sent to the storage device.

6. The power consumption-aware pre-fetching scheduling method according to claim 1, characterized in that, The method further includes: The I / O load index and the power consumption status index are reacquired using a preset time period as the evaluation period. If the changes in the I / O load and power status indicators after reacquisition meet the prefetch mode switching conditions, then a switch from the current prefetch mode to the corresponding target prefetch mode will be triggered.

7. The power consumption-aware pre-fetching scheduling method according to claim 1, characterized in that, The plurality of prefetch modes also includes a balanced mode; the step of selecting a target prefetch mode from a plurality of predefined prefetch modes based on the power consumption status indicator and the I / O load indicator includes: If the system power source is AC and the I / O load index is higher than the preset third preset threshold, switch to the performance priority mode; If the system power source is AC and the I / O load index is between the first preset threshold and the third preset threshold, switch to the balanced mode, wherein the third preset threshold is higher than the first preset threshold.

8. A power-aware pre-fetching scheduling device, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.