AFS_AETHER_LOOKUP_TTL_SECS
Deep-dive reference for:
AFS_AETHER_LOOKUP_TTL_SECS
Status
active
Audience
production/user
Type and Default
- Type: integer seconds (
u64, must be> 0). - Default:
60seconds.
What It Does
Controls the default metadata/lookup TTL used by Aether for positive inode/path cache entries.
This value controls how long metadata can be reused before Aether revalidates from the backend path.
Important separation:
AFS_AETHER_LOOKUP_TTL_SECSis for positive metadata lookups/getattr.AFS_AETHER_NEGATIVE_LOOKUP_TTL_SECSis forENOENTcaching.AFS_AETHER_DIR_CACHE_TTL_SECSis for directory listing cache TTL.
Where It Is Applied
- Config parsing/resolution populates
Config.lookup_ttl. - Mount startup wires it into:
InodeTable::new(options.lookup_ttl)(default inode metadata cache TTL),LookupConfig::new(options.lookup_ttl)(lookup/getattr default TTL fallback),CacheTtlConfig.metadata(fuse adapter metadata/file cache TTL).
LookupServiceandGetattrServiceuse it when engine responses do not provide explicit TTLs.- Local engine metadata update paths also upsert inode metadata using this TTL.
Input Surfaces
- Env:
AFS_AETHER_LOOKUP_TTL_SECS=<seconds> - Config file (
aether.toml):lookup_ttl_secs = <seconds> - CLI override:
aether mount --metadata-ttl <seconds>
Resolution and Override Order
- Built-in default (
60s) aether.toml(lookup_ttl_secs)- Env (
AFS_AETHER_LOOKUP_TTL_SECS) - CLI (
--metadata-ttl)
Validation and Errors
- Must parse as integer seconds.
- Must be greater than
0. - Invalid values fail config load with source-specific names, for example:
- env:
AFS_AETHER_LOOKUP_TTL_SECS - file:
<path>:lookup_ttl_secs - CLI override path:
lookup_ttl
- env:
Runtime Behavior Notes
- This is a cache freshness/performance tradeoff knob:
- higher TTL: fewer metadata round-trips, more stale-window risk,
- lower TTL: fresher metadata, more backend metadata lookups.
- Running mounts initialize TTL behavior at startup from resolved config; set this before launching mount for deterministic behavior.
Tuning Guidance
- General-purpose default:
60s. - Faster metadata freshness for high-churn trees:
3-15s. - Read-heavy mostly-static trees:
60-300s.
Quick Examples
- Env:
AFS_AETHER_LOOKUP_TTL_SECS=30 aether mount --session-id s1 --mount-dir /mnt/s1
- Config file:
lookup_ttl_secs = 120
- CLI one-off:
aether mount --metadata-ttl 20 --session-id s1 --mount-dir /mnt/s1
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/config/types/config_resolution.rspackages/aether-cli/src/cli/args/cli_option_args.rspackages/aether-cli/src/cli/args/cli_root_commands.rspackages/aether/src/mount/mount_main.rspackages/aether/src/runtime/services/lookup.rspackages/aether/src/runtime/services/getattr.rspackages/aether/src/engine/local/metadata.rspackages/afs-fuse3/src/adapter/state/adapter_state.rs