Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
9223372036854775807
Description
In 2.14.0 the fallocate interface was added to allow efficient preallocation of space for OST objects. The preallocated space should return zeroes when read. A new tunable parameter "llite.*.fallocate_zero_blocks" was added to allow tuning the fallocate() behavior:
- =0 (default) uses unwritten extents, like ext4.
- =1 zeroes out allocated blocks immediately on the OSS
- =-1 disables fallocate (return -EOPNOTSUPP)
The default mode=0 is the standard "allocate unwritten extents" behavior used by ext4. This is by far the fastest for space allocation, but requires the unwritten extents to be split and/or zeroed when they are overwritten.
The OST fallocate mode=1 can also be set to use "zeroed extents", which may be handled by "WRITE SAME", "TRIM zeroes data", or other low-level functionality in the underlying block device. This is somewhat slower at fallocate() time (especially for very large allocations), but still avoids sending any data over the network, avoids runtime overhead from managing the extents. There is not yet an FALLOC_FL_* flag to request this behavior from the client on a per-file basis.
If fallocate() is not working properly or is undesirable to have, it can also be disabled with mode=-1 at runtime on one or more clients, or persistently on all clients.
Attachments
Issue Links
- is related to
-
LU-14286 fallocate() does not zero on-disk data
- Resolved
-
LU-3606 Implement fallocate() support for ldiskfs Lustre
- Resolved
-
LU-17055 Implement FALLOC_FL_ZERO_RANGE
- Open
-
LU-17326 Implement FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_INSERT_RANGE
- Open
-
LU-14160 Implement fallocate FALLOCATE_FL_PUNCH_HOLE support
- Resolved