| System-level memory reclamation is one of the important techniques to improve the efficiency of system memory utilisation.It implements the abstraction and management of physical memory resources,relieves memory pressure by reclaiming inactive system memory,and provides a guarantee for the efficient use of memory and stable running of applications.However,with the emergence of new Internet technologies such as cloud computing and big data,the scale of data processed by applications continues to grow,system memory has become a scarce resource,and the system memory management system is facing unprecedented challenges.Firstly,system-level memory reclamation is passively triggered,and there is a large amount of inactive memory during application operation,resulting in low system memory utilisation efficiency.Secondly,in the face of complex application scenarios,the global LRU chain table mechanism for system-level memory reclamation and the memory hot and cold identification strategy only adopt the recent access hotness as the criterion for judging whether the memory is active or not,failing to consider the differences in memory sensitivity of different applications.To address the inefficiency of system memory utilisation,this thesis first proposes a performance-aware single-application memory reclamation scheme,PAPR,which takes processes as the basic unit,periodically scans application memory and actively recovers inactive application memory.The scheme is divided into the following four parts:first,page hot and cold identification,which scans the physical pages of a process several times during a certain period of time and counts the frequency of access to these pages,so as to classify the hot and cold degree of pages based on the frequency;second,process performance assessment,which is used to evaluate the performance state of the process operation and guide memory tuning;third,memory tuning,which monitors application performance indicators and quantitatively calculates the amount of different types of pages of the application Recycle volume,recursively reclaiming inactive memory.Fourth,feedback tuning,which monitors the performance changes of the process after memory reclamation and adjusts the memory reclamation strategy in time to ensure stable performance of the application.Then,in order to adapt to multi-application scenarios in production environments,this thesis will further design a multi-application memory regulation mechanism,MPAPR,based on PAPR,which can capture applications with weak memory sensitivity and recover their inactive memory to balance the performance of each application.PAPR runs safely in the kernel state as a kernel module and no security issues such as kernel memory leaks are found.To validate the effectiveness of PAPR,we have also conducted experiments with applications in different domains.The experiments show that PAPR can effectively recycle inactive memory of the application while taking into account the performance of the application,and some applications can recycle up to 25%of their memory,which greatly improves the efficiency of memory utilisation.Secondly,in multi-application scenarios,system-level memory reclamation can lead to uneven performance loss of multiple applications.In this thesis,we select the mean and variance to evaluate the degree of performance loss of applications,and to verify the effectiveness of MPAPR,we run multiple applications under different pressures.The experiments show that MPAPR can effectively regulate the memory of multiple applications and mitigate the uneven performance loss of multiple applications. |