失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > linux刷新dns缓存_Linux刷新文件系统缓存

linux刷新dns缓存_Linux刷新文件系统缓存

时间:2019-08-07 21:32:26

相关推荐

linux刷新dns缓存_Linux刷新文件系统缓存

linux刷新dns缓存

We may drop the file system caches on Linux to free up memory for applications. Kernels 2.6.16 and newer provide a mechanism via the/proc/to make the kernel drop the page cache and/or inode and dentry caches on command. We can use this mechanism to free up the memory. However, this is a non-destructive operation that only free things that are completely unused and dirty objects will not be freed until written out to disk. Hence, we should flush these dirty objects to disk first. We can run sync to flush them out to disk. And the drop operations by the kernel will free more memory.

我们可能会在Linux上删除文件系统缓存,以释放应用程序的内存。 内核2.6.16及更高版本通过/proc/提供了一种机制 ,以使内核根据命令删除页面缓存和/或inode和dentry缓存。 我们可以使用这种机制释放内存。 但是,这是一种非破坏性的操作,只有释放完全未使用的东西和脏对象之后,才将其释放到磁盘中,然后再释放它们。 因此,我们应该先将这些脏对象冲洗到磁盘上。 我们可以运行同步以将它们刷新到磁盘。 内核的删除操作将释放更多的内存。

We can flush caches of the file systems by two steps:

我们可以通过两个步骤来刷新文件系统的缓存:

刷新文件系统缓冲区 (Flush file system buffers)

Call the sync command:

调用sync命令:

# sync

免费的页面缓存,牙科和索引节点 (Free pagecache, dentries and inodes)

Just echoing a number to /proc/sys/vm/drop_caches:

只是在/ proc / sys / vm / drop_caches中回显一个数字:

# echo 3 > /proc/sys/vm/drop_caches

翻译自: /linux-flushing-file-system-caches/

linux刷新dns缓存

如果觉得《linux刷新dns缓存_Linux刷新文件系统缓存》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。