DWARFS-ENV(7)

πŸ“¦
version 0.15.8 Β· 2 versions
, in nixpkgs unstable

🌸 DWARFS-ENV(7) β€” the env var glow-up

okay so bestie, welcome to dwarfs-env from the Miscellaneous Information Manual, aka the page where the DwarFS tools' environment variables live. literally just environment variables. that's the whole vibe. ✨


πŸ’œ NAME

dwarfs-env β€” DwarFS Environment Variables. yes that's it. that's the name. iconic of it honestly.


πŸ¦‹ DESCRIPTION

bestie listen πŸ‘‘ the DwarFS tools read the following environment variables to configure certain aspects of their behavior. like little knobs you can turn from outside the program. no cap.

πŸŽ€ DWARFS_IOLAYER_OPTS

okay so DWARFS_IOLAYER_OPTS is the main character here πŸ’… you can use it to configure certain aspects of the I/O layer that all DwarFS tools use. the value is a comma-separated list of key-value pairs (or just keys if it's a boolean option). here's what you can set:

  • max_eager_map_size=value β€” the maximum size of a file that'll get eagerly mapped into memory when it's opened. anything bigger gets accessed using on-demand mappings instead. this is mostly relevant for 32-bit systems, where the address space is limited (rip, tiny address space 😭). value can be unlimited, a size in bytes, or an integer with a suffix of k, m, or g for kibibytes, mebibytes, or gibibytes respectively. default is 1 TiB on 64-bit systems and 32 MiB on 32-bit systems. slay.
  • open_mode=mmap|read β€” picks between memory-mapped I/O (mmap) and using "standard" read calls (pread) to access file data. default is mmap because it's generally more efficient, periodt. but ⚠️ if you've got trouble with like unreliable hardware or unstable network filesystems, this can easily make a process accessing a memory-mapped file crash with a bus error (SIGBUS). scary, i know πŸ’€ in those cases you can try switching to read mode, which should prevent such crashes and instead deliver proper I/O error messages that are genuinely useful for finding the root cause of the problem. a whole glow-up for debugging ngl.
fr fr: if your network filesystem is acting sus, open_mode=read might be your new bestie 🫢

🧚 AUTHOR

Written by Marcus Holland-Moritz. we stan. πŸ’–


Copyright (C) Marcus Holland-Moritz. periodt.


⭐ SEE ALSO

go read these next, bestie, they're all linked:


filed under: Miscellaneous Information Manual, DWARFS-ENV(7), dated January 1980 (yes really, that date is giving time traveler energy πŸ•°οΈβœ¨). mwah, go configure your I/O layer responsibly πŸ’…

πŸ“¦ where this page comes from