FileSystem#
A pure file-system L2 adapter using async I/O (aiofiles). Each KV cache
object is stored as a raw .data file whose name encodes the full
ObjectKey. Does not require NIXL – works on any POSIX file system.
Required fields:
base_path: Directory for storing KV cache files.
Optional fields:
relative_tmp_dir: Relative sub-directory for temporary files during writes (atomic rename on completion).read_ahead_size: Trigger file-system read-ahead by reading this many bytes first (positive integer, optional).use_odirect:trueorfalse(defaultfalse) – bypass the page cache viaO_DIRECT.
Configuration examples:
# Basic FS adapter
--l2-adapter '{"type": "fs", "base_path": "/data/lmcache/l2"}'
# With temp directory
--l2-adapter '{"type": "fs", "base_path": "/data/lmcache/l2", "relative_tmp_dir": ".tmp"}'
# With O_DIRECT for bypassing page cache
--l2-adapter '{"type": "fs", "base_path": "/data/lmcache/l2", "use_odirect": true}'