pgbench

by CloudNativePG

Helm chartv0.1.0Verified publisher

A Helm chart that starts a CNPG Cluster and executes a PgBench job on it.

About this chart

pgbench

A Helm chart that starts a CNPG Cluster and executes a PgBench job on it.

Homepage: https://cloudnative-pg.io

Maintainers

NameEmailUrl
Jitendra[email protected]

Source Code

Values

KeyTypeDefaultDescription
cnpg.existingClusterboolfalseWhether the benchmark should be run against an existing cluster or a new one has to be created
cnpg.existingCredentialsstring""The name of a Secret of type basic-auth containing the existing cluster credentials
cnpg.existingDatabasestring""The port where PostgreSQL is listening on the specified host (default: 5432)
cnpg.existingHoststring""The address of the existing cluster (default: empty)
cnpg.existingPortstring""The name of the existing database (default: empty)
cnpg.imagestring"ghcr.io/cloudnative-pg/postgresql:14.5"The PostgreSQL image used by CNPG and PgBench.
cnpg.instancesint1The amount of PostgreSQL instances in the CNPG Cluster.
cnpg.monitoringobject{"customQueriesConfigMap":[],"customQueriesSecret":[]}Configures custom queries for monitoring. The arrays accept a Dictionary made by name: string (resource name), key: string (resource data field containing the queries). Documentation on the accepted values: https://docs.enterprisedb.io/cloud-native-postgresql/latest/monitoring/
cnpg.nodeSelectorobject{"workload":"postgres"}Dictionary of key-value pairs used to define the nodes where the cluster instances can run; used to avoid pgbench and PostgreSQL running on the same node.
cnpg.pooler.instancesint0The number of pooler replicas that receive the connections. If >0 the benchmarks are run with connection pooling
cnpg.pooler.nodeSelector.workloadstring"pooler"
cnpg.pooler.pgbouncer.parametersobject{}PgBouncer configuration.
cnpg.pooler.pgbouncer.poolModestring"session"The pool mode, accepted values: session, transaction
cnpg.postgreSQLParametersobject{"log_autovacuum_min_duration":"1s","log_checkpoints":"on","log_lock_waits":"on","log_min_duration_statement":"1000","log_statement":"ddl","log_temp_files":"1024","maintenance_work_mem":"128MB","shared_buffers":"512MB"}Dictionary of key-value pairs representing PostgreSQL configuration.
cnpg.storage.sizestring"1Gi"The size of the PVCs used by CNPG instances.
cnpg.storage.storageClassstring""The storage class used to create PVCs for CNPG instances.
pgbench.clientsint1The number of clients used by pgbench.
pgbench.initializebooltrueInvoke the initialization mode (TPC-B-like test scenario)
pgbench.jobsint1The number of jobs used by pgbench.
pgbench.nodeSelectorobject{"workload":"pgbench"}Dictionary of key-value pairs used to define the nodes where the pgbench pod can run; used to avoid pgbench and PostgreSQL running on the same node.
pgbench.reportLatenciesboolfalseReport the average per-statement latency (execution time from the perspective of the client) of each command after the benchmark finishes. See below for details
pgbench.scaleFactorint1Scale factor used to initialize pgbench (if initialize is set to true).
pgbench.skipVacuumboolfalsePerform no vacuuming before running the test.
pgbench.timeint30The amount of seconds the pgbench will run for.
pgbench.warmTimeint0If >0, run an initContainer that runs pgbench for the defined amount of time (using the -T option) with the same clients and jobs that will be used for the main pgbench run; can be useful with storage classes that allow I/O bursts where could affect the actual benchmark result.

Autogenerated from chart metadata using helm-docs v1.11.0

Deploy pgbench with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pgbench on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpgbench is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply