Skip to content

Latest commit

 

History

History
265 lines (148 loc) · 4.72 KB

stress.md

File metadata and controls

265 lines (148 loc) · 4.72 KB

Stress

The tlp-stress operator manages Stress instances. There are a few top-level fields that divide the spec into logical sections.

StressConfig

StressConfig contains properties that map to tlp-stress command line options.

The following properties are supported in spec.stressConfig:

workload

description: The tlp-stress profile to run. Workloads includes:

  • KeyValue
  • BasicTimeSeries
  • CountersWide
  • LWT
  • Locking
  • Maps
  • MaterializedViews
  • RandomPartitionAccess
  • UdtTimeSeries
  • AllowFiltering

type: string

required: no

default: KeyValue


consistencyLevel

description: The consistency level for reads/writes.

type: string

required: no

default: LOCAL_ONE


partitions

description: The max value of the integer component of first partition key. See human readable strings for acceptable values.

type: string

required: no

default: 0


dataCenter

description: The data center to which requests should be set.

type: string

required: no

default: N/A


duration

description: The duration of the stress test. See human readable strings for acceptable values.

type: string

required: no

default: 0


dropKeyspace

description: Drop the keyspace before starting.

ype: boolean

required: no

default: false


iterations

description: Number of operations to perform. See human readable strings for acceptable values.

type: string

required: no

default: 0


readRate

description: The frequency of read requests expressed as a fraction.

type: string

required: no

default: Varys according to workload


populate

description: Prepopulate Cassandra with the specified number of rows before starting the test. See human readable strings for acceptable values.

type: string

required: no

default: 0


concurrency

description: The number of concurrent queries allowed.

type: integer

required: no

default: 100


partitionGenerator

description: The method of generating partition keys. Supports random, normal, gaussian, and sequence.

type: string

required: no

default: random


replication

description: The replication strategy to use for Cassandra. SimpleStrategy is expressed as an integer while NetworkTopologyStrategy is expressed as a map of data center to RF. Here are a couple examples to illustrate:

replication:
  simpleStrategy: 3
replication:
  networkTopologyStrategy:
    dc1: 3
    dc2: 4
    dc3: 3

type: string

required: no

default: simpleStrategy: 3

Human Readable Strings

tlp-stress allows values for several parameters to be expressed as human readable strings. Instead of writing one billion as 1000000000, you can instead write 1b.

Human readable strings are validated using this regex:

^(\d+)([BbMmKk]?$)

The following fields support human readable strings:

  • partitions
  • iterations
  • populate
  • duration

Note that duration is a bit different than the other fields. It is not governed by the above regex and supports values like:

  • 1h --> 1 hour
  • 1m --> 1 minute
  • 1d --> 1 day
  • 3h 30m --> 3 hours, 30 minuntes
  • 1d 6h 20m --> 1 day, 6 hours, 20 minutes

JobConfig

spec.jobConfig provides some configuration over the k8s job that the operator creates. It supports the following fields:

backoffLimit

description: The number of retries before marking the job as failed.

type: integer

required: no

default: 6


parallelism

description: Specifies the max number of pods the job should run at any given time.

type: integer

required: no

default: 1

CassandraConfig

spec.cassandraConfig provides details about the Cassandra cluster, namely how to connect. It supports the following fields:

cassandraService

description: The headless service for the Cassandra cluster. This service provides the endpoints to which tlp-stress will connect. This is used only when neither cassandraCluster nor cassandraClusterTemplate is specified.

type: string

required: no

default: N/A


cassandraCluster

description: The name of a CassandraCluster object, generated by the CassKop opertor. This is used only if cassandraClusterTemplate is not specified.

type: string

required: no

default: N/A


cassandraClusterTemplate

description: Describes a CassandraCluster which will be created. See CassKop integration for more details.

type: CassandraClusterTemplate

required: no

default: N/A

Status

The status subresource defines one field, jobStatus. This is simply a copy of the job's status.