ext4引入的一个新技术:延迟磁盘数据块分配

delalloc: ext4在实际将数据库写到磁盘的时候,才会从磁盘上分配块。

nodelalloc: 数据从用户空间复制到page cache时,就会从磁盘上分配块。

XFS,ZFS,btrfs,Reiser4,Ext4都支持这项优化。

Ext3,reiser3不支持。

原理

Delayed allocation plays very nicely with the two previous features mentioned, extents and multiblock allocation, because in many workloads when the file is written finally to the disk it will be allocated in extents whose block allocation is done with the mballoc allocator.

extents(An extent is a contiguous area of storage reserved for a file in a file system, represented as a range)

Comments

2015-03-12