COCKROACH-WORKLOAD-INIT-TTLBENCH(1)

NAME

cockroach-workload-init-ttlbench - Measures how long it takes for the row-level TTL job to run on a table.

SYNOPSIS

cockroach workload init ttlbench [pgurl...] [flags]

DESCRIPTION

Measures how long it takes for the row-level TTL job to run on a table.

The workload works as follows: 1) Drop TTL table IF EXISTS. 2) Create a table without TTL. 3) Insert initialRowCount number of rows. 4) Gets number of rows that should expire. 5) Wait for table ranges to stabilize after scattering. 6) Enable TTL on table. 7) Poll table until TTL job is complete. Note: Ops is a no-op and no histograms are used. Benchmarking is done inside Hooks and details are logged.

OPTIONS

--concurrency=40
    Number of concurrent workers

--conn-healthcheck-period=30s
    Interval that health checks are run on connections

--conn-vars=[]
    Session variables to configure on database connections

--data-loader="AUTO"
    How to load initial table data. All workloads support INSERT; some support IMPORT, which AUTO prefers if available.

--db=""
    Override for the SQL database to use. If empty, defaults to the generator name

--dns-refresh=30s
    Interval used to refresh cached DNS entries ( disables)

--drop[=false]
    Drop the existing database, if it exists

--expired-row-percentage=50
    Percentage of rows that are expired.

-h, --help[=false]
    help for ttlbench

--init-conns=16
    The number of connections to use during INSERT init

--initial-row-count=0
    Initial rows in table.

--isolation-level=""
    Isolation level to run workload transactions under [serializable, snapshot, read_committed]. If unset, the workload will run with the default isolation level of the database.

--max-conn-idle-time=2m30s
    Max time an idle connection will be kept around

--max-conn-lifetime=5m0s
    Max connection lifetime

--max-conn-lifetime-jitter=2m30s
    Jitter max connection lifetime by this amount

--method="cache_statement"
    SQL issue method (cache_statement, cache_describe, describe_exec, exec, simple_protocol)

--min-conns=0
    Minimum number of connections to attempt to keep in the pool

--operation-receiver=""
    Optional ip address:port to send latency operation metrics.

--password=""
    Optionally specify a password for the user

--prometheus-port=2112
    Port to expose prometheus metrics if the workload has a prometheus gatherer set.

--range-max-bytes=536870912
    Maximum number of bytes in range before splitting.

--range-min-bytes=134217728
    Minimum number of bytes in range before merging.

--row-message-length=128
    Length of row message.

--secure[=false]
    Run in secure mode (sslmode=require). Running in secure mode expects the relevant certs to have been created for the user in the certs/ directory.For example when using root, certs/client.root.crt certs/client.root.key should exist.

--seed=1
    Seed for randomization operations.

--ttl-batch-size=500
    Size of TTL SELECT and DELETE batches.

--user="root"
    Specify a user to run the workload as

--warmup-conns=0
    Number of connections to warmup in each connection pool

OPTIONS INHERITED FROM PARENT COMMANDS

--enterprise-require-fips-ready[=false]
    abort if FIPS readiness checks fail

--log=

Logging configuration, expressed using YAML syntax. For example, you can
 change the default logging directory with: --log='file-defaults: {dir: ...}'.
 See the documentation for more options and details. To preview how the log
 configuration is applied, or preview the default configuration, you can use
 the 'cockroach debug check-log-config' sub-command.

--log-config-file=

File name to read the logging configuration from. This has the same effect as
 passing the content of the file via the --log flag.

--log-config-vars=[]

Environment variables that will be expanded if present in the body of the
 logging configuration.

--log-dir=

--log-dir=XXX is an alias for --log='file-defaults: {dir: XXX}'.

--logtostderr[=UNKNOWN]

--logtostderr=XXX is an alias for --log='sinks: {stderr: {filter: XXX}}'. If
 no value is specified, the default value for the command is inferred: INFO for
 server commands, WARNING for client commands.

--redactable-logs=false

--redactable-logs=XXX is an alias for --log='file-defaults: {redactable:
 XXX}}'.

--vmodule=
    comma-separated list of pattern=N settings for file-filtered logging (significantly hurts performance)

SEE ALSO

cockroach-workload-init(1)

HISTORY

13-May-2026 Auto generated by spf13/cobra