Files
steamcache2/docs/examples/validate-config.yaml
T
s1d3sw1ped 3fd72705fc Enhance Makefile and documentation for validation workflow
- Added new targets in the Makefile for validation, including `run-validation`, `validate-check`, and `validate-kill`, to streamline the testing process with external tools like SteamPrefill.
- Introduced a `setcap` target to manage necessary capabilities for running the server on port 80 without root access.
- Updated README.md to include detailed instructions for validating functionality, including quick start guides and troubleshooting tips.
- Improved .gitignore to exclude validation artifacts and logs, ensuring a cleaner repository.
2026-05-28 04:15:24 -05:00

52 lines
2.0 KiB
YAML

# validate-config.yaml
#
# Small dual-tier configuration intended for full-function validation of a
# built steamcache2 binary using realistic Steam client workloads driven by
# the external SteamPrefill (https://github.com/tpill90/steam-lancache-prefill)
# "benchmark" commands.
#
# Why these values?
# - Both memory and disk tiers are enabled but deliberately small.
# A modest benchmark workload (a few hundred MB to low GB) will exercise:
# * Memory tier promotions
# * Disk tier attach + writes
# * GC / eviction pressure on at least one tier
# - Conservative concurrency limits suitable for a developer laptop.
# - trusted_proxies set for 127.0.0.0/8 so that an external benchmark tool
# can simulate multiple distinct clients via X-Forwarded-For if desired.
# - upstream left empty: the server will use the incoming Host header
# (exactly what happens when you point SteamPrefill at your Lancache IP).
#
# Usage (typical dev workflow):
# make build
# ./scripts/validate-with-prefill.sh
# # In another terminal:
# SteamPrefill benchmark run -c 20 ...
#
# After the benchmark run, inspect with:
# curl -s http://localhost/metrics
#
# Tweak sizes upward if you want to run very large workloads while still
# exercising the disk tier (workload >> RAM is ideal for real disk testing).
listen_address: :80
max_concurrent_requests: 100
max_requests_per_client: 10
max_object_size: "0" # unlimited for validation (real Steam files can be large)
trusted_proxies: ["127.0.0.0/8"]
cache:
memory:
size: 128MB
gc_algorithm: lru # lru is somewhat recommeded in the project README and is better for validation since its not just using the same again
disk:
size: 512MB
path: ./validate-disk # ephemeral; clean between runs if you want a fresh test
gc_algorithm: hybrid # recommended for disk in the project README
# Empty upstream = use Host header from the client (SteamPrefill / real Steam clients).
# This matches the common "DNS points lancache.steamcontent.com at the cache" setup.
upstream: ""