Skip to main content
The YB-TServer (Tablet Server) is responsible for storing and managing data, processing client requests, and handling replication in a YugabyteDB cluster. Proper configuration is essential for optimizing performance, managing resources, ensuring security, and maintaining high availability.

Overview

The yb-tserver executable is located in the bin directory of your YugabyteDB installation. Each YB-TServer manages tablets (sharded units of storage) and serves both YSQL and YCQL requests.
If you are using YugabyteDB Anywhere, set flags using the Edit Flags feature in the platform UI.

Configuration Categories

CategoryDescription
General ConfigurationBasic server setup, logging, and web interface
PostgreSQL ParametersYSQL-specific configuration parameters
NetworkingNetwork interfaces, RPC endpoints, DNS caching
Storage & Data ManagementData directories, WAL, sharding, CDC, TTL
Performance TuningResource allocation, memory, compaction
SecurityEncryption, SSL/TLS, authentication

Syntax

yb-tserver [flags]

Example

./bin/yb-tserver \
  --tserver_master_addrs 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \
  --rpc_bind_addresses 172.151.17.130 \
  --enable_ysql \
  --fs_data_dirs "/home/centos/disk1,/home/centos/disk2"

Online Help

To display command-line help:
./bin/yb-tserver --help
Use --helpon to display help on specific modules:
./bin/yb-tserver --helpon=<module_name>

General Configuration

Core Flags

--flagfile
string
Specifies the file to load configuration flags from. Flags must be in the same format as command line flags.
Requires restart after modification.
--version
flag
Shows version and build information, then exits.
--tserver_master_addrs
string
required
Comma-separated addresses of the masters which the tablet server should connect to. The CQL proxy also reads this flag.Default: 127.0.0.1:7100
This flag is stable and widely used in production.
--tserver_master_replication_factor
uint64
Number of master replicas. By default, detected from tserver_master_addrs, but can be specified explicitly for Kubernetes auto-discovery.Default: 0 (auto-detect)
--max_clock_skew_usec
int64
Expected maximum clock skew in microseconds between any two nodes in the deployment.Default: 500000 (500 ms)
Requires restart after modification.
--tablet_server_svc_queue_length
int32
Queue size for the tablet server to serve reads and writes from applications.Default: 5000
Requires restart after modification.
--time_source
string
Time source used by the database. Set to clockbound for highly accurate time sources.Default: ""
Using clockbound requires additional system configuration for time synchronization.

Web Server Configuration

--webserver_interface
string
Address to bind for the web server user interface.Default: 0.0.0.0 (or 127.0.0.1)
--webserver_port
int32
Port for monitoring the web server.Default: 9000
--webserver_doc_root
string
Monitoring web server home directory.Default: The www directory in YugabyteDB home
--webserver_certificate_file
string
Location of SSL certificate file (in .pem format) for the web server. If empty, SSL is disabled.Default: ""
Requires restart after modification.
--webserver_authentication_domain
string
Domain used for .htpasswd authentication. Use with --webserver_password_file.Default: ""
Requires restart after modification.
--webserver_password_file
string
Location of .htpasswd file containing usernames and hashed passwords for web server authentication.Default: ""
Requires restart after modification.

Logging Flags

--log_dir
string
Directory to write yb-tserver log files.Default: Same as --fs_data_dirs
Requires restart after modification.
--logtostderr
boolean
Write log messages to stderr instead of log files.Default: false
--max_log_size
int32
Maximum log size in megabytes. A value of 0 is silently overridden to 1.Default: 1800 (1.8 GB)
--minloglevel
int32
Minimum level to log messages. Values: 0 (INFO), 1 (WARN), 2 (ERROR), 3 (FATAL).Default: 0 (INFO)
--stderrthreshold
int32
Log messages at or above this level are copied to stderr in addition to log files.Default: 3
--stop_logging_if_full_disk
boolean
Stop attempting to log to disk if the disk is full.Default: false
--callhome_enabled
boolean
Enable or disable callhome diagnostics.Default: true

Networking

--rpc_bind_addresses
string
Comma-separated list of network interface addresses to bind for RPC connections.Default: Private IP of the host (e.g., 172.161.x.x:9100)
Values must match across all yb-tserver and yb-master configurations.
--server_broadcast_addresses
string
Public IP or DNS hostname of the server (with optional port) for server-to-server communication.Default: ""
--dns_cache_expiration_ms
int32
Duration in milliseconds until a cached DNS resolution expires.Default: 60000 (1 minute)
--use_private_ip
string
Policy for using private IP addresses for inter-node communication.Valid values:
  • never - Always use broadcast addresses
  • zone - Use private IP within zone
  • region - Use private IP within region
Default: never
--redis_proxy_bind_address
string
Address to bind the Redis proxy to.Default: ""
--cql_proxy_bind_address
string
Address to bind the CQL proxy to.Default: ""
--pgsql_proxy_bind_address
string
Address to bind the PostgreSQL proxy to.Default: ""
Requires restart after modification.

Storage and Data Management

--fs_data_dirs
string
required
Comma-separated list of mount directories where yb-tserver will create a yb-data/tserver data directory.
Changing this value after cluster creation is not supported.
--fs_wal_dirs
string
Comma-separated list of directories for write-ahead logs (WAL). Can be the same as --fs_data_dirs but not a subdirectory.Default: Same as --fs_data_dirs
--rocksdb_compact_flush_rate_limit_bytes_per_sec
int64
Rate limit for RocksDB compaction and flush operations in bytes per second.Default: 256000000 (256 MB/s)
--rocksdb_block_cache_size_bytes
int64
Size of the RocksDB block cache in bytes. Set to -1 for automatic sizing.Default: -1 (auto)
--db_block_size_bytes
int32
Size of RocksDB data blocks in bytes.Default: 32768 (32 KB)
--tablet_enable_ttl_file_filter
boolean
Enable TTL-based file filtering to improve scan performance on tables with TTL.Default: true

Performance Tuning

Memory Management

--memory_limit_hard_bytes
int64
Maximum memory this process should use in bytes. A value of 0 uses a percentage of total system memory.Default: 0
For Kubernetes, this is automatically set from pod memory limits.
--default_memory_limit_to_ram_ratio
double
Percentage of available RAM to use when --memory_limit_hard_bytes is 0.Default: 0.10 (10%)
Does not apply to Kubernetes deployments.
--use_memory_defaults_optimized_for_ysql
boolean
When true, memory division defaults are optimized for YSQL and account for available RAM and cores.Default: false (set to true with yugabyted)

Compaction Settings

--scheduled_full_compaction_frequency_hours
int32
Frequency in hours for scheduled full compaction. A value of 0 disables scheduled compaction.Default: 0 (disabled)
--auto_compact_percent_obsolete
double
Percentage of obsolete keys required to trigger automatic compaction.Default: 99
--auto_compact_min_obsolete_keys_found
uint32
Minimum number of obsolete keys required to trigger automatic compaction.Default: 10000
--auto_compact_min_wait_between_seconds
uint32
Minimum wait time in seconds between automatic compactions.Default: 0

Heartbeat Configuration

--heartbeat_interval_ms
int32
Interval in milliseconds between heartbeats sent to the master.Default: 1000 (1 second)
--heartbeat_rpc_timeout_ms
int32
Timeout in milliseconds for heartbeat RPC operations.Default: 15000 (15 seconds)
--heartbeat_max_failures_before_backoff
int32
Number of consecutive heartbeat failures before backing off.Default: 3

PostgreSQL Configuration Parameters

YugabyteDB uses PostgreSQL server configuration parameters for YSQL. You can modify these parameters using several methods, listed in order of precedence (lowest to highest):
  1. PostgreSQL server configuration flag (--ysql_pg_conf_csv)
    --ysql_pg_conf_csv=yb_bnl_batch_size=512
    
  2. Direct YSQL flag (if available with ysql_ prefix)
    --ysql_yb_bnl_batch_size=512
    
  3. Per-database setting
    ALTER DATABASE database_name SET yb_bnl_batch_size=512;
    
  4. Per-role setting
    ALTER ROLE yugabyte SET yb_bnl_batch_size=512;
    
  5. Per-session setting
    SET yb_bnl_batch_size=512;
    
  6. Per-transaction setting
    SET LOCAL yb_bnl_batch_size=512;
    
--ysql_pg_conf_csv
string
Comma-separated list of PostgreSQL configuration parameters in key=value format.Example: --ysql_pg_conf_csv="max_connections=200,shared_buffers=2GB"
--enable_ysql
boolean
Enable the YSQL API.Default: true
Must match the value on all yb-master servers.
--ysql_enable_auth
boolean
Enable YSQL authentication.Default: false
--ysql_hba_conf_csv
string
Comma-separated list of PostgreSQL host-based authentication rules.

Security

--use_client_to_server_encryption
boolean
Enable SSL/TLS encryption for client-to-server communications.Default: false
--use_node_to_node_encryption
boolean
Enable SSL/TLS encryption for node-to-node communications.Default: false
--certs_dir
string
Directory containing SSL certificate and key files.Default: ""
--allow_insecure_connections
boolean
Allow insecure connections when encryption is enabled.Default: true
--enable_ysql_conn_mgr
boolean
Enable the YSQL connection manager for connection pooling.Default: false
Requires restart after modification.
--ysql_conn_mgr_port
uint32
Port for the YSQL connection manager.Default: 5433

Metrics and Monitoring

--metrics_snapshotter_interval_ms
int32
Interval in milliseconds for metrics snapshots.Default: 30000 (30 seconds)
--export_help_and_type_in_prometheus_metrics
boolean
Include #TYPE and #HELP information in Prometheus metrics output.Default: true
--max_prometheus_metric_entries
uint32
Maximum number of Prometheus metric entries returned per scrape.Default: UINT32_MAX
--export_intentdb_metrics
boolean
Export IntentsDB statistics to Prometheus metrics.Default: true

Advanced Flags

--use_tablespace_based_transaction_placement
boolean
Use tablespace-based placement for transaction status tables.Default: false
--report_ysql_ddl_txn_status_to_master
boolean
Report YSQL DDL transaction status to master.Default: true
--pg_client_session_expiration_ms
uint64
PostgreSQL client session expiration time in milliseconds.Default: 60000 (1 minute)

See Also

Build docs developers (and LLMs) love