A method, device, medium, product and memory system for adjusting hot page threshold

By calculating the load index and hyperparameters, the hot page threshold is dynamically adjusted, and the problems of hot page misjudgment and frequent page migration caused by static thresholds are solved, and the flexibility and performance improvement of memory management are achieved.

CN120371535BActive Publication Date: 2025-09-05JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510856379.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-05
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

In the prior art, the static hot page threshold cannot adapt to the dynamic system load, resulting in hot page misjudgment and frequent page migration, increasing access delay and resource waste.

Method used

By obtaining multiple load parameters of the memory system, determining hyperparameters with preset rules, dynamically adjusting the hot page threshold, including factors affecting bandwidth and ping-pong phenomena, to realize adaptive classification of hot pages and cold pages.

Benefits of technology

It improves the flexibility of memory management and overall system performance, reduces resource waste and repeated page migration, and improves access efficiency and system responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371535B_ABST
    Figure CN120371535B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, medium, product and memory system for adjusting the hot page threshold, which relates to the field of memory management technology. The method calculates the current load index by introducing multiple load parameters of the memory system, dynamically reflects the system operation status, and matches the preset hyperparameters according to the load index, including a first factor that affects the bandwidth and a second factor that suppresses the ping-pong phenomenon. The hot page threshold is adaptively calculated according to these hyperparameters, thereby realizing the dynamic classification of hot pages and cold pages. Compared with the method of using static thresholds to determine hot pages and cold pages, the present application can respond to changes in the memory system load in real time, suppress the waste of resources and repeated page migration caused by pseudo hot pages, solve the technical problems of hot page misjudgment and frequent page migration caused by improper setting of hot page thresholds, and achieve the technical effect of improving access efficiency, enhancing the flexibility of memory management and the overall performance of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of memory management technology, and in particular to a method, device, medium, product, and memory system for adjusting a hot page threshold. Background Art

[0002] In computer memory management systems, the hot page threshold serves as the critical value for distinguishing hot pages from cold pages. The rationality of its setting plays a decisive role in memory management effectiveness. If the hot page threshold is too high, a large number of actually active "hot pages" will be misidentified as "cold pages" and mistakenly swapped to slow disks. This will frequently trigger page faults and disk I / O (Input / Output) operations during business access, significantly increasing access latency. If the threshold is set too low, a large number of "pseudo-hot pages" will be misidentified as "hot pages," triggering unnecessary page migrations, resulting in inefficient consumption of network bandwidth, CPU (Central Processing Unit) resources, and even a "ping-pong phenomenon," where pages are repeatedly migrated between high-speed memory and external storage.

[0003] However, existing memory management techniques often use static threshold parameters as hot page thresholds to distinguish between "hot" and "cold" pages, such as fixed access frequencies or time windows. These static hot page thresholds cannot adapt to dynamic system loads. In scenarios like cloud computing and big data, where real-time memory management is crucial, the limitations of these static thresholds become increasingly apparent.

[0004] Therefore, there is an urgent need for a method that can dynamically adjust the hot page threshold to solve the drawbacks of the static hot page threshold and improve the flexibility of memory management and the overall system performance. Summary of the Invention

[0005] The present application provides a hot page threshold adjustment method, device, medium, product and memory system to at least solve the technical problems in the related art of solving the hot page misjudgment and frequent page migration caused by improper hot page threshold setting, thereby achieving the technical effect of improving access efficiency, enhancing the flexibility of memory management and the overall performance of the system.

[0006] The present application provides a method for adjusting a hot page threshold, comprising: obtaining at least two load parameters of a memory system, and calculating a load index based on the at least two load parameters; the load index characterizing the current load state of the memory system; determining, based on the load index and preset rules, a hyperparameter corresponding to the load index; the hyperparameter including a first factor affecting bandwidth and a second factor affecting a ping-pong phenomenon; calculating a hot page threshold based on the determined hyperparameters, and performing migration processing on memory pages based on the hot page threshold.

[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned methods for adjusting the hot page threshold when executing the computer program.

[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for adjusting the hot page threshold are implemented.

[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned methods for adjusting the hot page threshold when the computer program is executed by a processor.

[0010] The present application also provides a memory system, comprising the electronic device as described above.

[0011] Through this application, due to the introduction of multiple load parameters of the memory system to calculate the current load index, the system operation status is dynamically reflected, and the preset hyperparameters are matched according to the load index, including the first factor affecting the bandwidth and the second factor suppressing the ping-pong phenomenon. The hot page threshold is adaptively calculated according to these hyperparameters, thereby realizing the dynamic classification of hot pages and cold pages. Compared with the method of using static thresholds to determine hot pages and cold pages, this application can respond to changes in the memory system load in real time, suppress the waste of resources and repeated page migration caused by pseudo-hot pages, solve the technical problems of hot page misjudgment and frequent page migration caused by improper setting of hot page thresholds, and achieve the technical effect of improving access efficiency, enhancing the flexibility of memory management and the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 A general flow chart of a method for adjusting a hot page threshold provided in an embodiment of the present application;

[0014] Figure 2 An overall flow chart of a method for adjusting a hot page threshold provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0018] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0019] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0020] like Figure 1 , an embodiment of the present application provides a method for adjusting a hot page threshold, comprising:

[0021] S11: Obtain at least two load parameters of the memory system, and calculate a load index based on the at least two load parameters; the load index represents a current load state of the memory system.

[0022] Specifically, by collecting and comprehensively analyzing multiple key load parameters in the memory system, the current system load status is quantified, and a representative load index is calculated based on this, which is used for subsequent hot page threshold adjustment.

[0023] Specifically, the load parameters may include, but are not limited to, page access frequency, page residence time, page fault rate, CPU utilization, memory bandwidth occupancy, and other indicators that are highly correlated with memory pressure. By statistically analyzing these parameters within a preset time window, the current memory system usage intensity and operating status can be fully reflected. During the calculation process, multiple parameters are mapped into a unified load index based on the weight relationship of each load parameter or through an empirical model or training model. The higher the value of the load index, the heavier the current system load, the higher the page access activity, and the greater the memory pressure.

[0024] In an exemplary embodiment, the load index is calculated based on at least two load parameters, including: using the at least two load parameters and the weights corresponding to the load parameters. Calculate the load index; L is the load index, U CPU is the CPU utilization, U mem is the memory utilization, M is the number of target migration pages, mquota is the migration quota, P is the ping-pong ratio, and w1 is U CPU The corresponding weight, w2 is U mem The corresponding weights are: w3 is the weight corresponding to M / mquota, and w4 is the weight corresponding to P; load parameters include CPU utilization, memory utilization, number of target migration pages, migration quota, and ping-pong ratio.

[0025] The load index calculation method described in this embodiment is a weighted comprehensive model for quantitatively evaluating the system operation status, which aims to reflect the current overall load of the memory system by integrating multiple key load parameters. Among them, the load index L is a normalized value used to measure whether it is currently necessary to adjust the hot page threshold to optimize the migration strategy of the memory page. The index consists of four items, namely the utilization of the central processing unit, the memory utilization, the ratio of the number of target migration pages to the migration quota, and the ping-pong phenomenon ratio. Each item is linearly weighted by its corresponding weight coefficient, where the sum of the weights is 1 to ensure the controllability and standardization of the load index.

[0026] Specifically, CPU utilization reflects the intensity of computing resource usage. High utilization means a heavy system load, and frequent page migrations may negatively impact computing performance. Memory utilization represents the current level of memory usage. When memory utilization is high, cold page replacement is more necessary to free up memory resources. The ratio of the number of target migration pages to the migration quota measures the relationship between the current migration pressure and the system's tolerance. If the quota is exceeded, the current migration behavior may be too aggressive. The ping-pong ratio is used to assess the degree of frequent migration of memory pages between high-speed memory and external storage. An increase in the ping-pong ratio indicates inaccurate hot page identification or unreasonable threshold settings, which can easily lead to system performance degradation. The weights can be, but are not limited to, determined through historical data training.

[0027] By weightedly integrating the aforementioned indicators, the resulting load index L provides a real-time and comprehensive reflection of the system's operational pressures in terms of computing resources, memory resources, migration behavior, and recognition accuracy. This load index allows for adaptive adjustment of subsequent hot page threshold policies, ensuring that page migration behavior is more aligned with the current system state. This avoids bandwidth and performance overhead caused by excessive migration while minimizing memory bloat and access latency issues caused by insufficient migration, thereby achieving efficient and intelligent memory management optimization.

[0028] This method can dynamically and in real time obtain and evaluate the system load status, providing a quantitative basis for subsequent steps. It overcomes the static reliance on a single parameter in traditional hot page judgment and fundamentally lays the foundation for intelligent adjustment of hot page thresholds.

[0029] S12: Determine hyperparameters corresponding to the load index according to the load index and preset rules; the hyperparameters include a first factor affecting bandwidth and a second factor affecting ping-pong phenomenon.

[0030] Specifically, after obtaining the load index of the memory system, combined with the preset rules, a set of hyperparameters corresponding to the load index is determined, thereby providing a key adjustment factor for the subsequent adaptive calculation of the hot page threshold. Specifically, according to the load index calculated in S11, a set of mapping rules or function models pre-set based on experience or machine learning methods are referred to. In this mapping relationship, the load index is used as an input variable, and a set of dynamically changing hyperparameters are outputted. The hyperparameters include at least a first factor affecting the bandwidth and a second factor affecting the ping-pong phenomenon. The first factor is used to characterize the changing trend of the bandwidth sensitivity of the current memory system, that is, when the load is high, it may be necessary to increase the hot page threshold to avoid the bandwidth overhead caused by frequent page replacement; the second factor is used to characterize the risk level of the ping-pong phenomenon, that is, when the system load changes frequently or the page access behavior fluctuates violently, it is necessary to suppress the adjustment of the hot page threshold to avoid frequent page migration.

[0031] In practical applications, hyperparameter settings can be dynamically modified based on historical statistical data, runtime characteristics, and policy models to enhance the robustness and adaptability of threshold calculation. This step maps the current system state to the threshold adjustment logic, making subsequent threshold calculations context-aware and providing theoretical support and strategic foundations for accurately classifying hot and cold pages.

[0032] S13: Calculate a hot page threshold according to the determined hyperparameters, and migrate the memory pages according to the hot page threshold.

[0033] Specifically, after determining the hyperparameters corresponding to the current load index, a dynamic hot page threshold is calculated based on these hyperparameters. Based on this hot page threshold, memory pages are migrated in a targeted manner, thereby optimizing the overall utilization efficiency and access performance of the system memory. Specifically, the hot page threshold calculation process comprehensively considers the first and second factors in the hyperparameters. The first factor reflects the system burden brought by page migration under bandwidth constraints, and the second factor reflects the risk of ping-pong in the system. Both factors contribute to the construction of a hot page threshold adjustment function, allowing the calculated hot page threshold to be adaptively adjusted based on the current system state.

[0034] When the load index is high and the first factor value is low, the hot page threshold is adjusted upwards accordingly, reducing the frequency of page migrations and avoiding further impact on memory bandwidth. When the load is light or the second factor value is low, the hot page threshold can be adjusted downwards to accurately identify truly active pages while controlling page migrations caused by fluctuating access patterns. After calculation, the hot page threshold is used to assess the access behavior of each memory page, migrating pages that do not meet the hot page criteria to lower-speed storage media while retaining truly active pages in high-speed memory.

[0035] Through this dynamic adjustment and migration mechanism, not only the accuracy of page classification is improved, but also intelligent and efficient resource scheduling is achieved under changing operating environments, effectively avoiding the misjudgment and resource waste caused by static thresholds, thereby enhancing the overall performance and responsiveness of the system.

[0036] In an exemplary embodiment, after the memory page is migrated according to the hot page threshold, it also includes: obtaining a feedback indicator characterizing the migration effect, and judging whether the migration effect meets the preset requirements based on the feedback indicator; if it does not meet the preset requirements, adjusting the hyperparameters according to the feedback indicator, and after adjusting the hyperparameters, re-entering the step of calculating the hot page threshold according to the determined hyperparameters.

[0037] Specifically, to enhance the closed-loop adaptive capabilities of the dynamic adjustment mechanism for hot page thresholds, a feedback evaluation mechanism for migration effectiveness is introduced after executing page migration processing based on the hot page threshold. Specifically, a set of feedback metrics characterizing migration effectiveness is obtained. These metrics can include performance data such as changes in page fault interruption rate, number of page migrations, post-migration access latency, and CPU and memory bandwidth utilization. By collecting and analyzing these metrics in real time, the actual performance impact of page migration can be quantified, thereby determining whether the current hot page threshold is reasonable and whether the migration strategy is effective.

[0038] If the evaluation results indicate that the current migration effect does not meet the preset performance requirements, such as the failure to reduce the page fault rate, increased bandwidth load due to frequent migrations, or the occurrence of ping-pong, hyperparameters will be adjusted based on the feedback indicators to re-optimize the calculation logic of the hot page threshold. One way to implement this adjustment is to use a rules engine or learning model to automatically correct the values ​​of the first and second factors, thereby generating a hot page threshold that is more suitable for the current system state in the next round of calculation.

[0039] Through such a feedback closed-loop design, continuous self-optimization can be achieved to implement a robust memory management strategy for dynamic load environments, thereby further improving the accuracy of page classification and the scheduling efficiency of memory resources.

[0040] In an exemplary embodiment, a feedback indicator characterizing the migration effect is obtained, and whether the migration effect meets the preset requirements is judged based on the feedback indicator, including: obtaining the migration success rate of the memory page and the delay change rate of accessing the memory page after the migration, the feedback indicator including the migration success rate and the delay change rate; judging whether the migration success rate is less than the preset success rate, and judging whether the delay change rate is greater than the preset change rate; if the migration success rate is less than the preset success rate, and the delay change rate is greater than the preset change rate, it is judged that the migration effect does not meet the preset requirements.

[0041] Specifically, after completing page migration based on the hot page threshold, two key feedback metrics are proactively collected: the memory page migration success rate and the access latency change rate after page migration. The migration success rate measures whether the system correctly migrated identified cold or hot pages to the corresponding storage media during the current migration process, reflecting the accuracy and stability of page classification and migration operations. The latency change rate, on the other hand, reflects the impact of the migration operation on actual access performance, specifically whether access response time improved or deteriorated after the migration. Together, these two metrics provide a comprehensive basis for evaluating migration effectiveness.

[0042] In the actual judgment process, the current migration success rate is first compared with the pre-set migration success rate threshold (pre-set success rate) to confirm the reliability of the page migration operation; at the same time, the access delay change rate before and after the migration is compared with the set performance change tolerance threshold (pre-set change rate) to detect whether the migration has a negative impact on performance. If the migration success rate is detected to be lower than the preset success rate threshold, it means that the migration operation has not taken effect or there is an identification error; at the same time, if the delay change rate is higher than the preset change rate threshold, it means that the migration operation may have introduced additional access delays, which in turn weakened system performance. Therefore, when the above two conditions are met at the same time, that is, the migration success rate is low and the access delay increases, it is comprehensively judged that the migration effect has not achieved the expected optimization goal, and it is considered that the current hot page threshold or related hyperparameter settings are unreasonable.

[0043] This feedback mechanism ensures that the memory management strategy not only stays at the initial judgment level, but also has the ability to dynamically perceive the results, thereby providing accurate correction direction for subsequent parameter adjustments and hot page threshold recalculation, and realizing the adaptive evolution and continuous optimization of the system in complex load environments.

[0044] In an exemplary embodiment, whether the migration effect meets the preset requirements is judged based on the feedback indicators, including: judging whether the migration success rate is less than the preset success rate in multiple consecutive cycles, and judging whether the delay change rate is greater than the preset change rate; if the migration success rate is less than the preset success rate in multiple consecutive cycles, and the delay change rate is greater than the preset change rate, it is judged that the migration effect does not meet the preset requirements.

[0045] Specifically, the introduction of a judgment mechanism for multiple consecutive cycles is mainly to avoid misjudgments caused by short-term load fluctuations or occasional anomalies, thereby improving the stability and robustness of the migration effect evaluation. The migration success rate is continuously monitored within each fixed period (such as a few seconds or minutes), and the migration success rate within multiple consecutive periods (such as 3 or 5) is recorded and compared. Only when the migration success rate in these periods is continuously lower than the preset threshold and the delay change rate is higher than the set upper limit, is it determined that there is a systemic problem with the current migration strategy. This embodiment emphasizes the capture of trend anomalies to avoid unnecessary parameter adjustments caused by accidental negative feedback in a single cycle, thereby improving the robustness of hot page threshold control.

[0046] In terms of implementation, feedback indicators in the most recent cycles can be cached and statistically analyzed through a ring buffer or sliding window mechanism. Whenever a new round of data arrives, the historical window is automatically updated to form a real-time continuity evaluation model.

[0047] This method of application significantly reduces the frequency of parameter adjustment, reduces the system oscillation caused by excessive adaptation under high load conditions, ensures a smoother and more efficient threshold optimization process, and provides a more trend-based judgment basis for subsequent policy adjustments, thereby further enhancing the responsiveness and overall performance of the memory management system in a dynamic operating environment.

[0048] In an exemplary embodiment, hyperparameters are adjusted according to feedback indicators, including: adjusting the weights corresponding to each load parameter according to the feedback indicator; recalculating the load index according to the adjusted weights; and, based on the recalculated load index, entering the step of determining the hyperparameters corresponding to the load index according to the load index and preset rules.

[0049] Specifically, to achieve adaptive optimization of the hot page threshold adjustment strategy, when it is determined that the page migration effect does not meet the preset requirements, the hot page threshold itself is not directly adjusted. Instead, the load index composition logic is fundamentally revised by adjusting the weights of various load parameters, thereby changing the load index calculation method. Feedback indicators (such as migration success rate and latency change rate) play a guiding role in this process. If a certain type of problem is detected to recur, such as a persistently high rate of ping-pong phenomenon, it indicates that the original weight w4 assigned to this indicator may be too low and fails to fully reflect its impact on system performance. In this case, the value of w4 can be appropriately increased to strengthen its influence in the load index.

[0050] After the weights are adjusted, the load index is recalculated based on the new weight combination. This value more closely reflects the most critical bottlenecks or anomalies in the current system operation, providing a more accurate quantitative representation of the operating status. This approach not only dynamically reflects resource utilization and migration behavior but also enables feedback-driven learning and optimization capabilities.

[0051] Then, based on the updated load index, the system reenters the process of determining the corresponding hyperparameters based on the load index and pre-set rules. This means the entire system forms a closed-loop adaptive process: poor migration results → adjust weights → update load index → ​​update hyperparameters → recalculate hot page thresholds → execute migration → re-evaluate. This feedback-driven hyperparameter adjustment mechanism not only improves the accuracy and effectiveness of hot page identification and page migration, but also significantly enhances the system's self-regulation capabilities and overall performance stability in complex load environments.

[0052] It's important to understand that weight adjustments directly impact the calculation of the load index, which in turn influences the determination of hot page thresholds and memory page migration decisions. If the adjustment step size is too large, the load index and threshold may fluctuate drastically, leading to unstable memory management policies and even frequent "ping-pong" or migration failures. Therefore, to ensure the stability and gradualness of weight adjustments during dynamic adjustment of load parameter weights, a mechanism for halving the adjustment step size has been introduced (for example, if the preset step size is 0.1, the step size is halved to 0.05). Specifically, when feedback indicates that migration results do not meet preset requirements and the corresponding load parameter weights need to be adjusted, a large, all-at-once adjustment is not made. Instead, the weight adjustment step size is halved, resulting in a more detailed and gentle update. Halving the adjustment step size avoids these drastic fluctuations, making the weight adjustment process smoother and helping the system gradually converge to a more appropriate load weight distribution, improving overall memory management performance and stability.

[0053] In another exemplary embodiment, the adjustment range of the first factor γ and the second factor β can also be directly and dynamically adjusted by monitoring the rate of change of the memory system load parameters in the last T seconds. When the calculated load change rate exceeds the preset threshold, the adjustment range of γ and β is actively reduced, thereby avoiding excessive nonlinear fluctuations in the calculation of the hot page threshold due to severe load fluctuations. The principle is that the load change rate reflects the fluctuation intensity of the current load state of the system. If the fluctuation is too fast and the amplitude is large, directly adjusting γ and β significantly may cause frequent and drastic changes in the memory page migration strategy, affecting the stability and performance of the system. By reducing the adjustment amplitude, a buffering effect on the parameter adjustment is achieved, making the adjustment of the hot page threshold smoother and more gradual, which helps to maintain the continuity and stability of the memory management strategy.

[0054] In an exemplary embodiment, hyperparameters corresponding to the load index are determined based on the load index and preset rules, including: determining a load level based on the load index; determining a hyperparameter corresponding to the load level based on the load level and preset rules; the load level is positively correlated with the load capacity of the memory system, the load level is negatively correlated with the first factor, and the load level is positively correlated with the second factor.

[0055] Specifically, the current memory system load state is first classified based on the calculated load index. The load index, a quantitative value that comprehensively reflects multiple key indicators such as system resource utilization, migration pressure, and ping-pong, is categorized into different load levels, such as light, medium, and heavy, within a preset threshold range. This grading approach simplifies the representation of complex dynamic system states, making subsequent parameter adjustments and policy formulation more intuitive and efficient. For example, a load index below 0.3 is considered lightly loaded; between 0.3 and 0.7 is considered medium; and above 0.7 is considered heavily loaded, reflecting a low-to-high load hierarchy. The load level is positively correlated with the memory system's load capacity, meaning that higher load levels increase system resource pressure. Furthermore, the load level is negatively correlated with the first factor (γ) that influences bandwidth and positively correlated with the second factor (β) that influences ping-pong, reflecting the varying hyperparameter requirements of the system under different loads.

[0056] Execute the corresponding hyperparameter adjustment strategy based on the load level. Under light load, the first factor γ can be multiplied by a multiple greater than 1, such as 1.5, to increase the enthusiasm for hot page migration to fully utilize idle memory bandwidth resources. At the same time, the second factor β can be multiplied by a multiple less than 1, such as 0.8, to reduce the constraints of the ping-pong phenomenon, thereby speeding up the migration of hot pages and improving memory usage efficiency. Under medium load, keep γ and β unchanged to maintain a balance between current hot page migration and ping-pong phenomenon control to ensure stable operation. Under heavy load, γ can be multiplied by a multiple less than 1, such as 0.6, to suppress the bandwidth pressure caused by page migration and avoid system overload. At the same time, multiply β by a multiple greater than 1, such as 1.2, to strengthen the suppression of the ping-pong phenomenon and prevent performance degradation caused by frequent page migration. The initial values ​​of the first and second factors can both be 1.

[0057] Through the above-mentioned dynamic adjustment of hyperparameters based on load levels, the calculation strategy of the hot page threshold can be flexibly adjusted under different operating environments. It can not only accelerate page migration and improve memory resource utilization when resources are abundant, but also effectively suppress invalid migration and ping-pong phenomena when the load is high, reducing system overhead and performance fluctuations, thereby achieving efficient and stable memory management.

[0058] In an exemplary embodiment, 1<the sum of the first factor and the second factor<3.

[0059] Specifically, in order to ensure the stability of the hot page threshold adjustment process, the value range of the first factor γ and the second factor β and their combination relationship are strictly restricted. Specifically, the sum of γ and β is limited to between 1 and 3 to avoid extreme situations in the hot page threshold calculation caused by excessively large or small values ​​of the two, and to ensure that the threshold adjustment fluctuates within a reasonable range. However, since both γ and β are involved in the calculation of the threshold and the two have a synergistic influence during the adjustment process, this parameter coupling may cause nonlinear fluctuations, that is, the threshold fluctuates unexpectedly and violently with parameter adjustment, affecting system stability and performance.

[0060] To effectively control the risks associated with this coupling, we introduced parameter-association constraints, such as limiting the sum of γ and β to a narrower range of [1.5, 2.5]. We then used the Lagrange multiplier method to ensure the rationality of the adjustment direction and the satisfaction of the constraints. This Lagrange multiplier method can control the fluctuations of γ and β within the allowable range during the optimization process, while also ensuring the achievement of the hot page threshold optimization goal and avoiding system performance fluctuations caused by disordered adjustments.

[0061] By introducing such parameter association constraints and optimization solution methods, not only is the risk of nonlinear fluctuations caused by parameter coupling effectively suppressed, but the smoothness and convergence of hot page threshold adjustment are also guaranteed, thereby improving the robustness and dynamic adaptability of the memory management strategy and achieving more stable and efficient memory page migration control.

[0062] In an exemplary embodiment, obtaining at least two load parameters of a memory system includes: obtaining at least two load parameters of a current cycle and at least two load parameters of a previous cycle; after obtaining the at least two load parameters of the memory system, further including: calculating a load change rate based on the at least two load parameters of the current cycle and the at least two load parameters of the previous cycle, and determining whether the load change rate exceeds a preset value; if it does not exceed the preset value, entering the step of calculating a load index based on the at least two load parameters every preset cycle; if it exceeds the preset value, directly entering the step of calculating the load index based on the at least two load parameters.

[0063] Specifically, by obtaining at least two load parameters from the current cycle and the previous cycle, the system dynamically detects the changing trend of the memory system load. Specifically, it not only monitors the current load status but also compares the load parameters from two consecutive cycles to calculate the load change rate to determine whether the system load has fluctuated significantly. Load parameters typically include key indicators such as CPU utilization, memory utilization, and the number of migrated pages. Time-series comparison of this data enables the system to accurately capture dynamic changes in load.

[0064] Based on the comparison of the load change rate with the preset threshold, two adjustment strategies are distinguished: If the load change rate does not exceed the preset threshold, it indicates that the system load is relatively stable. In this case, the system adopts a more relaxed adjustment strategy, that is, the load index is recalculated at a certain preset period to complete the update of the hot page threshold. This method achieves coarse-grained adjustment, reduces the overhead caused by frequent system adjustments, and improves overall stability. Conversely, if the load change rate exceeds the preset threshold, it indicates that the system load has fluctuated significantly or an unexpected event has occurred. At this time, the load index calculation step is immediately entered, quickly responding to system changes and implementing fine-grained adjustments to ensure that the hot page threshold can promptly reflect the new load conditions and avoid performance degradation due to slow response.

[0065] By combining coarse-grained and fine-grained adjustment mechanisms, this solution can not only reduce the system's computing and migration costs when the load is stable, but also quickly adjust the memory management strategy when the load fluctuates drastically, thereby achieving flexible, efficient and stable dynamic adjustment of hot page thresholds.

[0066] In an exemplary embodiment, after determining that the value does not exceed the preset value, it also includes: predicting the load change trend based on the load change rate, and calculating the predicted load index based on the predicted load change trend; determining the predicted hyperparameter based on the predicted load index and preset rules, and updating the hyperparameter to the predicted hyperparameter; in the next cycle, calculating the actual load index based on at least two load parameters of the next cycle, and judging whether the actual load index and the predicted load index are the same; if they are the same, determining the hyperparameter corresponding to the load index based on the predicted load index and the preset rules; if they are different, determining the hyperparameter corresponding to the load index based on the actual load index and the preset rules.

[0067] Specifically, after determining that the load change rate does not exceed the preset threshold, the load index is not calculated immediately using the current load parameters. Instead, the future load change trend is further predicted based on the load change rate to calculate the predicted load index. This prediction mechanism takes into account the delayed characteristics of load changes, that is, the fluctuation of system load often has a certain time lag. If the load index is calculated based solely on the current load parameters, it may cause the adjustment response to lag and miss the optimal adjustment opportunity. By predicting the load trend, it is possible to perceive possible load changes in advance, adjust hyperparameters in advance, and achieve smoother and more timely hot page threshold adjustments.

[0068] Subsequently, the predicted hyperparameters are determined based on the predicted load index and pre-set rules and updated to the currently used hyperparameters. This step is used when the predicted load index and the actual load index are not significantly different. It can effectively reduce the system overhead and latency caused by frequent hyperparameter adjustments, making the memory management adjustment process more efficient and continuous. In the next cycle, the actual load index is calculated and compared with the predicted load index. If the two are the same, the prediction is accurate, and the predicted hyperparameters are directly adopted, avoiding repeated calculations and adjustments, further reducing system latency. If the two are different, the actual load index is used to redetermine the hyperparameters to ensure the accuracy and adaptability of the adjustments.

[0069] By introducing a mechanism to predict load index and hyperparameters, while taking into account both response speed and adjustment accuracy, it effectively alleviates the adjustment delay problem caused by dynamic load fluctuations, avoids overly frequent or delayed threshold adjustments, improves the real-time performance and stability of the hot page migration strategy, and ensures that memory management can still operate efficiently in complex load environments.

[0070] In an exemplary embodiment, a hot page threshold is calculated based on a determined hyperparameter, including: calculating a current hot page ratio threshold based on the determined hyperparameter, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold; the migration bandwidth utilization is determined based on the maximum bandwidth and actual migration bandwidth of the memory system, and the ping-pong phenomenon ratio is determined based on the total number of migrated memory pages and the total number of memory pages migrated back and forth; and calculating the hot page threshold based on the current hot page ratio threshold using a preset function.

[0071] Specifically, the calculation of the hot page threshold is based on the combined effect of multiple key factors, reflecting the system's dynamic adaptability to memory migration behavior and system performance indicators. First, based on the determined hyperparameters γ and β, the current hot page ratio threshold is calculated in combination with the migration bandwidth utilization, the ping-pong ratio, and the historical hot page ratio threshold. Migration bandwidth utilization is determined by comparing the maximum available bandwidth of the memory system with the bandwidth occupied during the actual migration process, reflecting the intensity of bandwidth resource utilization by the system's current migration operation; the ping-pong ratio is measured by the ratio of the number of round-trip migration pages to the total number of migration pages, reflecting the degree of frequent page migration between main memory and external memory. These two factors jointly influence the dynamic adjustment of the hot page threshold.

[0072] By comprehensively considering these key factors, we can more accurately reflect the actual load and effectiveness of current memory migrations, thereby adjusting the hot page ratio threshold to balance the relationship between page migration enthusiasm and resource consumption. The historical hot page ratio threshold provides a baseline reference for calculations, making adjustments more consistent and stable, and avoiding drastic fluctuations in the threshold.

[0073] In an exemplary embodiment, the formula for calculating the hot page ratio threshold is: , where p is the current hot page ratio threshold, B is the migration bandwidth utilization, P is the ping-pong phenomenon ratio, γ is the first factor, β is the second factor, and p old The hot page ratio threshold for the previous cycle.

[0074] After obtaining the current hot page ratio threshold, a pre-set function model is used to convert it into the actual hot page threshold. This function is typically designed based on system characteristics and performance requirements, effectively mapping the ratio threshold to specific access frequencies or other memory management metrics. This calculation process enables dynamic and adaptive adjustment of the hot page threshold, ensuring that the memory page migration strategy can be flexibly adjusted based on real-time system status, improving overall memory management performance and stability.

[0075] In an exemplary embodiment, according to the current hot page ratio threshold, a preset function is used to calculate the hot page threshold, including: according to θ=Q F (1-p) Calculate the hot page threshold, θ is the hot page threshold, Q F (·) is the quantile function of the page access frequency histogram, p is the current hot page ratio threshold, and the preset function is Q F (·).

[0076] Specifically, the current hot page ratio threshold p is mapped to a specific hot page threshold θ by using the preset quantile function QF(·). Specifically, the page access frequency histogram reflects the frequency distribution of each page accessed in the memory, and the quantile function QF(·) can determine the critical point of the corresponding access frequency based on a given ratio value. The calculation formula θ=Q F (1-p) means that based on the current hot page ratio threshold p, the 1-p percentile in the access frequency distribution is used as the hot page threshold. Here, 1-p represents the proportion of pages with a higher access frequency than this value. In other words, the system considers pages with an access frequency higher than θ to be hot pages.

[0077] In this way, the hot page threshold adaptively reflects the actual distribution of memory accesses, rather than being a fixed static value. As p changes, θ dynamically adjusts accordingly, making the division between hot and cold pages more accurate and reasonable. This effectively supports real-time optimization of hot page migration decisions, improving the flexibility and performance of memory management.

[0078] In an exemplary embodiment, after calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold, the following further comprises: determining whether the number of target migration pages is greater than or equal to the migration quota; if so, determining whether the number of target migration pages is greater than or equal to the migration quota according to p=max(p min , p / 2) Update the current hot page ratio threshold; p is the current hot page ratio threshold, pmin is the minimum hot page ratio threshold, and max is the maximum value function.

[0079] Specifically, after calculating the current hot page ratio threshold p, the system further determines whether the number of target migration pages reaches or exceeds the preset migration quota. This step primarily protects the page migration process, preventing the risk of excessive system resource consumption or performance degradation caused by an excessive number of migrated pages during memory management. The migration quota sets an upper limit on migration operations, ensuring that migrations occur within a controllable range, thereby avoiding problems such as bandwidth saturation and increased CPU load caused by frequent or large-scale page migrations.

[0080] When the number of target migration pages exceeds the migration quota, the migration operation is suppressed by adjusting the hot page ratio threshold p. The specific method is to update the current hot page ratio threshold p to p / 2 and the preset minimum hot page ratio threshold p. min The larger value between and effectively raises the threshold for a page to be classified as a hot page and reduces the number of pages to be migrated. This dynamic adjustment mechanism preserves the necessity and efficiency of hot page migration while protecting system resources.

[0081] This migration quota protection mechanism can balance the enthusiasm for page migration with the limitations of system resources, avoid performance bottlenecks and ping-pong phenomena caused by excessive migration, ensure that the memory management strategy is both flexible and stable, and improve the overall system's operating efficiency and responsiveness.

[0082] In an exemplary embodiment, after calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold, the method further includes: comparing the current hot page ratio threshold with the minimum hot page ratio threshold and the maximum hot page ratio threshold; if the current hot page ratio threshold is greater than the maximum hot page ratio threshold, updating the current hot page ratio threshold to the maximum hot page ratio threshold; if the current hot page ratio threshold is less than the minimum hot page ratio threshold, updating the current hot page ratio threshold to the minimum hot page ratio threshold.

[0083] Specifically, after calculating the current hot page ratio threshold p, it will also be bounded to ensure that p is always kept within the preset reasonable range to avoid extreme situations where the threshold is too high or too low. min and the maximum hot page ratio threshold p max Compare. If the current p exceeds p max , then update p to p max ; if p is lower than p min , then update p to p min .

[0084] The boundary constraint here is equivalent to performing an intermediate value operation on p, that is, p is limited to [p min , p max ] interval, ensuring that it does not exceed this range. Through such a constraint mechanism, it is possible to prevent the hot page ratio threshold from being out of control due to abnormal system status or excessive fluctuations, which may lead to page migration strategy being out of control. For example, when p min Set to 0.1, p max When set to 0.9, the hot page ratio threshold will always be maintained between 0.1 and 0.9, which avoids excessive migration caused by a too low threshold and insufficient hot page identification caused by a too high threshold.

[0085] This quantile boundary constraint strategy ensures the stability and rationality of hot page threshold adjustment, preventing extreme fluctuations in the hot page ratio threshold from negatively impacting memory management performance, thereby improving the robustness of the memory page migration strategy and the overall system efficiency.

[0086] In an exemplary embodiment, after calculating the hot page threshold using a preset function based on the current hot page ratio threshold, the method further includes: calculating a statistical error boundary based on the current hot page ratio threshold and the sample size of the memory page; the statistical error boundary represents the reliability of the hot page threshold; determining whether the hot page threshold is less than the statistical error boundary; if less than, determining that the hot page threshold is unreliable, and resetting the hot page threshold according to p=max(p min ,p / 2) updates the current hot page ratio threshold, and recalculates the hot page threshold based on the updated hot page ratio threshold; where p is the current hot page ratio threshold, p min is the minimum hot page ratio threshold, and max is the maximum value function.

[0087] Specifically, after calculating the hot page threshold θ using the current hot page ratio threshold p through a preset function, the statistical error boundary E is calculated based on the sample size n of the memory page to evaluate the reliability of the hot page threshold. The statistical error boundary E is calculated using the formula Calculation, where p is the current hot page ratio threshold, n is the sample size, Z α / 2 is the quantile corresponding to the 95% confidence interval. This error margin reflects the statistical uncertainty or bias that may exist when estimating the hot page threshold based on sample data.

[0088] Next, we determine whether the calculated hot page threshold θ is less than the statistical error bound E. If θ is less than E, the calculated hot page threshold is significantly affected by statistical fluctuations and lacks reliability, potentially leading to inaccurate subsequent memory migration judgments. To improve the stability and reliability of the threshold, we update the current hot page ratio threshold p to the larger value between p / 2 and the minimum hot page ratio threshold. This effectively increases the access frequency percentile corresponding to the threshold, reduces the hot page ratio, and prevents misjudgments and excessive migrations.

[0089] Based on the updated hot page ratio threshold, the hot page threshold θ is recalculated to ensure sufficient statistical reliability, avoiding misleading migration decisions caused by insufficient sample data or excessive fluctuations. This mechanism of introducing a statistical error margin helps improve the scientific and stable nature of hot page threshold adjustment, thereby optimizing memory management and reducing ping-pong and system resource waste.

[0090] Furthermore, when applying this hot page threshold adjustment method to heterogeneous computing environments, such as those involving GPU memory or distributed memory systems, it is necessary to introduce more dimensional load parameters, such as device bandwidth utilization and data locality indicators, to fully reflect the load characteristics and access patterns of various computing resources. The device bandwidth indicator reflects the limitations of data transmission capabilities between heterogeneous devices, while the data locality indicator reveals the concentration of memory access and the necessity of cross-device migration. By combining these new indicators, the load index can be calculated more accurately, thereby more reasonably adjusting the hot page threshold and optimizing hot page migration decisions across devices. In a heterogeneous environment, this strategy not only considers the load of a single device, but also takes into account the data transmission overhead and bandwidth bottlenecks between multiple devices in the overall system, effectively reducing the performance loss and resource waste caused by frequent migration across devices, and improving the overall memory management efficiency and system performance.

[0091] In resource-constrained edge node environments, energy consumption indicators (such as CPU power consumption) are introduced as one of the load parameters, and combined with the existing load index calculation framework, dynamic adjustment of the hot page threshold is achieved. By monitoring energy consumption data such as CPU power consumption, the energy usage of the node can be perceived, and energy consumption factors can be incorporated into the optimization process of the hot page threshold. This adjustment mechanism combined with energy consumption indicators helps to effectively control the energy consumption overhead of edge nodes while ensuring memory access performance, achieving a dynamic balance between performance and energy efficiency. When the node power consumption is high, the hot page threshold can be appropriately increased to reduce the frequency of memory page migration, thereby reducing CPU load and energy consumption; conversely, within the allowable power consumption range, the threshold can be lowered to improve performance. This strategy is particularly suitable for edge devices with limited computing resources and energy, and can extend device battery life while maintaining a relatively good quality of service.

[0092] In summary, a hot page threshold adjustment process is as follows: Figure 2 : First, obtain the load parameters, calculate the load index based on these load parameters, and use this as a basis to adjust the hyperparameters. Then, calculate and correct the hot page threshold, and migrate the memory pages based on the hot page threshold. After the migration is completed, evaluate the migration effect, and then adjust the weights corresponding to the load parameters based on the migration effect evaluation. The new weights will be fed back to recalculate the load index, forming a dynamic closed-loop hot page threshold adjustment mechanism.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0094] like Figure 3 An embodiment of the present application further provides an electronic device, including a memory 101 and a processor 102, wherein the memory 101 stores a computer program, and the processor 102 is configured to run the computer program to execute the steps in any of the above-mentioned hot page threshold adjustment method embodiments.

[0095] like Figure 4 An embodiment of the present application further provides a computer-readable storage medium 201, in which a computer program 202 is stored, wherein the computer program 202 is configured to execute the steps of any of the above-mentioned hot page threshold adjustment method embodiments when running.

[0096] In an exemplary embodiment, the computer-readable storage medium 201 may include, but is not limited to, various media that can store the computer program 202, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0097] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned hot page threshold adjustment method embodiments are implemented.

[0098] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned hot page threshold adjustment method embodiments are implemented.

[0099] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0100] The above is a detailed introduction to the hot page threshold adjustment method, device, medium, product and memory system provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for adjusting a hot page threshold, characterized in that: include: Acquire at least two load parameters of the memory system, and calculate a load index based on the at least two load parameters; the load index represents a current load state of the memory system; Determining, based on the load index and a preset rule, a hyperparameter corresponding to the load index; the hyperparameter comprising a first factor affecting bandwidth and a second factor affecting a ping-pong phenomenon; Calculating a hot page threshold according to the determined hyperparameter, and performing migration processing on the memory page according to the hot page threshold; Calculating a load index based on at least two of the load parameters comprises: According to at least two of the load parameters and the weights corresponding to the load parameters, using calculating the load index; L is the load index, is the CPU utilization, is the memory utilization, M is the number of target migration pages, mquota is the migration quota, and P is the ping-pong ratio. for The corresponding weight, for The corresponding weight, is the weight corresponding to M / mquota, is the weight corresponding to P; the load parameters include the utilization of the central processing unit, the memory utilization, the number of target migration pages, the migration quota and the ping-pong phenomenon ratio.

2. The method for adjusting the hot page threshold according to claim 1, characterized in that: After migrating the memory pages according to the hot page threshold, the method further includes: Obtaining feedback indicators that characterize the migration effect, and judging whether the migration effect meets preset requirements based on the feedback indicators; If the preset requirement is not met, the hyperparameter is adjusted according to the feedback indicator, and after adjusting the hyperparameter, the step of calculating the hot page threshold according to the determined hyperparameter is re-entered.

3. The method for adjusting the hot page threshold according to claim 2, characterized in that: Obtaining feedback indicators that characterize the migration effect, and judging whether the migration effect meets preset requirements based on the feedback indicators, including: Obtaining a migration success rate of the memory page and a delay change rate of accessing the memory page after the migration, wherein the feedback indicator includes the migration success rate and the delay change rate; Determining whether the migration success rate is less than a preset success rate, and determining whether the delay change rate is greater than a preset change rate; If the migration success rate is less than the preset success rate, and the delay change rate is greater than the preset change rate, it is determined that the migration effect does not meet the preset requirement.

4. The method for adjusting the hot page threshold according to claim 3, characterized in that: Determine whether the migration effect meets the preset requirements based on the feedback indicators, including: Determining whether the migration success rate is less than the preset success rate in a plurality of consecutive cycles, and determining whether the delay change rate is greater than a preset change rate; If the migration success rate is less than the preset success rate in a plurality of consecutive cycles, and the delay change rate is greater than the preset change rate, it is determined that the migration effect does not meet the preset requirement.

5. The method for adjusting the hot page threshold according to claim 2, wherein: Adjusting the hyperparameter according to the feedback indicator includes: Adjusting the weight corresponding to each of the load parameters according to the feedback indicator; recalculating the load index according to the adjusted weight; According to the recalculated load index, a step of determining a hyperparameter corresponding to the load index according to the load index and preset rules is entered.

6. The method for adjusting the hot page threshold according to claim 1, characterized in that: Determining a hyperparameter corresponding to the load index according to the load index and a preset rule includes: determining a load level according to the load index; Determining a hyperparameter corresponding to the load level according to the load level and the preset rule; The load level is positively correlated with the load capacity of the memory system, negatively correlated with the first factor, and positively correlated with the second factor.

7. The method for adjusting the hot page threshold according to claim 1, characterized in that: 1<the sum of the first factor and the second factor<3.

8. The method for adjusting the hot page threshold according to claim 1, characterized in that: Obtain at least two load parameters of the memory system, including: Obtain at least two load parameters of the current cycle and at least two load parameters of the previous cycle; After obtaining at least two load parameters of the memory system, it also includes: Calculating a load change rate based on at least two load parameters of a current cycle and at least two load parameters of a previous cycle, and determining whether the load change rate exceeds a preset value; If the preset value is not exceeded, the step of calculating the load index according to at least two load parameters is performed every preset period; If it exceeds the preset value, the step of calculating the load index according to at least two of the load parameters is directly entered.

9. The method for adjusting the hot page threshold according to claim 8, characterized in that: After determining that the preset value is not exceeded, the method further includes: Predicting a load change trend according to the load change rate, and calculating a predicted load index according to the predicted load change trend; Determine a prediction hyperparameter according to the predicted load index and the preset rule, and update the hyperparameter to the predicted hyperparameter; In a next cycle, calculating an actual load index based on at least two load parameters of the next cycle, and determining whether the actual load index is the same as the predicted load index; If they are the same, determining the hyperparameter corresponding to the load index according to the predicted load index and preset rules; If they are different, the hyperparameter corresponding to the load index is determined according to the actual load index and preset rules.

10. The method for adjusting the hot page threshold according to any one of claims 1 to 9, characterized in that: Calculating a hot page threshold according to the determined hyperparameters includes: Calculating a current hot page ratio threshold based on the determined hyperparameters, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold; the migration bandwidth utilization is determined based on the maximum bandwidth and actual migration bandwidth of the memory system, and the ping-pong phenomenon ratio is determined based on the total number of memory pages migrated and the total number of memory pages migrated back and forth; The hot page threshold is calculated using a preset function according to the current hot page ratio threshold.

11. The method for adjusting the hot page threshold according to claim 10, characterized in that: Calculating the hot page threshold using a preset function according to the current hot page ratio threshold includes: according to Calculating the hot page threshold, is the hot page threshold, is the quantile function of the page access frequency histogram, p is the current hot page ratio threshold, and the preset function is .

12. The method for adjusting the hot page threshold according to claim 10, characterized in that: After calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold, the method further includes: Determine whether the number of target migration pages is greater than or equal to the migration quota; If it is greater than or equal to the migration quota, Update the current hot page ratio threshold; p is the current hot page ratio threshold, is the minimum hot page ratio threshold, and max is the maximum value function.

13. The method for adjusting the hot page threshold according to claim 10, characterized in that: After calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization, ping-pong phenomenon ratio, and historical hot page ratio threshold, the method further includes: comparing the current hot page ratio threshold with a minimum hot page ratio threshold and a maximum hot page ratio threshold; If the current hot page ratio threshold is greater than the maximum hot page ratio threshold, updating the current hot page ratio threshold to the maximum hot page ratio threshold; If the current hot page ratio threshold is less than the minimum hot page ratio threshold, the current hot page ratio threshold is updated to the minimum hot page ratio threshold.

14. The method for adjusting the hot page threshold according to claim 10, characterized in that: After calculating the hot page threshold using a preset function according to the current hot page ratio threshold, the method further includes: Calculating a statistical error boundary based on the current hot page ratio threshold and the sample size of the memory page; the statistical error boundary represents the reliability of the hot page threshold; Determining whether the hot page threshold is less than the statistical error boundary; If it is less than, it is determined that the hot page threshold is unreliable. Update the current hot page ratio threshold, and recalculate the hot page threshold based on the updated hot page ratio threshold; wherein p is the current hot page ratio threshold, is the minimum hot page ratio threshold, and max is the maximum value function.

15. An electronic device, characterized in that: include: memory for storing computer programs; A processor is configured to implement the steps of the method for adjusting the hot page threshold according to any one of claims 1 to 14 when executing the computer program.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for adjusting the hot page threshold according to any one of claims 1 to 14.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for adjusting the hot page threshold value according to any one of claims 1 to 14 are implemented.

18. A memory system, characterized in that: Comprising the electronic device as claimed in claim 15.

Citation Information

Patent Citations

  • Method and device for realizing cold and hot data migration between DRAM and PMEM

    CN114442928A

  • Hot page and cold page identification method and device, equipment and storage medium

    CN117992857A