Hot page threshold adjustment method and device, medium, product and memory system

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 in memory management are solved, and the access efficiency and overall performance of the memory system are improved.

CN120371535AActive Publication Date: 2025-07-25JINAN INSPUR DATA TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the hot page misjudgment and frequent page migration problems caused by improper setting of hot page thresholds in memory management systems cannot adapt to dynamic system load, resulting in waste of resources and performance degradation.

Method used

By obtaining multiple load parameters of the memory system, and determining hyperparameters based on preset rules, including affecting bandwidth and ping-pong phenomenon factors, dynamically adjusting the hot page threshold to achieve accurate classification of hot pages and cold pages.

Benefits of technology

Real-time response to memory system load changes is achieved, resource waste generated by pseudo-hot pages and repeated page migration, and improve memory management flexibility and overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371535A_ABST
    Figure CN120371535A_ABST
Patent Text Reader

Abstract

The invention discloses a hot page threshold adjusting method and device, a medium, a product and a memory system, and relates to the technical field of memory management.The current load index is calculated by introducing multiple load parameters of the memory system, the running state of the system is dynamically reflected, preset hyper-parameters are matched according to the load index, and the hot page threshold is adjusted according to the hyper-parameters. Comprising a first factor influencing the bandwidth and a second factor inhibiting the ping-pong phenomenon, and according to the hyper-parameters, a hot page threshold value is calculated in a self-adaptive mode, so that dynamic classification of the hot page and the cold page is achieved. Compared with a mode of determining the hot page and the cold page by adopting a static threshold, the method has the advantages that the change of the load of the memory system can be responded in real time, the phenomena of resource waste and repeated page migration caused by a pseudo hot page are inhibited, the technical problems of hot page misjudgment and frequent page migration caused by improper hot page threshold setting are solved, and the page migration efficiency is improved. The technical effects of improving the access efficiency and improving the flexibility of memory management and the overall performance of the system are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In a computer memory management system, the hot page threshold, as the critical value for dividing hot pages and cold pages, plays a decisive role in the memory management effect. If the hot page threshold is too high, a large number of actually active "hot pages" will be misjudged as "cold pages" and wrongly replaced to the low-speed disk, frequently triggering page faults and disk I / O (Input / Output) operations during business access, significantly increasing the access latency; while if the threshold is set too low, a large number of "pseudo-hot pages" will be misjudged as "hot pages", causing unnecessary page migrations, resulting in the ineffective consumption of resources such as network bandwidth and CPU (Central Processing Unit), and even the "ping-pong phenomenon", that is, the pages are repeatedly migrated between high-speed memory and external memory.

[0003] However, in the related art, memory management mostly uses static threshold parameters as the hot page threshold to distinguish "hot pages" and "cold pages", such as fixed access frequencies or time windows. This static hot page threshold cannot adapt to dynamic system loads. In scenarios with extremely high real-time requirements for memory management such as cloud computing and big data, the limitations of this static threshold become more obvious.

[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] This application provides a method, device, medium, product, and memory system for adjusting the hot page threshold, at least to solve the technical problem of misjudgment of hot pages and frequent page migrations caused by improper setting of the hot page threshold in the related art, and achieve the technical effects of improving access efficiency, enhancing the flexibility of memory management, and the overall system performance.

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

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

[0008] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any one of the above-mentioned hot page threshold adjustment methods when executed by a processor.

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

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

[0011] Through the present application, by introducing multiple load parameters of the memory system to calculate the current load index, dynamically reflecting the system operation state, and matching preset hyperparameters according to the load index, including a first factor affecting the bandwidth and a second factor suppressing the ping-pong phenomenon, and adaptively calculating the hot page threshold according to these hyperparameters, thereby realizing the dynamic classification of hot pages and cold pages. Compared with the method of determining hot pages and cold pages using static thresholds, the present application can respond in real time to changes in the memory system load, suppressing resource waste and repeated page migration phenomena caused by pseudo-hot pages, solving the technical problems of misjudgment of hot pages and frequent page migration caused by improper setting of the hot page threshold, and achieving the technical effects of improving access efficiency, enhancing the flexibility of memory management, and the overall performance of the system. Description of the Drawings

[0012] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0013] Figure 1 It is a general flowchart of a method for adjusting a hot page threshold provided by an embodiment of the present application; Figure 2 It is an overall flowchart of a method for adjusting a hot page threshold provided by an embodiment of the present application; Figure 3 It is a schematic diagram of an electronic device provided by an embodiment of the present application; Figure 4 It is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present application. Detailed Embodiments

[0014] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0015] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0016] To enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0017] As Figure 1 , an embodiment of the present application provides a method for adjusting a hot page threshold, including: S11: Obtain at least two load parameters of the memory system, and calculate a load index according to the at least two load parameters; the load index characterizes the current load state of the memory system.

[0018] Specifically, by collecting and comprehensively analyzing multiple key load parameters in the memory system, the load state of the current system is quantified, and a representative load index is calculated for subsequent adjustment of the hot page threshold.

[0019] Specifically, the load parameters may include, but are not limited to, indicators highly related to memory pressure such as page access frequency, page residence time, page fault rate, CPU utilization rate, and memory bandwidth occupancy rate. By statistically analyzing these parameters within a preset time window, the usage intensity and running trend of the current memory system can be comprehensively reflected. During the calculation process, according to the weight relationship of each load parameter or through an empirical model or a training model, multiple parameters are mapped into a unified load index. The higher the value of this load index, the heavier the current system load, the higher the page access activity, and the greater the memory pressure.

[0020] In an exemplary embodiment, calculating the load index according to at least two load parameters includes: according to at least two load parameters and the weights corresponding to each load parameter, using to calculate the load index; L is the load index, and U CPU is the utilization rate of the central processing unit, and Umem 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; the load parameters include CPU utilization, memory utilization, number of target migration pages, migration quota, and ping-pong ratio.

[0021] The load index calculation method described in this embodiment is a weighted comprehensive model for quantitative evaluation of 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.

[0022] Specifically, the utilization rate of the CPU reflects the intensity of computing resource usage. High utilization rate means that the system is under heavy load, and frequent page migration may have an adverse effect on computing performance. Memory utilization rate represents the current memory usage level. When memory utilization rate is high, cold page replacement is more necessary to release 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 phenomenon ratio is used to evaluate the degree of frequent migration of memory pages between high-speed memory and external memory. Its increase means that the hot page identification is inaccurate or the threshold setting is unreasonable, which may easily cause system performance degradation. Among them, the weight can be, but is not limited to, determined through historical data training.

[0023] Through the weighted integration of the above indicators, the load index L can reflect the system's operating pressure in real time and comprehensively in terms of computing resources, memory resources, migration behavior, and recognition accuracy. The subsequent hot page threshold strategy can be adaptively adjusted according to the load index to make the page migration behavior more consistent with the current system status, avoiding bandwidth and performance overhead caused by excessive migration, and reducing memory expansion and access delay problems caused by insufficient migration, thereby achieving efficient and intelligent memory management optimization.

[0024] In this way, the system load status can be obtained and evaluated dynamically and in real time, providing a quantitative basis for subsequent steps. This 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.

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

[0026] Specifically, after obtaining the load index of the memory system, in combination with the preset rule, determine the set of hyperparameters corresponding to the load index, 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, referring to a set of mapping rules or function models preset based on experience or machine learning methods, in this mapping relationship, the load index is used as the input variable, and a set of dynamically changing hyperparameters are correspondingly output. The hyperparameters at least include 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 degree 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.

[0027] In practical applications, the setting of the hyperparameters can also be dynamically corrected in combination with historical statistical data, runtime characteristics, and policy models to enhance the robustness and scenario adaptation ability of the threshold calculation. By this step, a mapping relationship is established between the current state of the system and the threshold adjustment logic, enabling the subsequent threshold calculation process to have context awareness ability, thereby providing a theoretical support and policy basis for accurately dividing hot pages and cold pages.

[0028] S13: Calculate the hot page threshold according to the determined hyperparameters, and perform migration processing on the memory pages according to the hot page threshold.

[0029] Specifically, after determining the hyperparameters corresponding to the current load index, calculate a dynamic hot page threshold based on these hyperparameters, and perform targeted migration processing on the memory pages based on this hot page threshold, thereby optimizing the overall utilization efficiency and access performance of the system memory. Specifically, the calculation process of the hot page threshold comprehensively considers the first factor and the second factor 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 the ping-pong phenomenon occurring in the system. The two jointly participate in constructing the hot page threshold adjustment function, so that the calculated hot page threshold can be adaptively adjusted according to the current system state.

[0030] When the load index is high and the value of the first factor is small, the hot page threshold is correspondingly increased, thereby reducing the page migration frequency and avoiding further impact on the memory bandwidth. When the load is light or the value of the second factor is small, the hot page threshold can be appropriately decreased to accurately identify truly active pages and at the same time control the page round-trip migration caused by fluctuations in the access pattern. After the calculation is completed, the access behavior of each memory page is judged according to the hot page threshold, and the pages that do not meet the hot page conditions are migrated to the low-speed storage medium, and the truly active pages are retained in the high-speed memory.

[0031] Through this dynamic adjustment and migration mechanism, not only the accuracy of page classification is improved, but also the intelligent and efficient resource scheduling is realized in a changing operating environment, effectively avoiding the misjudgment and resource waste problems caused by static thresholds, thereby enhancing the overall performance and response ability of the system.

[0032] In an exemplary embodiment, after migrating the memory pages according to the hot page threshold, it further includes: obtaining a feedback metric characterizing the migration effect, and judging whether the migration effect meets a preset requirement according to the feedback metric; if it does not meet the preset requirement, adjusting the hyperparameters according to the feedback metric, and after adjusting the hyperparameters, re-entering the step of calculating the hot page threshold according to the determined hyperparameters.

[0033] Specifically, to improve the closed-loop adaptive ability of the hot page threshold dynamic adjustment mechanism, after performing the page migration process based on the hot page threshold, a feedback evaluation mechanism for the migration effect is further introduced. Specifically, a set of feedback metrics characterizing the migration effect are obtained, and these metrics can include performance data such as changes in the page fault rate, the number of page migrations, the access latency after migration, and the CPU and memory bandwidth utilization rates. By collecting and analyzing these metrics in real time, the actual performance impact brought by page migration can be quantified, thereby judging whether the current hot page threshold is reasonable and whether the migration strategy is effective.

[0034] If the evaluation result shows that the current migration effect does not meet the preset performance requirements, such as the page fault rate has not decreased, the bandwidth load has increased due to frequent migrations, or there is a ping-pong phenomenon, the hyperparameters will be adjusted according to the feedback metrics, and the calculation logic of the hot page threshold will be re-optimized. One implementation of this adjustment is to use a rule engine or a learning model to automatically correct the values of the first factor and the second factor, so as to generate a hot page threshold that is more suitable for the current system state in the next round of calculation.

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

[0036] In an exemplary embodiment, a feedback metric characterizing the migration effect is obtained, and it is determined whether the migration effect meets a preset requirement according to the feedback metric, including: obtaining the migration success rate of memory pages and the change rate of access latency to the memory pages after migration, where the feedback metric includes the migration success rate and the change rate of latency; determining whether the migration success rate is less than a preset success rate, and determining whether the change rate of latency is greater than a preset change rate; if the migration success rate is less than the preset success rate and the change rate of latency is greater than the preset change rate, it is determined that the migration effect does not meet the preset requirement.

[0037] Specifically, after completing the page migration process based on the hot page threshold, two key feedback metrics are actively obtained: the migration success rate of memory pages and the change rate of access latency after page migration. The migration success rate is used to measure whether the cold pages or hot pages identified by the system are correctly migrated to the corresponding storage medium during this round of migration, reflecting the accuracy and stability of page classification and migration operations; while the change rate of latency reflects the impact of the migration operation on the actual access performance, especially whether the access response time after migration is improved or deteriorated. These two metrics together constitute the comprehensive evaluation basis for the migration effect.

[0038] In the actual judgment process, first, the current migration success rate is compared with the pre-set migration success rate threshold (preset success rate) to confirm the reliability of the page migration operation; at the same time, the change rate of access latency before and after migration is compared with the set performance change tolerance threshold (preset change rate) to detect whether the migration brings negative impacts on performance. If it is detected that the migration success rate is lower than the preset success rate threshold, it indicates that there is a situation where the migration operation fails to take effect or there is an identification error; at the same time, if the change rate of latency is higher than the preset change rate threshold, it means that the migration operation may introduce additional access latency, which instead weakens the system performance. Therefore, when the above two conditions are both satisfied, that is, the migration success rate is low and the access latency increases instead, it is comprehensively determined that the migration effect of this time does not reach the expected optimization goal, and it is considered that the setting of the current hot page threshold or related hyperparameters is unreasonable.

[0039] 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, thus providing an accurate correction direction for subsequent parameter adjustment and recalculation of the hot page threshold, and realizing the adaptive evolution and continuous optimization of the system in a complex load environment.

[0040] In an exemplary embodiment, it is determined whether the migration effect meets a preset requirement according to the feedback metric, including: determining whether the migration success rate is less than the preset success rate in a continuous plurality of cycles, and determining whether the change rate of latency is greater than the preset change rate; if the migration success rate is less than the preset success rate in a continuous plurality of cycles and the change rate of latency is greater than the preset change rate, it is determined that the migration effect does not meet the preset requirement.

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

[0042] In terms of implementation, a ring buffer or a sliding window mechanism can be used to cache and statistically analyze the feedback indicators within the recent several cycles. Whenever a new round of data arrives, the historical window is automatically updated to form a real-time continuous evaluation model.

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

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

[0045] Specifically, to achieve the adaptive optimization of the hot page threshold adjustment strategy, after determining that the page migration effect does not meet the preset requirements, instead of directly adjusting the hot page threshold itself, the composition logic of the load index is fundamentally corrected. The specific approach is to adjust the weights of each load parameter, thereby changing the calculation method of the load index. The feedback indicators (such as the migration success rate and the delay change rate) play a guiding role in this process. When it is detected that a certain type of problem appears repeatedly, for example, the proportion of the ping-pong phenomenon remains high, it indicates that the original weight w4 assigned to this indicator may be too low and fails to fully reflect its impact on the system performance. At this time, the value of w4 can be appropriately increased to strengthen the influence of this factor in the load index.

[0046] After the adjustment of the weights is completed, the load index is recalculated based on the new weight combination. At this time, the value of the load index will be closer to the most critical bottleneck or anomaly point in the current system operation, realizing a more accurate quantitative expression of the operating state. In this way, the load index not only dynamically reflects resource utilization and migration behavior, but also has the ability of feedback-driven learning and optimization.

[0047] Subsequently, according to the updated load index, it re-enters the step of determining the hyperparameters corresponding to the load index according to the load index and the preset rules. This means that the entire system forms a closed-loop adaptive process: poor migration result → adjust weights → update load index → update hyperparameters → recalculate the hot page threshold → execute migration → evaluate again. This feedback-driven hyperparameter adjustment mechanism not only improves the accuracy and effect of hot page recognition and page migration, but also significantly enhances the self-adjusting ability and overall performance stability of the system in complex load environments.

[0048] It should be understood that the adjustment of the weights directly affects the calculation result of the load index, and thus affects the determination of the hot page threshold and the migration decision of the memory pages. If the adjustment step size is too large, it may cause drastic fluctuations in the load index and the threshold, resulting in unstable memory management strategies, and even triggering frequent "ping-pong phenomena" or migration failures. Therefore, in the process of dynamically adjusting the weights of the load parameters, in order to ensure the stability and gradualness of the weight adjustment, a mechanism of halving the adjustment step size is further introduced (for example, if the preset step size is 0.1, then halving it is 0.05). Specifically, when it is found according to the feedback index that the migration effect does not meet the preset requirements and the weights corresponding to the load parameters need to be adjusted, a large-scale adjustment will not be made at one time, but the adjustment step size of the weights will be halved, so that each weight update is more meticulous and gentle. And halving the adjustment step size can avoid such drastic fluctuations, making the weight adjustment process smoother, which helps the system to gradually converge to a more reasonable load weight distribution and improve the performance and stability of the overall memory management.

[0049] In another exemplary embodiment, the adjustment amplitudes of the first factor γ and the second factor β can also be directly dynamically adjusted by monitoring the change rate of the memory system load parameters within the most recent T seconds. When the calculated load change rate exceeds the preset threshold, the adjustment amplitudes of γ and β are actively reduced, so as to avoid excessive non-linear fluctuations in the calculation of the hot page threshold caused by drastic 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 lead to 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.

[0050] In an exemplary embodiment, according to the load index and a preset rule, hyperparameters corresponding to the load index are determined, including: determining a load level according to the load index; determining hyperparameters 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 a first factor, and positively correlated with a second factor.

[0051] Specifically, first, the load status of the current memory system is classified according to the calculated load index. As a quantitative value comprehensively reflecting multiple key indicators such as system resource utilization, migration pressure, and ping-pong phenomenon, the load index is divided into different load levels, such as light load, medium load, and heavy load, through a preset threshold range. This classification method simplifies the expression of complex dynamic system states, making subsequent parameter adjustment and strategy formulation more intuitive and efficient. For example, when the load index is lower than 0.3, it is determined to be in a light load state; when it is between 0.3 and 0.7, it is a medium load; and when it exceeds 0.7, it is a heavy load, reflecting the hierarchical structure of the load from low to high. The load level is positively correlated with the load capacity of the memory system, meaning that the higher the load level, the greater the system resource pressure; at the same time, the load level is negatively correlated with a first factor (γ) affecting bandwidth and positively correlated with a second factor (β) affecting the ping-pong phenomenon, which reflects the different requirements for hyperparameters under different loads of the system.

[0052] According to the load level, corresponding hyperparameter adjustment strategies are executed. In the light load state, 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 make full use of the idle memory bandwidth resources. At the same time, the second factor β is multiplied by a multiple less than 1, such as 0.8, to reduce the constraint of the ping-pong phenomenon, thereby accelerating the migration speed of hot pages and improving memory usage efficiency. In the medium load state, γ and β are kept unchanged to maintain the balance between current hot page migration and ping-pong phenomenon control and ensure stable operation. In the heavy load state, γ can be multiplied by a multiple less than 1, such as 0.6, to suppress the bandwidth pressure brought by page migration and avoid system overload; at the same time, β is multiplied 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 factor and the second factor can both be 1.

[0053] Through the above dynamic adjustment of hyperparameters based on the load level, the calculation strategy of the hot page threshold can be flexibly adjusted in different operating environments, which can not only accelerate page migration and improve memory resource utilization when resources are abundant, but also effectively suppress invalid migration and ping-pong phenomenon when the load is high, reduce system overhead and performance fluctuations, thereby achieving the efficiency and stability of memory management.

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

[0055] Specifically, to ensure the stability of the hot page threshold adjustment process, strict restrictions are imposed on the value ranges of the first factor γ and the second factor β and their combined relationship. Specifically, the sum of γ and β is limited to be between 1 and 3 to avoid extreme situations in the calculation of the hot page threshold caused by either of their values being too large or too small, and to ensure that the threshold adjustment fluctuates within a reasonable range. However, since both γ and β are involved in the threshold calculation and there is a synergistic effect between them during the adjustment process, this parameter coupling may trigger a non-linear fluctuation phenomenon, that is, the threshold fluctuates violently unexpectedly as the parameters are adjusted, affecting the system stability and performance.

[0056] To effectively control the risk brought by this coupling, a parameter correlation constraint mechanism is introduced. For example, the sum of γ and β is restricted to a narrower interval [1.5, 2.5], and the Lagrange multiplier method is used to ensure the rationality of the adjustment direction and the satisfaction of the constraint conditions. The Lagrange multiplier method can control the changes of γ and β within the allowable range during the optimization adjustment process, while taking into account the realization of the hot page threshold optimization goal, and avoiding system performance fluctuations caused by disorderly adjustment.

[0057] By introducing such parameter correlation constraints and optimization solution methods, not only the non-linear fluctuation risk caused by parameter coupling is effectively suppressed, but also the smoothness and convergence of the hot page threshold adjustment are ensured, thereby enhancing the robustness and dynamic adaptability of the memory management strategy and realizing more stable and efficient memory page migration control.

[0058] In an exemplary embodiment, at least two load parameters of the memory system are obtained, including: obtaining 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 further includes: calculating a load change rate according to at least two load parameters of the current cycle and 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, enter the step of calculating a load index according to at least two load parameters every preset cycle; if it exceeds the preset value, directly enter the step of calculating a load index according to at least two load parameters.

[0059] Specifically, by obtaining at least two load parameters of the current cycle and the previous cycle, the change trend of the memory system load is dynamically sensed. Specifically, not only the load status at the current moment is concerned, but also by comparing the load parameters of two consecutive cycles, the load change rate is calculated to determine whether there is a significant fluctuation in the system load. The load parameters usually include key indicators such as central processing unit utilization rate, memory utilization rate, and the number of migrated pages. The time-series comparison of these data enables the system to accurately capture the dynamic changes of the load.

[0060] Based on the comparison between the load change rate and a 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. At this time, the system adopts a relatively loose adjustment strategy, that is, the load index is recalculated only every certain preset period to complete the update of the hot page threshold. This method realizes coarse-grained adjustment, reduces the overhead caused by frequent system adjustments, and improves the overall stability. On the contrary, if the load change rate exceeds the preset threshold, it means that there are large fluctuations or emergencies in the system load. At this time, the load index calculation step is immediately entered to quickly respond to system changes, realize fine-grained adjustment, ensure that the hot page threshold can timely reflect the new load condition, and avoid performance degradation caused by slow response.

[0061] By combining the two adjustment mechanisms of coarse-grained and fine-grained, this solution can not only reduce the calculation and migration costs of the system when the load is stable, but also quickly adjust the memory management strategy when the load fluctuates violently, so as to realize flexible, efficient and stable dynamic adjustment of the hot page threshold.

[0062] In an exemplary embodiment, after determining that it does not exceed the preset value, it further includes: predicting the load change trend according to the load change rate, and calculating the predicted load index according to the predicted load change trend; determining the predicted hyperparameter according to the predicted load index and the preset rule, and updating the hyperparameter to the predicted hyperparameter; in the next cycle, calculating the actual load index according to at least two load parameters in the next cycle, and judging 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 the preset rule; if they are different, determining the hyperparameter corresponding to the load index according to the actual load index and the preset rule.

[0063] Specifically, after determining that the load change rate does not exceed the preset threshold, the load index is not directly calculated using the current load parameters immediately, but the future load change trend is further predicted based on the load change rate, so as to calculate the predicted load index. This prediction mechanism takes into account the delay characteristic of load change, that is, there is often a certain time lag in the fluctuation of system load. If the load index is calculated only relying on the current load parameters, it may lead to a lag in adjustment reaction and miss the best adjustment opportunity. By predicting the load trend, it is possible to perceive possible load changes in advance, adjust the hyperparameters in advance, and realize smoother and more timely adjustment of the hot page threshold.

[0064] Subsequently, based on the predicted load index and preset rules, the predicted hyperparameters are determined and updated to the currently used hyperparameters. This step is used when the difference between the predicted load index and the actual load index is small. It can effectively reduce the system overhead and latency caused by frequent hyperparameter adjustments, making the adjustment process of memory management 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, it indicates that the prediction is accurate, and the predicted hyperparameters are directly adopted to avoid repeated calculations and adjustments, further reducing the system latency. If the two are different, the actual load index is used to re-determine the hyperparameters to ensure the accuracy and adaptability of the adjustment.

[0065] By introducing the mechanism of predicted load index and hyperparameters, while taking into account the response speed and adjustment accuracy, it effectively alleviates the adjustment latency problem caused by dynamic load fluctuations, avoids overly frequent or lagged 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 a complex load environment.

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

[0067] Specifically, the calculation of the hot page threshold is based on the combined effect of multiple key factors, reflecting the system's dynamic adaptation ability to memory migration behavior and system performance indicators. First, according to the determined hyperparameters γ and β, combined with the migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold, the current hot page ratio threshold is calculated. The migration bandwidth utilization rate 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 the system's current migration operation on bandwidth resources; the ping-pong phenomenon ratio is measured by the ratio of the number of pages migrated back and forth to the total number of migrated pages, reflecting the degree of frequent migration of pages between memory and external storage. These two factors jointly affect the dynamic adjustment of the hot page threshold.

[0068] By comprehensively considering these key factors, it can more accurately reflect the actual load and effect of the current memory migration, thereby adjusting the hot page ratio threshold to balance the relationship between the enthusiasm of page migration and resource consumption. The historical hot page ratio threshold provides a baseline reference for the calculation, making the adjustment more continuous and stable, and avoiding drastic fluctuations in the threshold.

[0069] 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 rate, P is the ping-pong phenomenon ratio, γ is the first factor, β is the second factor, and p old is the hot page ratio threshold of the previous cycle.

[0070] After obtaining the current hot page ratio threshold, use a preset function model to convert this hot page ratio threshold into an actual hot page threshold. This function is usually a mapping function designed according to system characteristics and performance requirements, which can reasonably map the ratio threshold to specific access frequencies or other memory management metrics. Through this calculation process, the dynamic adaptive adjustment of the hot page threshold is realized, ensuring that the memory page migration strategy can be flexibly adjusted according to the real-time system state, and improving the performance and stability of the overall memory management.

[0071] In an exemplary embodiment, according to the current hot page ratio threshold, use a preset function to calculate the hot page threshold, including: according to θ = Q F (1 - p) to 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 (·).

[0072] Specifically, use the preset quantile function QF(·) to map the current hot page ratio threshold p to a specific hot page threshold θ. 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 according to the given ratio value. The calculation formula θ = Q F (1 - p) means that according to the current hot page ratio threshold p, take the position of the 1 - p quantile in the access frequency distribution as the hot page threshold. Here, 1 - p represents the proportion of pages with access frequencies higher than this value in the access frequency sorting, that is, the system considers pages with access frequencies higher than θ as hot pages.

[0073] In this way, the hot page threshold can adaptively reflect the actual distribution of memory access, rather than a fixed static value. When p changes, θ is dynamically adjusted accordingly, making the division of hot pages and cold pages more accurate and reasonable, thus effectively supporting the real-time optimization of hot page migration decisions and improving the flexibility and performance of memory management.

[0074] In an exemplary embodiment, after calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold, it further includes: determining 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 according to p = max(p min , p / 2); p is the current hot page ratio threshold, pmin is the minimum hot page ratio threshold, and max is the function for taking the maximum value.

[0075] Specifically, after calculating the current hot page ratio threshold p, it is further determined whether the number of target migrated pages reaches or exceeds a preset migration quota. This step is mainly used to protect the page migration process and prevent the risk of excessive consumption of system resources or performance degradation caused by too many migrated pages during the memory management process. The migration quota sets an upper limit for the migration operation, ensuring that the migration behavior is carried out within a controllable range, thereby avoiding problems such as bandwidth saturation and a sharp increase in CPU load caused by frequent or large-scale page migrations.

[0076] When the number of target migrated pages exceeds the migration quota, the migration operation is suppressed by adjusting the hot page ratio threshold p. Specifically, the current hot page ratio threshold p is updated to the larger value between p / 2 and the preset minimum hot page ratio threshold p min to effectively increase the threshold for a page to be classified as a hot page and reduce the number of migrated pages. This dynamic adjustment mechanism can protect system resources while maintaining the necessity and efficiency of hot page migration.

[0077] Through this migration quota protection mechanism, the enthusiasm for page migration can be balanced with the limitations of system resources, avoiding performance bottlenecks and ping-pong phenomena caused by excessive migration, ensuring that the memory management strategy is both flexible and stable, and improving the overall system operation efficiency and response ability.

[0078] In an exemplary embodiment, after calculating the current hot page ratio threshold according to the determined hyperparameters, migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold, it 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, then update 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, then update the current hot page ratio threshold to the minimum hot page ratio threshold.

[0079] Specifically, after calculating the current hot page ratio threshold p, boundary constraint processing is also performed on it to ensure that p always remains within a preset reasonable range and avoid extreme situations where the threshold is too high or too low. Specifically, the current hot page ratio threshold is compared with the preset minimum hot page ratio threshold p min and the maximum hot page ratio threshold p max for comparison. 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 .

[0080] The boundary constraint here is equivalent to taking the median value of p, that is, p is restricted within the interval [p min , p max , ensuring that it does not exceed this range. Through such a constraint mechanism, it is possible to prevent the hot page ratio threshold from getting out of control in the page migration strategy due to abnormal system status or excessive fluctuations. For example, when p min is set to 0.1 and p max is set to 0.9, the hot page ratio threshold will always be maintained between 0.1 and 0.9, avoiding both excessive migration caused by too low a threshold and insufficient recognition of hot pages caused by too high a threshold.

[0081] This quantile boundary constraint strategy ensures the stability and rationality of the hot page threshold adjustment, prevents extreme fluctuations of the hot page ratio threshold from having a negative impact on the memory management performance, and thus improves the robustness of the memory page migration strategy and the overall operating efficiency of the system.

[0082] In an exemplary embodiment, after calculating the hot page threshold using a preset function according to the current hot page ratio threshold, it further includes: calculating a statistical error boundary according to the current hot page ratio threshold and the sample size of the memory pages; the statistical error boundary characterizes the reliability of the hot page threshold; determining whether the hot page threshold is less than the statistical error boundary; if it is less, determining that the hot page threshold is unreliable, and updating the current hot page ratio threshold according to p = max(p min , p / 2) and recalculating 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.

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

[0084] Then it is determined whether the calculated hot page threshold θ is less than the statistical error boundary E. If θ is less than E, it indicates that the calculation result of the hot page threshold is greatly affected by statistical fluctuations and the reliability is insufficient, which may lead to inaccurate subsequent memory migration judgments. To improve the stability and credibility of the threshold, the current hot page ratio threshold p is updated to the larger value between p / 2 and the minimum hot page ratio threshold, thereby effectively increasing the access frequency quantile corresponding to the threshold, reducing the hot page ratio, and suppressing misjudgment and excessive migration.

[0085] Based on the updated hot page ratio threshold, recalculate the hot page threshold θ to ensure its sufficient statistical reliability and avoid misleading migration decisions caused by insufficient sample data or excessive fluctuations. This mechanism introducing statistical error bounds helps improve the scientificity and stability of hot page threshold adjustment, thereby optimizing memory management effects, reducing the ping-pong phenomenon and system resource waste.

[0086] Furthermore, when applying this hot page threshold adjustment method to heterogeneous computing environments, such as those including GPU memory or distributed memory systems, additional dimensions of load parameters need to be introduced, such as device bandwidth utilization and data locality metrics, to comprehensively reflect the load characteristics and access patterns of various computing resources. The device bandwidth metric reflects the limitations of data transfer capabilities between heterogeneous devices, and the data locality metric reveals the concentration of memory access and the necessity of cross-device migration. By integrating these new metrics, the load index can be calculated more accurately, and thus the hot page threshold can be adjusted more reasonably to optimize the hot page migration decision across devices. In a heterogeneous environment, this strategy not only considers the load of a single device but also takes into account the data transfer overhead and bandwidth bottlenecks among multiple devices in the overall system, effectively reducing the performance loss and resource waste caused by frequent cross-device migrations and enhancing the efficiency of overall memory management and system performance.

[0087] In resource-constrained edge node environments, introduce an energy consumption metric (such as CPU power consumption) as one of the load parameters and combine it with the existing load index calculation framework to achieve dynamic adjustment of the hot page threshold. By monitoring energy consumption data such as CPU power consumption, the energy usage status of the node can be sensed, and the energy consumption factor can be incorporated into the optimization process of the hot page threshold. This adjustment mechanism combining energy consumption metrics helps 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 migrations, thereby reducing the 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, which can extend the device's battery life while maintaining a relatively good quality of service.

[0088] In summary, briefly speaking, a hot page threshold adjustment process is as follows Figure 2 : First, obtain load parameters, calculate the load index based on these load parameters, adjust hyperparameters based on this, then calculate and correct the hot page threshold, and perform memory page migration operations according to this hot page threshold; after migration, conduct migration effect evaluation, 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.

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

[0090] For example Figure 3 , an embodiment of the present application further provides an electronic device, including a memory 101 and a processor 102. A computer program is stored in the memory 101, and the processor 102 is configured to run the computer program to execute the steps in any of the above-described method embodiments for adjusting the hot page threshold.

[0091] For example Figure 4 , an embodiment of the present application further provides a computer-readable storage medium 201. A computer program 202 is stored in the computer-readable storage medium 201, wherein the computer program 202 is configured to execute the steps in any of the above-described method embodiments for adjusting the hot page threshold when running.

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

[0093] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for adjusting the hot page threshold.

[0094] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described method embodiments for adjusting the hot page threshold.

[0095] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner 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 implementation should not be considered to exceed the scope of the present application.

[0096] The above has introduced in detail a method, device, medium, product, and memory system for adjusting a hot page threshold. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of this application, several improvements and modifications can still be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for adjusting a hot page threshold, characterized in that Including: Obtain at least two load parameters of the memory system, and calculate a load index according to the at least two load parameters; the load index characterizes the current load state of the memory system; Determine hyperparameters corresponding to the load index according to the load index and a preset rule; the hyperparameters include a first factor affecting bandwidth and a second factor affecting the ping-pong phenomenon; Calculate a hot page threshold according to the determined hyperparameters, and perform migration processing on memory pages according to the hot page threshold.

2. The method for adjusting the hot page threshold according to claim 1, wherein After performing migration processing on memory pages according to the hot page threshold, it further includes: Obtain a feedback metric characterizing the migration effect, and determine whether the migration effect meets a preset requirement according to the feedback metric; If the preset requirement is not met, adjust the hyperparameters according to the feedback metric, and after adjusting the hyperparameters, re-enter the step of calculating the hot page threshold according to the determined hyperparameters.

3. The adjustment method of the hot page threshold according to claim 2, wherein, Obtain a feedback metric characterizing the migration effect, and determine whether the migration effect meets a preset requirement according to the feedback metric, including: Obtain the migration success rate of the memory pages and the rate of change of access latency to the memory pages after migration, and the feedback metric includes the migration success rate and the rate of change of latency; Determine whether the migration success rate is less than a preset success rate, and determine whether the rate of change of latency is greater than a preset rate of change; If the migration success rate is less than the preset success rate and the rate of change of latency is greater than the preset rate of change, determine that the migration effect does not meet the preset requirement.

4. The adjustment method of the hot page threshold according to claim 3, characterized in that, Determine whether the migration effect meets a preset requirement according to the feedback metric, including: Determine whether the migration success rate is less than the preset success rate in a continuous plurality of cycles, and determine whether the rate of change of latency is greater than a preset rate of change; If the migration success rate is less than the preset success rate in a continuous plurality of cycles and the rate of change of latency is greater than the preset rate of change, determine that the migration effect does not meet the preset requirement.

5. The adjustment method of the hot page threshold according to claim 2, characterized in that, Calculating a load index according to at least two of the load parameters, including: Calculate the load index according to at least two of the load parameters and the weights corresponding to the respective load parameters.

6. The method for adjusting the hot page threshold according to claim 5, wherein, Calculating the load index according to at least two of the load parameters and the weights corresponding to the respective load parameters, including: Based on at least two of the said load parameters and the weights corresponding to each of the said load parameters, use to calculate the said load index; L is the load index, U CPU is the utilization rate of the central processing unit, U mem is the memory utilization rate, M is the number of target migration pages, mquota is the migration quota, P is the ping-pong phenomenon ratio, w1 is the weight corresponding to U CPU corresponding weight, w2 is the weight corresponding to U mem corresponding weight, w3 is the weight corresponding to M / mquota, w4 is the weight corresponding to P; the load parameters include the utilization rate of the central processing unit, the memory utilization rate, the number of target migration pages, the migration quota and the ping-pong phenomenon ratio.

7. The adjustment method of the hot page threshold according to claim 5, characterized in that, Adjusting the hyperparameters according to the feedback metric, including: Adjust the weights corresponding to the respective load parameters according to the feedback metric; Recalculate the load index according to the adjusted weights; According to the recalculated load index, enter the step of determining hyperparameters corresponding to the load index according to the load index and a preset rule.

8. The adjustment method of the hot page threshold according to claim 1, characterized in that Determining hyperparameters corresponding to the load index according to the load index and a preset rule, including: Determine a load level according to the load index; Determine hyperparameters 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, the load level is negatively correlated with the first factor, and the load level is positively correlated with the second factor.

9. The method for adjusting the hot page threshold according to claim 1, wherein 1 < the sum value of the first factor and the second factor < 3.

10. The method for adjusting the hot page threshold according to claim 1, wherein 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 further includes: Calculate the load change rate according to at least two load parameters of the current cycle and at least two load parameters of the previous cycle, and determine whether the load change rate exceeds a preset value; If it does not exceed the preset value, enter the step of calculating the load index according to at least two of the load parameters every preset cycle; If it exceeds the preset value, directly enter the step of calculating the load index according to at least two of the load parameters.

11. The method for adjusting the hot page threshold according to claim 10, wherein After determining that it does not exceed the preset value, it further includes: Predict the load change trend according to the load change rate, and calculate the predicted load index according to the predicted load change trend; Determine the predicted hyperparameter according to the predicted load index and the preset rule, and update the hyperparameter to the predicted hyperparameter; In the next cycle, calculate the actual load index according to at least two load parameters of the next cycle, and determine whether the actual load index is the same as the predicted load index; If they are the same, determine the hyperparameter corresponding to the load index according to the predicted load index and the preset rule; If they are different, determine the hyperparameter corresponding to the load index according to the actual load index and the preset rule.

12. The method for adjusting the hot page threshold according to any one of claims 1-11, characterized in that, Calculate the hot page threshold according to the determined hyperparameter, including: Calculate the current hot page ratio threshold according to the determined hyperparameter, migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold; the migration bandwidth utilization rate is determined according to the maximum bandwidth and actual migration bandwidth of the memory system, and the ping-pong phenomenon ratio is determined according to the total number of migrated memory pages and the total number of round-trip migrated memory pages; Calculate the hot page threshold using a preset function according to the current hot page ratio threshold.

13. The method for adjusting the hot page threshold according to claim 12, wherein Calculate the hot page threshold using a preset function according to the current hot page ratio threshold, including: According to θ = Q F (1 - p) to calculate the hot page threshold, where θ is the hot page threshold, Q F (·) is the quantile function of the page access frequency histogram, p is the current hot page proportion threshold, and the preset function is Q F (·).

14. The method for adjusting the hot page threshold according to claim 12, wherein After calculating the current hot page ratio threshold according to the determined hyperparameter, migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold, it further includes: Judge whether the target number of migrated 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 according to p = max(p min , p / 2); p is the current hot page ratio threshold, and p min is the minimum hot page ratio threshold, and max is the maximum value function.

15. The method for adjusting the hot page threshold according to claim 12, wherein After calculating the current hot page ratio threshold according to the determined hyperparameter, migration bandwidth utilization rate, ping-pong phenomenon ratio, and historical hot page ratio threshold, it further includes: Compare 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, update 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, update the current hot page ratio threshold to the minimum hot page ratio threshold.

16. The method for adjusting the hot page threshold according to claim 12, wherein After calculating the hot page threshold using a preset function according to the current hot page ratio threshold, it further includes: Calculate the statistical error boundary according to the current hot page ratio threshold and the sample size of the memory pages; the statistical error boundary characterizes the reliability of the hot page threshold; Judge whether the hot page threshold is less than the statistical error boundary; If it is less than, determine that the hot page threshold is unreliable, and update the current hot page ratio threshold according to p = max(p min , p / 2), and recalculate 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.

17. An electronic device, characterized in that, Include: A memory for storing a computer program; A processor for implementing the steps of the method for adjusting the hot page threshold according to any one of claims 1 to 16 when executing the computer program.

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

19. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the method for adjusting the hot page threshold according to any one of claims 1 to 16 when executed by a processor.

20. A memory system, characterized in that, Including the electronic device according to claim 17.

Citation Information

Patent Citations

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

    CN114442928A

  • Memory hot page identification and migration method and system and medium

    CN116578409A

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

    CN117992857A

  • Memory management method and device

    CN119493657A

  • Hot page selection in multi-level memory hierarchies

    US20160378655A1

Cited By

  • Memory control method and memory storage device

    CN121433586A

  • Memory control method and memory storage device

    CN121433586B

  • Multi-layer memory management method and device, storage medium and electronic equipment

    CN121957911A

  • Method and device for managing multi-layer memory, storage medium and electronic device

    CN121957911B