Linux上free命令的输出及其他
一、明确概念
- A buffer is something that has yet to be "written" to disk.
- A cache is something that has been "read" from the disk and stored for later use.
也就是说buffer是用于存放要输出到disk(块设备)的数据的,而cache是存放从disk上读出的数据。
从应用场景上看:Buffer 更多的(场景)是减小写操作的冲击,而 Cache 主要用于减小读 I/O 的重复开销。
The terms "buffer" and "cache" tend to be used interchangeably, note however they represent different things.
(1)A buffer is used traditionally as an intermediate temporary store for data between a fast and a slow entity.
As one party would have to wait for the other affecting performance, the buffer alleviates this by allowing entire
blocks of data to move at once rather then in small chunks. The data is written and read only once from the buffer.
Furthermore, the buffers are visible to at least one party which is aware of it.
(2)A cache on the other hand by definition is hidden and neither party is aware that caching occurs. It as well
improves performance but does that by allowing the same data to be read multiple times in a fast fashion.
A further explanation of the differences between two can be found here.
二、命令输出
total used free shared buffers cached
Mem: 498 154 343 0 23 65
-/+ buffers/cache: 65 433
Swap: 1023 0 1023
Men:total = Men:used + Men:free
已使用 -buffers/cache = Mem:used - Men:buffers - Men:cached = 154-23-65 = 154-88 = 66 (1024byte = 1M )
还剩余 +buffers/cache = Men:free + Men:buffers + Men:cached = 343+23+65 = 343+88 = 431
参考
美团:磁盘I/O那些事
Linux上free命令的输出及其他的更多相关文章
- Linux上free命令的输出
一.明确概念 A buffer is something that has yet to be "written" to disk. A cache is something t ...
- 如何在屏幕上查看命令的输出以及在Linux中写入文件
在Linux中输出命令可以做很多事情(http://www.nanke0834.com) 您可以将命令的输出分配给变量,将其发送到另一个命令/程序以通过管道进行处理或将其重定向到文件以进行进一步分析. ...
- [转帖]如何在Linux上使用命令行查看硬件信息
如何在Linux上使用命令行查看硬件信息 时间:2016-01-13 作者:admin 分类:新手入门 阅读:126次 http://embeddedlinux.org.cn/emb-linux/ ...
- LINUX上一个命令计算PI
Linux上一个命令计算PI – 笑遍世界 http://smilejay.com/2017/11/calculate-pi-with-linux-command/ [root@d1 goEcho]# ...
- [编译] 7、在Linux下搭建安卓APP的开发烧写环境(makefile版-gradle版)—— 在Linux上用命令行+VIM开发安卓APP
April 18, 2020 6:54 AM - BEAUTIFULZZZZ 目录 0 前言 1 gradle 安装配置 1.1 卸载系统默认装的gradle 1.2 下载对应版本的二进制文件 1.3 ...
- Linux上常用命令整理(一)—— cat
近几个月刚从windows上转过来,开始慢慢熟悉linux,先不撕比到底哪个更好,首先要怀着相互借鉴的精神去了解各个平台. Linux上做开发,除去使用文本编辑器做开发的大神之外,大家(包括我这种菜鸟 ...
- 【Linux】将一个命令的输出发送给另外一个命令
一个命令的输出可以作为下一个命令的输入,下一个命令的输出又会传递给下一个命令 我们通常使用管道和子shell的方法来组合多个命令的输出 格式 $ cmd1 |cmd2 | cmd3 这里的3个组合命令 ...
- Linux上常用命令整理(二)—— paste
上一篇整理了cat指令的几个基本常见用法,这次整理一下paste指令的基本用法. cat paste cut grep paste paste可以简单的理解为把两个文件的内容按列合并,与cat命令直接 ...
- hadoop,spark,linux上常用命令
记下常用命令,慢慢补充 1.hadoop 查看hdfs上的目录: hadoop fs -ls /给hdfs上目录授予权限: hadoop fs -chmod 777 /tmp/hive 在hdfs ...
随机推荐
- Struts1小案例问题教训总结(含中文乱码问题及解决)
1. 提交form后页面空白,没有任何显示,Debug发现form的validate()以及action的execute()根本没有被调用. 原因:validate()和execute()有2个互为o ...
- PHP代码审计学习之命令执行漏洞挖掘及防御
[1]可能存在命令执行漏洞的函数: 00x1:常用的命令执行函数:exec.system.shell_exec.passthru 00x2:常用的函数处理函数:call_user_func.call_ ...
- Spring Boot+Drools规则引擎整合
目的 官方的Drools范例大都是基于纯Java项目或Maven项目,而基于Spring Boot项目的很少. 本文介绍如何在Spring Boot项目上加上Drools规则引擎. POM依赖 POM ...
- nodejs之express的使用
Express是目前最流行的基于Node.js的Web开发框架,可以快速的搭建一个完整功能的网站. Express框架建立在内置的http模块上,http模块生成服务器的原始代码如下. var htt ...
- Android 编程下字库的使用
在安卓操作系统下对于 TextView 字体的支持很有限,默认情况下 TextView 的 typeface 属性支持 "Sans","serif"," ...
- 使用Fiddler调试线上JS代码
在下面的命令框输入“select script”回车来筛选js请求 将HTTP请求重定向到本地的文件,进行web调试.这种调试方式不需要发布到线上再验证,避免了修改不成功.对用户造成影响的风险 左边一 ...
- WebAPI发布IIS报错问题
1.看IIS中处理程序映射中有没有注册:ExtensionlessUrlHandler-Integrated-4.0 没有的话需要在[运行]中注册:aspnet_regiis.exe 2.配置文件中要 ...
- JUnit小记
一.参数测试 /** * 1.更改测试运行器为RunWith(Parameterized.class) * 2.声明变量用来存放预期值与结果值 * 3.为测试类声明一个带有参数的公共构造方法,并在其中 ...
- pandas基础: Series和DataFrame的简单介绍
一.pandas 是什么 pandas 是基于 NumPy 的一个 Python 数据分析包,主要目的是为了数据分析.它提供了大量高级的数据结构和对数据处理的方法. pandas 有两个主要的数据结构 ...
- JDK动态代理具体解释
首先说一下动态代理和静态代理的差别: 静态代理:是预先写好或由特定工具自己主动生成的代码.再对其编译.在程序执行前.代理类的.class文件就已经存在了. 动态代理:代理是在程序执行时,运用反射机制动 ...