Hubbry Logo
search button
Sign in
Allocate-on-flush
Allocate-on-flush
Comunity Hub
History
arrow-down
starMore
arrow-down
bob

Bob

Have a question related to this hub?

bob

Alice

Got something to say related to this hub?
Share it here.

#general is a chat channel to discuss anything related to the hub.
Hubbry Logo
search button
Sign in
Allocate-on-flush
Community hub for the Wikipedia article
logoWikipedian hub
Welcome to the community hub built on top of the Allocate-on-flush Wikipedia article. Here, you can discuss, collect, and organize anything related to Allocate-on-flush. The purpose of the hub is to conne...
Add your contribution
Allocate-on-flush

Allocate-on-flush (also called delayed allocation) is a file system feature implemented in HFS+,[1] XFS, Reiser4, ZFS, Btrfs, and ext4.[2] The feature also closely resembles an older technique that Berkeley's UFS called "block reallocation".

When blocks must be allocated to hold pending writes, disk space for the appended data is subtracted from the free-space counter, but not actually allocated in the free-space bitmap. Instead, the appended data are held in memory until they must be flushed to storage due to memory pressure, when the kernel decides to flush dirty buffers, or when the application performs the Unix sync system call, for example.

This has the effect of batching together allocations into larger runs. Such delayed processing reduces CPU usage, and tends to reduce disk fragmentation, especially for files which grow slowly. It can also help in keeping allocations contiguous when there are several files growing at the same time. When used in conjunction with copy-on-write as it is in ZFS, it can convert slow random writes into fast sequential writes.[3]

References

[edit]
  1. ^ "About Disk Optimization with Mac OS X". Support.Apple.com. Apple. 2010-02-10. Retrieved 2016-12-13.
  2. ^ LWN.net Weekly Edition for July 17, 2008 2.6.27: what's coming (part 1)
  3. ^ Cao, Mingming (3 August 2005). "Why delayed allocation is needed". ext2.sourceforge.net. Retrieved 26 September 2021.