In order to make clear about the difference between “buffers and cached” from the ‘top’ result, here are the operations and observations, the server is of about 50G memory.
1. cat /dev/vg00/lvol8 >/dev/null
buffers increased about 10G, while cached doesn’t change.
2. cat /dev/vg00/lvol8 >/dev/null (again)
buffers and cached doesn’t change
3. dd if=/dev/zero of=test.data bs=10M count=1000
cached increased about 10G, while buffers doesn’t change.
4. cp test.data test.1
cached increased another 10G, while buffers doesn’t change.
5. rm test.1
cached decreased about 10G and free memory increased 10G.
6. cat bigfile.txt >/dev/null
cached increased about 1G (size of bigfile).
参考:
http://www.lupaworld.com/home-space-do-blog-uid-56821-id-149454.html
本文通过一系列实验操作展示了Linux系统中buffers与cached内存的具体行为差异。通过对不同文件操作的观察,如读取大文件和创建临时文件等,揭示了buffers与cached在内存管理中的角色及其对系统性能的影响。
820

被折叠的 条评论
为什么被折叠?



