Skip to main content
PlanetScale for Vitess lets you adjust a curated set of VTGate, VTTablet, and MySQL parameters directly from the Clusters page in the dashboard. The defaults for each parameter depend on the size of your cluster. They are chosen to optimize performance, resource usage, and connection handling for each cluster size, but you can fine-tune them when your workload calls for it.

Where parameters are configured

ScopeComponentWhere it applies
Per branchVTGateAffects all VTGates that route queries for the branch.
Per keyspace, per branchVTTabletAffects every VTTablet (primary and replicas) in the keyspace.
Per keyspace, per branchMySQL (mysqld)Applied to the MySQL instances backing the keyspace’s tablets.
VTGate parameters are set once per branch. VTTablet and MySQL parameters are set per keyspace.

How to configure parameters

You must be a database or organization administrator to modify these settings.
1
From your PlanetScale organization dashboard, select the database you want to configure.
2
Click Clusters in the left nav.
3
Select the branch you want to configure from the Branch dropdown.
4
Choose what you want to tune:
  • VTGate settings: click VTGates at the top of the page, then open the Configuration tab.
  • VTTablet settings: select the keyspace, then click the VTTablets tab.
  • MySQL settings: select the keyspace, then click the MySQL tab.
5
Search for a parameter or scroll through the list. Use the Category filters to narrow down.
6
Update the value(s) you want to change. Each parameter shows its default, allowed range, and current override (if any).
7
Click Queue changes to add the modifications to a draft batch.
8
When you’re ready, click Apply changes to submit the batch. PlanetScale rolls the changes out to the relevant components.
You can stack changes across VTGate, VTTablets, and MySQL into a single batch before applying. To revert a parameter to its default, clear the override and apply the change.

Tracking changes

The Changes tab on the Clusters page shows the history of parameter modifications: which parameter was changed, the original and updated values, who made the change, the status, and the start and end time of the rollout.
Resizing a cluster will adjust size-dependent defaults automatically, but only for parameters you have not overridden. If you have set a parameter explicitly, that override is preserved across cluster size changes.

Configurable parameters

PlanetScale for Vitess exposes the following parameters. Defaults vary by cluster size; values shown in the dashboard reflect the current default for your cluster.

VTGate (per branch)

CategoryParameterDescription
Query executionquery-timeoutTimeout for queries sent to VTGate, in milliseconds. 0 disables the timeout.
max_memory_rowsMaximum number of rows held in memory for intermediate query results.
max_payload_sizeMaximum query payload size in bytes. 0 for unlimited.
warn_memory_rowsWarning threshold for in-memory result rows.
warn_payload_sizeWarning threshold for query payload size, in bytes.
Failover bufferingbuffer_sizeMaximum number of buffered requests during a failover.
buffer_windowDuration requests are buffered during a failover.
buffer_max_failover_durationMaximum total duration to buffer a failover before draining.
Replicationdiscovery_low_replication_lagLag threshold below which replicas are considered fully caught up.
discovery_high_replication_lag_minimum_servingMinimum number of replicas to keep serving when lag is high.
legacy_replication_lag_algorithmUse the legacy algorithm for replication lag detection.
Healthhealthcheck_timeoutTimeout for VTGate health checks against VTTablets.
min_number_serving_vttabletsMinimum number of VTTablets that must be serving for the tablet type to be considered healthy.
Networkgrpc_max_message_sizeMaximum gRPC message size, in bytes.

VTTablet (per keyspace, per branch)

CategoryParameterDescription
Connection poolsqueryserver-config-pool-sizeSize of the connection pool for serving queries.
queryserver-config-stream-pool-sizeSize of the pool used for streaming queries.
queryserver-config-idle-timeoutHow long idle connections in the query pool stay open.
queryserver-config-query-pool-timeoutMaximum time to wait for a query pool connection.
queryserver-config-txpool-timeoutMaximum time to wait for a transaction pool connection.
Transactionsqueryserver-config-transaction-capMaximum number of concurrent transactions.
queryserver-config-transaction-timeoutMaximum duration of a single transaction.
Query executionqueryserver-config-query-timeoutMaximum query duration before VTTablet kills the query.
queryserver-config-max-result-sizeMaximum number of rows returned by a single query.
queryserver-config-warn-result-sizeWarning threshold for query result size.
queryserver-config-query-cache-memoryMemory used by the query plan cache.
Protectionenable_hot_row_protectionDetect and serialize transactions contending on the same row.
hot_row_protection_concurrent_transactionsConcurrent transactions allowed per hot row.
VReplicationvreplication_copy_phase_max_innodb_history_list_lengthPause copy if the InnoDB history list grows beyond this size.
vreplication_copy_phase_durationMaximum duration of a single VReplication copy phase.
vreplication_experimental_flagsBitmask of experimental VReplication features to enable.
vreplication_max_time_to_retry_on_errorMaximum time to retry a failing VReplication stream before giving up.
vreplication-parallel-insert-workersNumber of parallel insert workers used during VReplication copy.
Schematrack_schema_versionsEnable historical tracking of schema versions.
schema-version-max-age-secondsMaximum age of tracked schema versions, in seconds.
Replicationthrottle_tablet_typesComma-separated tablet types that participate in throttling decisions.
Networkgrpc_max_message_sizeMaximum gRPC message size, in bytes.

MySQL (per keyspace, per branch)

CategoryParameterDescription
Connectionswait_timeoutSeconds an idle non-interactive connection stays open.
connect_timeoutSeconds the server waits for a connect packet before responding with Bad handshake.
Networkmax_allowed_packetMaximum size of one packet or any generated/intermediate string.
Memoryjoin_buffer_sizeBuffer used by joins that do not use indexes.
sort_buffer_sizeBuffer used by sessions that perform sorts.
tmp_table_sizeMaximum size of internal in-memory temporary tables.
max_heap_table_sizeMaximum size of user-created MEMORY tables.
InnoDBinnodb_lock_wait_timeoutSeconds an InnoDB transaction waits for a row lock.
innodb_buffer_pool_dump_pctPercentage of the buffer pool’s most recent pages dumped at shutdown.
innodb_io_capacityBaseline I/O operations per second available to InnoDB background tasks.
innodb_io_capacity_maxMaximum I/O operations per second available to InnoDB background tasks.
innodb_adaptive_hash_indexEnable the InnoDB adaptive hash index.
innodb_log_buffer_sizeSize of the buffer that holds redo log data before flushing.
innodb_max_purge_lagDelay DML when the history list exceeds this length.
innodb_max_purge_lag_delayMaximum delay, in microseconds, applied when innodb_max_purge_lag is exceeded.
innodb_purge_batch_sizeNumber of undo log pages purged in one batch.
innodb_purge_rseg_truncate_frequencyHow often the purge system truncates rollback segments.
innodb_purge_threadsNumber of background purge threads.
innodb_write_io_threadsNumber of I/O threads used for write operations.
innodb_redo_log_capacityTotal size of the InnoDB redo log.
Replicationbinlog_row_value_optionsEnables partial JSON logging in row-based binlog events.
binlog_row_imageControls which columns are included in row-based binlog events (full, minimal, noblob).
replica_parallel_workersNumber of parallel applier threads on replicas.
Transactionstransaction_isolationDefault isolation level for new transactions.
Some MySQL parameters have version-specific defaults (for example, 8.0 vs. 8.4). The dashboard always reflects the value that applies to your branch’s MySQL version.

Configuring parameters via the API and CLI

The same parameters are available through the PlanetScale API. The API uses a draft/submit workflow that mirrors the dashboard: list parameters for a branch, queue one or more changes, then submit the batch to apply them. See the API reference for the available operations under Vitess parameters and Config changes. The pscale CLI does not currently expose commands for tuning these parameters. Use the dashboard or the API.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.