Configuration
Xylem uses TOML configuration files (called “profiles”) for defining experiments.
Configuration File Structure
A profile is a TOML document with the following top-level sections:
[experiment]
duration = "60s"
seed = 123
[target]
protocol = "redis"
address = "127.0.0.1:6379"
[workload]
# Workload parameters
[[traffic_groups]]
name = "main"
threads = [0, 1, 2, 3]
# Rate control parameters
Sections
The configuration is divided into several sections:
- Workload Configuration - Define workload patterns, duration, and key distributions
- Transport Configuration - Configure network transport options
- Protocol Configuration - Protocol-specific settings
Basic Example
[experiment]
duration = "60s"
seed = 42
[target]
protocol = "redis"
transport = "tcp"
address = "localhost:6379"
[workload.keys]
strategy = "zipfian"
n = 10000
theta = 0.99
value_size = 100
[[traffic_groups]]
name = "group-1"
threads = [0, 1, 2, 3]
connections_per_thread = 10
max_pending_per_connection = 1
[traffic_groups.sampling_policy]
type = "unlimited"
[traffic_groups.policy]
type = "closed-loop"
[output]
format = "json"
file = "results.json"
Configuration Overrides
You can override any configuration value using the --set flag with dot notation:
# Override target address
xylem -P profile.toml --set target.address=192.168.1.100:6379
# Override experiment duration
xylem -P profile.toml --set experiment.duration=120s
# Override multiple parameters
xylem -P profile.toml --set experiment.duration=60s --set experiment.seed=999
Loading Configuration
Use the -P or --profile flag to load a profile file:
xylem -P profiles/redis-get-zipfian.toml