obnam-benchmark(1) benchmark obnam


obnam-benchmark [--config=FILE] [--description=DESCRIPTION] [--drop-caches] [--dump-config] [--dump-memory-profile=METHOD] [--dump-setting-names] [--file-size=SIZE] [--generate-manpage=TEMPLATE] [--generations=N] [-h] [--help] [--larch-branch=DIR] [--list-config-files] [--log=FILE] [--log-keep=N] [--log-level=LEVEL] [--log-max=SIZE] [--log-mode=MODE] [--no-default-configs] [--obnam-branch=DIR] [--output=FILE] [--profile-name=PROFILE-NAME] [--results=DIR] [--seivot-branch=DIR] [--seivot-log=SEIVOT-LOG] [--sftp-delay=SFTP-DELAY] [--size=PAIR] [--use-sftp-repository] [--use-sftp-root] [--verify] [--version] [--with-encryption] [FILE]...


obnam-benchmark benchmarks the obnam(1) backup application, by measuring how much time it takes to do a backup, restore, etc, in various scenarios. obnam-benchmark uses the seivot(1) tool for actually running the benchmarks, but makes some helpful assumptions about things, to make it simpler to run than running seivot directly.

Benchmarks are run using two different usage profiles: mailspool (all files are small), and mediaserver (all files are big). For each profile, test data of the desired total size is generated, backed up, and then several incremental generations are backed up, each adding some more generated test data. Then other operations are run against the backup repository: restoring, listing the contents of, and removing each generation.

The result of the benchmark is a .seivot file per profile, plus a Python profiler file for each run of obnam. These are stored in ../benchmarks. A set of .seivot files can be summarized for comparison with seivots-summary(1). The profiling files can be viewed with the usual Python tools: see the pstats module.

The benchmarks are run against a version of obnam checked out from version control. It is not (currently) possible to run the benchmark against an installed version of obnam. Also the larch Python library, which obnam needs, needs to be checked out from version control. The --obnam-branch and --larch-branch options set the locations, if the defaults are not correct.


add FILE to config files
describe benchmark
drop kernel buffer caches
write out the entire current configuration
make memory profiling dumps using METHOD, which is one of: none, simple, meliae, or heapy (default: simple)
write out all names of settings and quit
how big should files be?
fill in manual page TEMPLATE
benchmark N generations (default: 5)
-h, --help
show this help message and exit
use DIR as the larch branch (default: /sbuild-nonexistent/larch/trunk)
list all possible config files
write log entries to FILE (default is to not write log files at all); use "syslog" to log to system log, or "none" to disable logging
keep last N logs (10)
log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug)
rotate logs larger than SIZE, zero for never (default: 0)
set permissions of new log files to MODE (octal; default 0600)
clear list of configuration files to read
use DIR as the obnam branch to benchmark (default: .)
write output to FILE, instead of standard output
short name for benchmark scenario
put results under DIR (../benchmarks)
use DIR as the seivot branch (default: installed seivot)
seivot log setting
add artifical delay to sftp transfers (in milliseconds)
add PAIR to list of sizes to benchmark (e.g., 10g/1m)
access the repository over SFTP (requires ssh to localhost to work)
access the live data over SFTP (requires ssh to localhost to work)
verify restores
show program's version number and exit
run benchmark using encryption


This variable must be set. It controls where the temporary files (generated test data) is stored. If this variable was not set, they'd be put into /tmp, which easily fills up, to the detriment of the entire system. Thus. obnam-benchmark requires that the location is set explicitly. (You can still use /tmp if you want, but you have to set TMPDIR explicitly.)


The default directory where results of the benchmark are stored, in a subdirectory named after the branch and revision numbers.


To run a small benchmark:
TMPDIR=/var/tmp obnam-benchmark --size=10m/1m

To run a benchmark using existing data:

TMPDIR=/var/tmp obnam-benchmark --use-existing=$HOME/Mail

To view the currently available benchmark results:

seivots-summary ../benchmarks/*/*mail*.seivot | less -S
seivots-summary ../benchmarks/*/*media*.seivot | less -S

(You need to run seivots-summary once per usage profile.)