Skip to main content

Optimizing system configuration

The number of possible setups is virtually unlimited, so this document cannot cover them all. Even similar builds and configurations can behave differently because of external factors. Your results may vary. Use these general guidelines as a starting point. Be cautious and make incremental changes. Test and observe each change before you move forward. Always focus on only one specific area at a time. Do not change the memory, storage, and CPU configurations all at once. Otherwise, it becomes nearly impossible to diagnose problems.

Memory management

These settings in /etc/sysctl.conf can optimize memory usage and disk I/O patterns:
To apply the changes, run sudo sysctl -p.

Network stack

These settings in /etc/sysctl.conf may improve network performance:

Storage configuration

For NVMe drives, optimize I/O scheduling: Storage optimization commands

Infrastructure monitoring

Monitoring is one of the most critical components of network infrastructure. This page covers monitoring, performance tuning, and alerting configuration for Cosmos SDK and Tendermint nodes.

Prometheus setup

First, install Prometheus:
This is an example Prometheus configuration:
Since v6.8.0, the node does not emit the legacy Cosmos SDK telemetry series that have OpenTelemetry replacements. Update dashboards and alerts that use them.Since v6.8.0, a freshly generated app.toml also sets prometheus-retention-time = 0 under [telemetry] (v6.7 wrote 60). With 0, the node does not create the Cosmos SDK telemetry Prometheus sink, so it does not export the few remaining telemetry series. GET /metrics?format=prometheus on the REST API server (port 1317) returns HTTP 400 with failed to gather metrics: prometheus metrics are not enabled. The [instrumentation] Prometheus listener still serves the Tendermint metrics and the OpenTelemetry metrics on this page. An existing app.toml keeps its value. To turn the sink on, set a positive retention in seconds:

Grafana integration

Install and configure Grafana:

Alert management

Install Alertmanager:

Log management

Loki setup

Use Loki for log aggregation:

Log rotation

Configure logrotate to manage log files:

Security configuration

Network security

Configure the UFW firewall:

Rate limiting

Built-in RPC limits

seid limits how much work RPC clients can request from a node. Configure these limits in app.toml and config.toml.

Per-IP rate limiting

Since v6.8.0, seid rate-limits each client IP by default on EVM JSON-RPC over HTTP (port 8545) and on CometBFT RPC (port 26657). A freshly generated configuration sets these values: Configuration files from v6.6 or earlier that omit these keys get the same defaults. Configuration files written by v6.7 explicitly set rate_limiting_enabled = false, rate-limiting-enabled = false, and batch_request_limit = 1000. Those files keep their values until you change them. A client that exceeds its budget gets HTTP 429 with too many requests. The EVM plane counts these rejections in evmrpc_requests_rejected_total with reason="rate_limited". Both planes also count them in rpc_rate_limit_rejected_total, labeled by plane (evm or cometbft) and method_namespace. The limiter does not charge messages on an open EVM WebSocket or CometBFT /websocket connection.
If your node sits behind a load balancer or reverse proxy and rate limiting is on, set trusted_proxy_cidrs under [evm] in app.toml and trusted-proxy-cidrs under [rpc] in config.toml to your proxy CIDRs. Otherwise the node charges all traffic to the proxy’s IP.
The limiter charges one token per batch element, so the burst must cover a full batch:
  • If app.toml has no rate_limiting_enabled key and ip_rate_limit_burst is below batch_request_limit, the node raises the burst to the batch limit and logs a warning.
  • If you set rate_limiting_enabled = true explicitly, a burst below batch_request_limit fails startup.
  • On CometBFT RPC, ip-rate-limit-burst must be at least 10 while rate limiting is on.
batch_request_limit caps EVM JSON-RPC batches over HTTP and WebSocket whether or not rate limiting is on. The node answers a larger batch with a single -32600 error (batch too large). The body of a 429 response depends on the plane:
  • On EVM JSON-RPC, the body is plain text: too many requests.
  • On CometBFT RPC, a rate-limited batch POST / gets a JSON array with one error object per non-notification request. Each object carries the request’s id, code -32603, and data set to too many requests.
  • On CometBFT RPC, a batch of only notifications gets an empty body. A batch of more than 10 requests, a malformed body, or a single request gets one error object.
To turn rate limiting off, set rate_limiting_enabled = false under [evm] in app.toml and rate-limiting-enabled = false under [rpc] in config.toml.

Large log queries

eth_getLogs, eth_getFilterLogs, and filter polls that span more than 100 blocks share a rate limit across all clients. The HTTP and WebSocket servers each keep their own budget at this rate. Set the rate, in queries per second, with large_log_query_rps under [evm] in app.toml. The default is 30. Set it to 0 to turn the limit off. The node refuses to start with a negative value. Without a free token, the node refuses an eth_getLogs or eth_getFilterLogs call with JSON-RPC error -32005 (limit exceeded, retry later). A filter poll is cut to the next 100 blocks instead, so a filter that has fallen behind keeps advancing. The node checks its load before it takes a token, so a query refused under load does not spend one.

Block filter polls

max_block_filter_hashes under [evm] (default 1000) caps how many block heights one eth_getFilterChanges poll on an eth_newBlockFilter filter covers. The filter reads the CometBFT block store from a cursor that starts at the block after the head at filter creation. A poll never returns a block from before the filter existed. Each poll returns hashes oldest first, and later polls return the rest. If pruning passes the cursor, the poll fails with a -32000 error of the form blocks X to Y were pruned before the filter read them. The filter then resumes from the earliest available block.
Like geth, eth_getFilterLogs rejects a block filter. The error is filter does not exist.

Method deadlines

Since v6.8.0, the node applies a deadline to EVM JSON-RPC methods over HTTP and WebSocket. A method that runs past its deadline returns JSON-RPC error -32002 (request timed out). The node also increments rpc_deadline_exceeded_total, labeled by plane (evm) and method_namespace (for example, eth or debug). Configure the deadlines in the [evm] section of app.toml:
Some methods have built-in entries:
  • eth_call, eth_estimateGas, and eth_createAccessList use simulation_evm_timeout (default 1m0s) as their deadline.
  • eth_sendRawTransaction, eth_sendTransaction, and eth_getTransactionCount enforce write_timeout themselves, and debug_trace* methods enforce trace_timeout. This setting gives them no deadline of its own.
A broader wildcard such as eth_* does not change these methods. To override one, name it exactly, for example "eth_call=10s". Over HTTP, the node also ends every request just before write_timeout (default 30s) with the same -32002 error. To let a method run longer over HTTP, raise write_timeout above its deadline.

Validator-specific monitoring

Status query

Query the validator status through the SDK:
Query the status through the REST API:

Critical metrics

Monitor these validator-specific metrics:

Backup management

Host system monitoring

Resource usage tracking

Install and configure node_exporter:
Add node_exporter to the Prometheus configuration:

Seed node Prometheus metrics

Since v6.7.0, seed nodes serve Prometheus metrics like other nodes. A seed serves no RPC, so its p2p metrics, such as tendermint_p2p_peers, are the only way to watch it. Enable them in the [instrumentation] section of config.toml:
If a seed node cannot open the Prometheus listener, the seed fails to start. For example, the port can be in use, or the address can be invalid. A full node logs the error and continues to run.
Since v6.7.2, when Prometheus metrics are enabled, every node also exports the tendermint_p2p_known_addresses gauge. It counts the distinct peers that the node has an address for: connected peers, configured persistent and bootstrap peers, and peers learned through PEX. The node publishes this gauge and tendermint_p2p_peers at startup, before any peer connects, and refreshes both every 10 seconds.

Metrics server limits

The metrics server uses a 10s read header timeout, a 10s read timeout, a 30s write timeout, and a 60s idle timeout. max-open-connections under [instrumentation] is not a connection limit. It caps the number of scrapes that the server handles at the same time. Requests over the cap get HTTP 503. The server does not queue them. A slow scraper holds its slot until it finishes or reaches the write timeout. 0 means no limit. The default is 3. Set the value higher than the number of scrapers that can overlap, such as an HA Prometheus pair, probes, and manual curl requests.

chain_id label on metrics

Since v6.7.0, the node adds a chain_id label to every metric that it exports. This includes the Tendermint Prometheus metrics, the Cosmos SDK telemetry, and the OpenTelemetry metrics (evmrpc_*, flatkv_*, litt_*, and pebble_*). If you already set chain_id in global-labels under [telemetry], the Cosmos SDK telemetry keeps your value. Update PromQL that aggregates across series, such as sum(...) without (...) or by (...), to account for the new label. To scope a query to one chain, add a chain_id match.

Tendermint internal metrics

The tendermint namespace also has these subsystems:

EVM RPC OpenTelemetry metrics

The EVM RPC layer emits OpenTelemetry metrics through the process-wide MeterProvider (for example, a Prometheus exporter).

Available EVM RPC metrics

The evmrpc_request_latency_seconds histogram carries these labels:

Replacing removed legacy EVM RPC metrics

Since v6.8.0, the node does not emit the legacy sei_* EVM RPC metrics. If your dashboards or alerts still use them, switch to these replacements: The latency units differ. sei_rpc_request_latency_ms reports milliseconds, and evmrpc_request_latency_seconds reports seconds. Adjust any thresholds and panel formatting to match.

FlatKV OpenTelemetry metrics

The FlatKV state store emits OpenTelemetry metrics through the process-wide MeterProvider (for example, a Prometheus exporter). With these metrics, you can observe commit throughput, catchup progress, snapshotting, rollbacks, and snapshot imports.

Available FlatKV metrics

Labels

FlatKV metrics carry these labels where applicable:

Pebble internal metrics

FlatKV turns on Pebble’s internal metrics for each data DB by default. The node does not apply an enable-pebble-metrics key from app.toml.

Pebble estimated read/write metrics

SeiDB can count estimated logical reads and writes on its PebbleDB databases. The counters are off by default. They cost less than Pebble’s full internal metrics, and you can use them to estimate read amplification (reads divided by writes). Both counters have a db attribute. Its value is the name of the data directory, so you can tell the FlatKV data DBs, the state store, and the receipt store apart. Turn the counters on per store in app.toml:
A generated app.toml does not include enable-read-write-metrics under [receipt-store]. To turn on the receipt store counters, add the key by hand. The node still reads it.

Subspace query limits

Since v6.8.0, /store/<store>/subspace ABCI queries read only from the state store (SS). A node with SS disabled rejects every /subspace query with code 37 (feature not supported) and the message subspace queries require the state store. A node with SS enabled applies these limits:
  • It rejects an empty prefix with subspace prefix must not be empty.
  • It fails a scan that would exceed the pair or byte cap with subspace result exceeds limit.
  • It rejects a query beyond the concurrency limit with subspace query busy.
If your indexer issues wide /subspace queries, narrow the prefix, split the scan by sub-prefix, or raise the caps. Tune the caps in the [state-commit] section of app.toml. A value of 0 or less uses the default, and there is no unlimited setting:

State proof queries

Since v6.8.0, ABCI /store state proofs are off by default. A query with prove=true on /store/<store>/key fails with code 37 (feature not supported) and the message state proofs are disabled on this node; set state-commit.sc-enable-state-proof = true to enable. The node also increments state_proof_rejected. This breaks the Tendermint light client proxy and any client that sets prove=true. To keep serving state proofs, set sc-enable-state-proof = true in the [state-commit] section of app.toml. This option is temporary.

Per-block hash logger

The state-commit store writes a CSV file of named hashes for each block. Each row has the memIAVL module and root hashes and the FlatKV DB and root hashes. It also has the app hash, the block hash, the results hash (the next block’s LastResultsHash), and the changeset hash. To find where two nodes diverged, compare their logs with seidb hashlog compare. The hash logger is on by default. It writes to data/hash.log under the state-commit directory, which is <home>/data/hash.log by default. With the default settings, it keeps up to 16 GiB of closed log files. Configure it in the [state-commit] section of app.toml: If you set both sc-hash-logger-blocks-to-retain and sc-hash-logger-max-disk-size to 0, the logs grow without limit. To turn the hash logger off:

LittDB OpenTelemetry metrics

LittDB emits its metrics through the process-wide OpenTelemetry MeterProvider instead of a private Prometheus client. If MetricsEnabled is true, LittDB records its metrics in that provider. By default (MetricsServeEndpoint = false), the application that uses LittDB exports the metrics, and LittDB does not start a /metrics server. If MetricsServeEndpoint is true, LittDB serves /metrics on MetricsPort (default 9101). LittDB no longer has the MetricsNamespace and MetricsRegistry config fields, and all metric names use a fixed litt_ prefix.

Available LittDB metrics

Attributes

Migrating from legacy LittDB metrics

The OpenTelemetry migration changed the metric names, units, and shape. You must update your existing Prometheus and Grafana dashboards:
  • Latency metrics moved from millisecond summaries (for example, {namespace}_read_latency_ms) to second histograms (litt_read_latency_seconds). Change thresholds and panel formatting from milliseconds to seconds.
  • Counters and gauges gained a fixed litt_ prefix and explicit units. For example, bytes_read became litt_bytes_read, and the cache weight gauge became litt_chunk_cache_weight_bytes.
  • The per-cache series that previously had separate metric names (for example, chunk_read_cache_* and chunk_write_cache_*) are now the shared litt_chunk_cache_* metrics. The cache attribute distinguishes them.
  • The MetricsNamespace and MetricsRegistry config fields no longer exist. Metric names are fixed, and the global OTel provider always backs the metrics. Set the scrape port with MetricsPort.

Performance testing

For specific customizations or other metrics, ask in the Sei Tech Chat on Telegram or on Discord.