ext4 文件系统的一些记录
https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
ext4 权威说明
对ext4的extent有解释,有实际查看;
http://blog.csdn.net/evilcode/article/details/7006925
ext4的nodealloc相关分析
在一些特定的情况下,writeback性能还会差,有人怀疑是众多小块写,也可能是磁盘个数多,nr_request太大导致其他资源不足。
关于writeback vs order(http://stackoverflow.com/questions/12845319/ordered-mode-vs-writeback-mode)
If we don't go much in detail , then the answer to the query is yes (at least in filesystem like ext3).In both the modes only filesystem metadata is written into the journal. The difference between writeback mode and ordered mode is that in Ordered mode filesystem groups metadata and relative data blocks so that data blocks are written to disk before the metadata is logged while in ordered only metadata is logged (& data blocks are not written into disk at all).
ii. From the implementation perspective(in terms of ext3), in ordered mode an additional function journal_dirty_data( ) is invoked on every buffer of data in the page to insert the buffer in a proper list of the active transactions. The JBD layer ensures that all buffers in this list are written to disk before the metadata buffers of the transaction.After that generic_commit_write( ) function is invoked, which inserts the data buffers in the list of the dirty buffers of the owner inode. In writeback mode , no such function like journal_dirty_data( ) is invoked on data buffers and only generic_commit_write( ) is called.
关于barrier(http://baike.baidu.com/view/2220807.htm)
磁 盘上配有内部缓存,以便重新调整批量数据的写操作顺序,优化写入性能,因此文件系统必须在日志数据写入磁盘之后才能写 commit 记录,若 commit 记录写入在先,而日志有可能损坏,那么就会影响数据完整性。Ext4 默认启用 barrier,只有当 barrier 之前的数据全部写入磁盘,才能写 barrier 之后的数据。(可通过 "mount -o barrier=0" 命令禁用该特性。)
-o discard 利于SSD类TRIM功能,但是看官方文档貌似认为还需要更多测试,到2.6.37似乎是比较稳定了。https://patrick-nagel.net/blog/archives/337
不用discard因为在频繁删除小文件的时候,sync会比较长时间;在系统清闲的时候调用fstrim可能更好;不过看起来fstrim不像是多么稳妥的方式,企业环境下还是不要用为好,借助SSD自己的驱动来做就好了。
ext4 文件系统的一些记录的更多相关文章
- 使用hexdump工具追踪EXT4文件系统中的一个文件
昨天追踪EXT4文件系统的过程中出了点问题,就是找不到文件,于是试了一下追踪FAT32文件系统的,成功之后有了点信心,今天继续嗑EXT4文件系统,终于找到啦,记录一下. 操作系统:linux(cent ...
- CentOS中对ext4文件系统做磁盘配额
1.修改/etc/fstab文件,使ext4文件系统支持磁盘配额. UUID="9e6dc1e8-4fc1-4984-be38-524573572d41" /mnt/ext ext ...
- Ext4文件系统架构分析(二)
接着上一篇博文,继续分析Ext4磁盘布局中的元数据. 1.7 超级块 超级块记录整个文件系统的大量信息,如数据块个数.inode个数.支持的特性.管理信息,等待. 如果设置sparse_super特性 ...
- 一例Ext4文件系统fsck后损坏的修复过程
1.故障发生背景 Ext4文件系统没有umount下来,之后做了fsck操作检查一致性,结果导致Ext4文件mount不上(有时也会表现为导致目录变成了文件). 报错提示信息:mount: wrong ...
- linux操作系统故障处理-ext4文件系统超级块损坏修复
linux操作系统故障处理-ext4文件系统超级块损坏修复 背景 前天外面出差大数据测试环境平台有7台服务器挂了,同事重启好了五台服务器,但是还有两台服务器启动不起来,第二天回来后我和同事再次去机 ...
- 恢复ext4文件系统superblock
恢复ext4文件系统superblock 1. Create ext4 文件系统. [root@localhost ~]# mkfs.ext4 /dev/vdb1 [root@localhost ~] ...
- ext4文件系统的delalloc选项造成单次写延迟增加的分析
最近我们的服务进程遇到kill -15后处于Z的状态,变为了僵尸进程,经过/proc/{thread_id}/stack查看其上线程的栈,发现是卡在了fwrite的过程中,而我们的系统中所有文件系统挂 ...
- Ext4文件系统架构分析(一)
本文描述Ext4文件系统磁盘布局和元数据的一些分析,同样适用于Ext3和Ext2文件系统,除了它们不支持的Ext4的特性外.整个分析分两篇博文,分别概述布局和详细介绍各个布局的数据结构及组织寻址方式等 ...
- Ext4文件系统架构分析(三)
ioctl源码分析之交换两个文件的物理extents 1. 交换两个文件的extents Ext4 的EXT4_IOC_MOVE_EXT命令用于交换两个文件的extents,实际上是交换两个文件的对应 ...
随机推荐
- call_user_func_array使用原型
If you need to call object and class methods in PHP < 4.0.4, the following code ought to do the t ...
- Calico在Kubernetes中的搭建
一,需求 Kubernetes官方推荐的是Flannel,但是Flannel是一个overlay的网络,对性能会有一定的影响.Calico恰好能解决一下overlay网络的不足. Calico在Kub ...
- 《ASP.NET MVC4 WEB编程》学习笔记------UrlHelper
HtmlHelper帮助我们生成Html标记代码:UrlHelper帮助我们生成URL链接地址 我们学习一下UrlHelper帮助类,看类名也都知道这个类是用来帮我们生成URL在ASP.NET MVC ...
- 【转】MySQL中增加sequence管理功能(模拟创建sequence)
1.oracel可以直接支持sequence,但是mysql不支持sequence,因此我们要通过模拟sequence的方法在mysql中创建sequence.模拟sequence的方法:项目场景:项 ...
- 使用php递归计算目录大小
统计一个目录大小,因为不知道目录中子目录的深度,所以for循环很难实现,但是用递归调用很容易实现,只要统计出一个目录中所有文件的大小,那么每一次调用就可以了,随便建了个目录,建立一些文件,方法代码如下 ...
- python chm 中文帮助 (2.7 和 3.4)
sphinx-build 生成的(htmlhelp) 存在2个问题 1.生成的html 编码 cp2152,需要修改/sphinx/builders/html.py ctx['encoding'] = ...
- Java for LeetCode 189 Rotate Array
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array ...
- CodeForces - 420A (字符对称问题)
Start Up Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submit Sta ...
- 最小的N个和(codevs 1245)
1245 最小的N个和 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题解 查看运行结果 题目描述 Description 有两个长度为 N ...
- WMI
https://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM#Windowsslavesfailt ...