简单介绍advanced format disks(4K扇区磁盘)的产生与标准,并对比512e磁盘分区对齐与不对齐时的性能。
Linux blktrace
Java的Error和Exception
简单记录一下Java的Error和Exception的区别,以及checked和unchecked的区别。
MTU,MSS和TSO
简单介绍MTU,TCP MSS和TSO。
linux iostat详解
首先介绍struct disk_stats的字段,接着介绍如何基于这些字段生成/proc/diskstats,然后介绍如何基于/proc/diskstats生成iostat的输出。本文基于linux kernel 3.19.8。
Rust语法笔记
看Programing Rust一书记录的一些细节,供查阅。
LevelDB的LRUCache
本文简要介绍一下LevelDB中LRUCache的实现。
C++11中的atomic
第1节和第2节简单介绍g++ (GCC) 4.8.5的atomic实现。
Wandering Tree
There is a whitepaper on the UBIFS page, and LWN wrote about it in the LogFS article.
The on-flash tree looks much like the structure used by ext2. There are some differences in how it is managed, however. The log structure of the filesystem implies that blocks cannot be rewritten in place; any time a block is changed it must be moved and written to a new location. If there are pointers to the moved block (think about the usual indirect blocks used to store the layout of larger files), the blocks containing the pointers must also be changed, and thus moved. That, in turn, will require changes at the next level up in the tree. Thus changes at the bottom of the tree will propagate upward all the way to the root. This is the “wandering tree” algorithm. One of the advantages is that the old filesystem structure remains valid until the root is rewritten - a crash could cause the loss of the last operation, but it will leave previous data and the structure of the filesystem intact.
Actually managing the entire directory tree as a wandering tree would be expensive; beyond that, files with multiple hard links break the tree structure and make wandering trees much harder to implement. So the actual tree implemented by LogFS just has two levels. There is an “inode file” containing the inode structures for every file and directory existing within the filesystem; each inode then points to the associated blocks holding the file’s data. Directory entries contain a simple integer index giving the inode offset within the inode file. So changes to an inode only require writing the inode itself and the inode file; the rest of the directory structure need not be touched.
使用block_dump观察block io
Linux提供了一种机制,可以用来dump出block io详情,即/proc/sys/vm/block_dump。