当前位置:网站首页>O & M troubleshooting - use hcache plug-in to troubleshoot excessive buffer/cache occupancy
O & M troubleshooting - use hcache plug-in to troubleshoot excessive buffer/cache occupancy
2022-06-28 23:05:00 【Live healthy and safe】
One hcache plug-in unit
1.1 hcache What plug-ins do
hcache Is based on pcstat Of ,pcstat You can check whether a file is cached and according to the process pid To see which files are cached .hcache On the basis of it, we add View the entire operating system Cache And according to the use Cache Characteristics of size sorting .
1.2 buffer and cache Cause of occurrence
1. When your service process When reading and writing files ,Linux The kernel is for Improve the reading and writing speed of the service , The file will be placed here buffer/cache For caching , because Linux Characteristics of service That is, everything will exist in the form of documents , So you will find that whether or not you have done large-scale reading and writing to the file , Mechanical buffer/cache It always exists , And keep increasing , This is because the network connection generated by the server is good , User agreement (UDP) Socket, too , The data system in this part will create corresponding file descriptors for the application , And these documents Use of descriptors , Will re-enter buffer/cache For reading and writing , So this is also your machine will always exist higher buffer/cache Why .
2. When the service memory is sufficient ,Linux In order to speed up the efficiency of reading and writing files, the kernel will put the files into buffer/cache in To ensure reading and writing efficiency , But in fact , Just do it After your application finishes reading and writing files ,buffer/cache This part of memory will not be released automatically , It is reserved as a buffer , Wait until your service process reads and writes the same file the next time , All operations of re initializing the memory are omitted ; So this will lead to , When your application process frequently reads and writes to different files , You will find that the service can be used directly free An important reason why memory will be less and less ; Don't buffer/cache In this endless cache, it will not be automatically released ? Of course not. , When the server is under high memory pressure , The memory will be recycled automatically , As free Space is allocated to other processes , The main one of them is the memory recycled , It is buffer/cache Buffer memory block for ;
1.3 Manual recycling mechanism
In addition to reclaiming memory when the system process memory is under great pressure , We can also do it manually buffer/cache Recycling , But because of buffer/cache It is mainly used for reading and writing files , So when you recycle files , Usually associated with a system IO Puma is high , Because the system kernel is also compared cache Whether the data in is consistent with the data in the hard disk , If there are inconsistencies, you need to write , Then the memory can be recycled ;
边栏推荐
- 【Flutter 问题系列第 71 篇】Flutter 中 Uint8List 和 Image 之间的相互转换
- Go language - reflect
- 第三章 处理机调度练习
- Online linear programming: Dual convergence, new algorithms, and regret bounds
- 两栏布局左边图片显示部分由右边内容高度决定
- Jointly explore digital technology and information security, and the fourth China Russia Digital Forum was successfully held
- With the development of industrial Internet as the starting point, the industry can enter a new stage of development
- Business atlas in super factory
- LeetCode 324 擺動排序 II[排序 雙指針] HERODING的LeetCode之路
- 小样本利器2.文本对抗+半监督 FGSM & VAT & FGM代码实现
猜你喜欢

Post-00 cloud native Engineer: use Zadig to increase revenue and reduce expenditure for the R & D of Sichuang Technology (Guangzhou public transport)

Encounter with avita 11: long lost freshness under strong product power

Business atlas in super factory

在QT进行cin(全网最清晰教程)

第三章 处理机调度练习

WMS仓库管理系统模块之波次拣货

【Word 教程系列第 1 篇】如何去除 Word 表格中的箭头

Realization of 2D code generation in micro build low code

Zadig + sonarqube, ensuring the safety of the development process

Deep virtual memory (VM)
随机推荐
2022-06-28: what does the following golang code output? A:true; B:false; C:panic; D: Compilation failed. package main import “fmt“ func main() {
一文搞懂shell脚本
Multiomics single cell data integration and regulatory reasoning based on graph linked embedding
Online linear programming: Dual convergence, new algorithms, and regret bounds
C语言-单词分析解析
Google Earth Engine(GEE)——利用sentinel-2数据进行农作物提取分析
One card can sell tens of millions, and the business expansion is faster than that of players: you don't understand the Jianghu of star cards
How to solve the problem of desktop without sound
After crossing, she said that the multiverse really exists
[deep learning] (3) encoder mechanism in transformer, complete pytoch code attached
Langage C - analyse des mots
Sample code of using redis to realize the like function
【Try to Hack】nmap
【Word 教程系列第 1 篇】如何去除 Word 表格中的箭头
CS5463代码模块解析(包含下载链接)
The Best of Many Worlds_ Dual Mirror Descent for Online Allocation Problems
oracle设置密码复杂度及设置超时退出的功能
Huawei cloud gaussdb (for redis) unveiling issue 19: inventory of six second level capabilities
Pytorch builds transformer to realize multivariable and multi step time series forecasting (load forecasting)
网上办理股票开户安全性高吗?