GuanceDB Engine Deployment¶
Note
The CPU must support the AVX2 instruction set. Execute grep avx2 /proc/cpuinfo to test. No output means AVX2 is not supported.
This document describes how to deploy the GuanceDB for Metrics component and the GuanceDB for Logs component. Both components are deployed using a single Chart.
Architecture Diagram¶
- The GuanceDB chart includes two components: GuanceDB for Metrics and GuanceDB for Logs. These two components share the guance-insert and guance-select services, providing unified write and query interfaces.
- Deploying the GuanceDB for Metrics component will deploy the GuanceDB for Metrics Storage.
Core Components¶
1.Write Load Balancer (guance-insert)
- Responsible for receiving raw data.
- Distributes data to storage nodes using a consistent hashing algorithm.
- Supports high-availability deployment.
2.Query Engine (guance-select)
- Supports DQL and PromQL query languages.
- Fetches data from all storage nodes and performs calculations.
- Returns the final query result.
3.Storage Node (guance-storage)
- Uses a share-nothing architecture.
- No communication between nodes, no central coordination.
- Supports horizontal scaling.
Prerequisites¶
- Helm version requirement: 3.7+
- Ensure storage performance meets requirements.
- It is recommended to reserve sufficient system resources.
Default Configuration Information¶
| Service Name | Address | Port |
|---|---|---|
| guance-insert | guance-insert.guancedb | 8480 |
| guance-select | guance-select.guancedb | 8481 |
Capacity Planning¶
1.Memory Reservation
- Reserve at least 50% memory for all components.
- Used to handle burst writes and avoid OOM.
2.CPU Reservation
- Reserve at least 50% CPU for all components.
- Avoid slow writes and queries caused by burst writes.
3.Storage Space Reservation
- Reserve 20% storage space for guance-storage nodes.
- Configurable via the
-storage.minFreeDiskSpaceBytesparameter.
Reference Configuration¶
Using 1 million time series as an example (written every 10s, real-time write QPS 100k/s, query QPS 100, data retention 1 month):
| Component | CPU | Memory | Disk |
|---|---|---|---|
| guance-insert | 4c | 4G | - |
| guance-select | 8c | 8G | - |
| guance-storage | 16c | 96G | 500G |
Note: The resource scale can be adjusted linearly based on the actual number of time series during deployment. Each component supports 2 instances by default.
GuanceDB Engine Deployment¶
Note
GuanceDB for Metrics and GuanceDB for Logs deployments have a sequence. You can deploy GuanceDB for Metrics first. After Doris deployment is complete and Doris information can be configured, install GuanceDB for Logs. If you only want to deploy the GuanceDB for Logs component, set guance_storage.enabled=false.
Storage Class Settings¶
OpenEBS reference documentation: OpenEBS Deployment
If using a public cloud, please refer to the public cloud storage block component.
Deploy the following yaml configuration:
apiVersion: storage.k8s.io/v1
allowVolumeExpansion: true
kind: StorageClass
metadata:
annotations:
cas.openebs.io/config: |
- name: StorageType
value: "hostpath"
- name: BasePath
value: "/data"
name: guancedb-cs
provisioner: openebs.io/local
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
Ensure the
/datadirectory has sufficient disk capacity.
Deploy the following yaml configuration:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: guancedb-cs
provisioner: diskplugin.csi.alibabacloud.com
parameters:
type: cloud_auto
fstype: ext4
# diskTags: "a:b,b:c"
encrypted: "false"
performanceLevel: PL1 # When using via Cloud Box, it needs to be set to PL0.
provisionedIops: "40000"
burstingEnabled: "false"
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain
allowVolumeExpansion: true
Deploy the following yaml configuration:
---
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: guancedb-cs
parameters:
csi.storage.k8s.io/csi-driver-name: disk.csi.everest.io
csi.storage.k8s.io/fstype: ext4
everest.io/disk-volume-type: SSD ## Modify the disk type
everest.io/passthrough: "true"
provisioner: everest-csi-provisioner
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
Download Chart¶
Note
It is recommended to use Git to maintain values.yaml. Include the values.yaml file in Git management to ensure every configuration change is recorded, facilitating tracking and rollback.
Download the chart package:
--untar means do not compress, default is compressed
Configure and Install GuanceDB for Metrics¶
- Configure GuanceDB for Metrics
Enter the guancedb directory and modify values.yaml
# Modify the global storage class
global:
storageClass: 'guancedb-cs'
# Turn off the scopedb switch
scopedb:
enabled: false
guance_select:
...
# Number of service replicas
replicaCount: 3
image:
# If in an offline environment, modify the image repository address. If there is no such requirement, you can leave it unchanged.
repository: pubrepo.guance.com/guancedb/guance-select
# Modify nodeSelector and tolerations to schedule the guance-select container. If there is no such requirement, you can leave it unchanged.
nodeSelector: {}
tolerations:
[]
# - key: "key"
# operator: "Equal|Exists"
# value: "value"
# effect: "NoSchedule|PreferNoSchedule"
guance_insert:
...
# Number of service replicas
replicaCount: 3
image:
# If in an offline environment, modify the image repository address. If there is no such requirement, you can leave it unchanged.
repository: pubrepo.guance.com/guancedb/guance-insert
# Modify nodeSelector and tolerations to schedule the guance-insert container. If there is no such requirement, you can leave it unchanged.
nodeSelector: {}
tolerations:
[]
# - key: "key"
# operator: "Equal|Exists"
# value: "value"
# effect: "NoSchedule|PreferNoSchedule"
guance_storage:
...
# Number of service replicas
replicaCount: 2
image:
# If in an offline environment, modify the image repository address. If there is no such requirement, you can leave it unchanged.
repository: pubrepo.guance.com/guancedb/guance-storage
# Modify nodeSelector and tolerations to schedule the guance-storage container. If there is no such requirement, you can leave it unchanged.
nodeSelector: {}
tolerations:
[]
# - key: "key"
# operator: "Equal|Exists"
# value: "value"
# effect: "NoSchedule|PreferNoSchedule"
- Install the GuanceDB for Metrics component
helm upgrade -i guancedb oci://pubrepo.guance.com/guancedb/guancedb \
-n guancedb --create-namespace -f values.yaml
- Check Status {#helm-check}
> kubectl get pod -n guancedb -l app.kubernetes.io/instance=guancedb
NAME READY STATUS RESTARTS AGE
guance-insert-0 1/1 Running 0 107s
guance-select-db5dfb66b-qsncr 1/1 Running 0 84s
guance-storage-0 1/1 Running 0 44s
guance-storage-1 1/1 Running 0 28s
Configure and Install GuanceDB for Logs¶
Note
If the GuanceDB for Metrics component is already deployed, installing GuanceDB for Logs will not add new services, it will only add startup parameters to the existing services.
- Configure GuanceDB for Logs
Enter the guancedb directory and modify values.yaml
Note
The values.yaml file is the one used to configure GuanceDB for Metrics. If the values.yaml is lost, you can execute helm get values -n guancedb guancedb > values.yaml to retrieve it.
...
doris:
# Enable GuanceDB for Logs
enabled: true
# Add Doris fe nodes
feIPs: []
# ["xx.xx.xx.xx","xx.xx.xx.xx"]
# Doris root password
rootPassword: ''
# Doris normal user password
userReadPassword: ''
# memory size for cache data
cacheSizeLimit: 4Gi
guance_throttler:
# Enable
enabled: true
...
- Install GuanceDB for Logs
helm upgrade -i guancedb oci://pubrepo.guance.com/guancedb/guancedb \
-n guancedb --create-namespace -f values.yaml
- Check Status {#helm-check-logs}
> kubectl get pod -n guancedb -l app.kubernetes.io/instance=guancedb
NAME READY STATUS RESTARTS AGE
guance-insert-0 1/1 Running 0 107s
guance-select-db5dfb66b-qsncr 1/1 Running 0 84s
guance-storage-0 1/1 Running 0 44s
guance-storage-1 1/1 Running 0 28s
Uninstall¶
Others¶
Modify Component Parameters¶
- Modify values.yaml
guance_storage:
...
# You can add storage parameters here
extraArgs:
retentionFilters.config: http://kodo.forethought-kodo:9527/v1/workspace_retention
envflag.enable: 'true'
loggerFormat: json
loggerMaxArgLen: '10000'
loggerTimezone: Asia/Shanghai
guance_insert:
...
# You can add insert parameters here
extraArgs:
envflag.enable: 'true'
loggerFormat: json
loggerMaxArgLen: '10000'
loggerTimezone: Asia/Shanghai
guance_select:
# You can add select parameters here
...
extraArgs:
envflag.enable: 'true'
loggerFormat: json
loggerMaxArgLen: '10000'
loggerTimezone: Asia/Shanghai
http.disableResponseCompression: 'true'
search.denyPartialResponse: true
search.maxQueryDuration: 110s
slowQueryDuration: 1ms
streamaggr.selectVerify: 'true'
- Update the deployment:
helm upgrade -i guancedb oci://pubrepo.guance.com/guancedb/guancedb \
-n guancedb --create-namespace -f values.yaml
Service Parameter Description¶
Guance Select Parameter Description¶
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| -blockcache.missesBeforeCaching | int | 2 | Number of cache misses before a block is cached. Higher values may reduce indexdb/dataBlocks cache size but increase CPU and disk reads. |
| -cacheDataPath | string | "/tmp/guance-select" | Path to the cache file directory. Empty means no cache saving. |
| -cacheExpireDuration | duration | 30m0s | Duration after which unaccessed items in the memory cache are removed. Lower values may reduce memory usage but increase CPU usage. |
| -dedup.minScrapeInterval | duration | 1ms | Only the last sample per time series is kept within each discrete interval, preventing duplicates. |
| -denyQueryTracing | bool | Whether to disable query tracing. | |
| -doris.coldDataTierOnly | bool | Use cold storage only. | |
| -doris.disableBFOnNewTables | bool | Do not use bloom filters on new tables. | |
| -doris.disableUnicodeTokenizer | bool | Use Chinese tokenizer instead of Unicode tokenizer. | |
| -doris.enableBFOnOldTables | bool | Use bloom filters on old tables. | |
| -doris.enableFileCacheTTL | bool | Use data caching for the cloud database SelectDB version. | |
| -doris.enableWarmDataTier | bool | Use warm + hot storage instead of cold + hot storage. | |
| -doris.indexCacheTTL | duration | 30m0s | TTL for Doris index cache. |
| -doris.onlyQueryFE | bool | If enabled, do not query data directly from the backend (be). | |
| -doris.onlyWriteFE | bool | If enabled, do not write data directly to the backend (be). | |
| -doris.replicationFactor | int | 1 | Replication factor for Doris tables. |
| -doris.storageResource | string | "s3_default" | Resource name used by the storage policy. |
| -doris.variantSchemaMode | string | Supported values: 'none', 'minimal', 'full'. | |
| -dorisCluster | string | "default_cluster" | Doris cluster name. |
| -dorisFENode | array | List of Doris FE node addresses, comma-separated. | |
| -dorisHTTPPort | int | 8030 | Doris HTTP port. |
| -dorisMySQLPort | int | 9030 | Doris MySQL port. |
| -dorisPassword | string | Doris password. | |
| -dorisUsername | string | "root" | Doris username. |
| -enableTCP6 | bool | Whether to enable IPv6 listening and dialing. Default is IPv4 only. | |
| -envflag.enable | bool | Whether to allow reading parameters from environment variables. Command line parameters take precedence. | |
| -envflag.prefix | string | Environment variable prefix, only effective when environment variable reading is enabled. | |
| -filestream.disableFadvise | bool | Whether to disable the fadvise() system call. Disabling can reduce CPU usage when reading large files, but is generally not recommended. | |
| -flagsAuthKey | value | Authentication key for the /flags endpoint. Supports reading from file or URL. | |
| -fs.disableMmap | bool | Whether to use pread() instead of mmap() to read data files. Default is mmap() for 64-bit architectures, pread() for 32-bit. | |
| -globalReplicationFactor | int | 1 | Number of replicas per sample in the vmstorage group. Supports high availability. |
| -http.connTimeout | duration | 2m0s | HTTP connection timeout. Connections are closed after timeout. 0 means no close. |
| -http.disableResponseCompression | bool | Whether to disable HTTP response compression to save CPU. Compression is enabled by default to save bandwidth. | |
| -http.header.csp | string | Set the Content-Security-Policy header. Recommended: "default-src 'self'". | |
| -http.header.frameOptions | string | Set the X-Frame-Options header. | |
| -http.header.hsts | string | Set the Strict-Transport-Security header. Recommended: 'max-age=31536000; includeSubDomains'. | |
| -http.idleConnTimeout | duration | 1m0s | HTTP idle connection timeout. |
| -http.maxGracefulShutdownDuration | duration | 7s | Maximum duration for HTTP server graceful shutdown. |
| -http.pathPrefix | string | Add a prefix to all HTTP paths, useful for proxy paths. | |
| -http.shutdownDelay | duration | Delay before HTTP server shutdown, during which /health returns non-OK, facilitating load balancer switchover. | |
| -httpAuth.password | value | HTTP basic authentication password. Supports reading from file or URL. | |
| -httpAuth.username | string | HTTP basic authentication username. Empty disables authentication. | |
| -httpListenAddr | array | List of HTTP listening addresses. Supports multiple values or comma-separated. | |
| -httpListenAddr.useProxyProtocol | array | Specify whether to enable proxy protocol for the listening address. Enabling prevents regular /metrics endpoint. | |
| -insert.maxFutureTimeDrift | duration | 1h0m0s | Reject events with timestamps exceeding current time plus this value. |
| -insert.maxPastTimeDrift | duration | Reject events with timestamps earlier than current time minus this value. | |
| -insertNode | array | List of Guance-insert node addresses, comma-separated. | |
| -internStringCacheExpireDuration | duration | 6m0s | Interned string cache expiration time. |
| -internStringDisableCache | bool | Whether to disable interned string cache. Disabling may reduce memory but increase CPU usage. | |
| -internStringMaxLen | int | 500 | Maximum length for interned strings. Lower values reduce memory but increase CPU usage. |
| -loggerDisableTimestamps | bool | false | Whether to disable timestamp writing in logs. |
| -loggerErrorsPerSecondLimit | int | 0 | Limit for error logs per second. Errors exceeding the limit are suppressed. 0 means no limit. |
| -loggerFormat | string | "default" | Log format. Options: "default" or "json". |
| -loggerJSONFields | string | - | Rename fields in JSON format logs, e.g., "ts:timestamp,msg:message". |
| -loggerLevel | string | "INFO" | Minimum log level. Supports INFO, WARN, ERROR, FATAL, PANIC. |
| -loggerMaxArgLen | int | 1000 | Maximum length for a single log argument. Exceeding parts are replaced with prefix and suffix. |
| -loggerOutput | string | "stderr" | Log output location. Supports stderr and stdout. |
| -loggerTimezone | string | "UTC" | Timezone for log timestamps. Must be a valid IANA timezone name. |
| -loggerWarnsPerSecondLimit | int | 0 | Limit for warning logs per second. Warnings exceeding the limit are suppressed. 0 means no limit. |
| -memory.allowedBytes | size | 0 | System memory size that VictoriaMetrics cache can use. Overrides -memory.allowedPercent. |
| -memory.allowedPercent | float | 60 | Percentage of system memory that VictoriaMetrics cache can use. |
| -metrics.exposeMetadata | bool | false | Whether to expose TYPE and HELP metadata on the /metrics page. |
| -metricsAuthKey | value | - | Authentication key for the /metrics endpoint. Supports reading from file or URL. |
| -pprofAuthKey | value | - | Authentication key for the /debug/pprof/* endpoints. Supports reading from file or URL. |
| -prevCacheRemovalPercent | float | 0.1 | Percentage threshold below which entries from the previous cache are removed. Higher values reduce memory but increase CPU usage. |
| -pushmetrics.disableCompression | bool | false | Whether to disable request body compression when pushing metrics. |
| -pushmetrics.extraLabel | array | - | Extra labels to add when pushing metrics, e.g., instance="foo". |
| -pushmetrics.header | array | - | HTTP headers to add when pushing metrics. |
| -pushmetrics.interval | duration | 10s | Interval for pushing metrics. |
| -pushmetrics.url | array | - | List of URLs to push metrics to. |
| -queryPermitRatio | float | 1 | Ratio of query requests allowed. |
| -replicationFactor | array | 1 | Number of replicas per sample. Supports key:value form. |
| -retentionFilters.cleanInterval | duration | 360h | Interval for cleaning expired data. |
| -retentionFilters.config | string | - | Path to the retention filter configuration file. |
| -retentionFilters.configCheckInterval | duration | 1h | Interval for checking changes to the retention filter configuration file. |
| -scopeDB.dbName | string | "scopedb" | ScopeDB database name. |
| -scopeDB.dumpIngestBody | bool | false | Whether to print ingested body on failure. |
| -scopeDB.ensureJob | bool | false | Whether to enable the ensure job feature. |
| -scopeDB.indexCacheTTL | duration | 5m | TTL for ScopeDB index cache. |
| -scopeDB.maxConcurrentIndexRequests | int | 32 | Maximum number of concurrent index requests for ScopeDB. |
| -scopeDB.node | array | - | List of ScopeDB node addresses. |
| -scopeDB.nodegroup.ctl | string | "query-meta" | Control plane node group name. |
| -scopeDB.nodegroup.detailQuery | string | "detail-query" | Non-aggregate query node group name. |
| -scopeDB.nodegroup.job | string | "job" | Job execution node group name. |
| -scopeDB.nodegroup.largeQuery | string | "large-query" | Large query node group name. |
| -scopeDB.nodegroup.query | string | "query" | Normal query node group name. |
| -scopeDB.nodegroup.systemQuery | string | "system-query" | System query node group name for referrers like "func" and "kodo". |
| -scopeDB.nodesUpdateInterval | duration | 10s | Node update interval. |
| -scopeDB.onlyUseBootstrapNodes | bool | false | Whether to use only bootstrap nodes. |
| -scopeDB.password | string | - | ScopeDB password. |
| -scopeDB.port | uint | 6543 | ScopeDB port. |
| -scopeDB.storage.accessKeyID | string | - | ScopeDB storage access key ID. |
| -scopeDB.storage.bucket | string | - | ScopeDB storage bucket. |
| -scopeDB.storage.endpoint | string | - | ScopeDB storage service endpoint. |
| -scopeDB.storage.prefix | string | - | ScopeDB storage prefix. |
| -scopeDB.storage.region | string | - | ScopeDB storage region. |
| -scopeDB.storage.secretAccessKey | string | - | ScopeDB storage secret access key. |
| -scopeDB.storage.type | string | - | ScopeDB storage type. |
| -scopeDB.username | string | - | ScopeDB username. |
| -search.cacheTimestampOffset | duration | 5m | Maximum time offset for query response data, to avoid gaps due to clock sync issues. |
| -search.compatibleMode | bool | false | Enable Prometheus compatibility mode. |
| -search.debugThrottler | bool | false | Debug the throttler. |
| -search.denyPartialResponse | bool | false | Whether to deny partial responses for data consistency. |
| -search.disableCache | bool | false | Disable response caching. Suitable for backfilling historical data. |
| -search.disableImplicitConversion | bool | false | Disable implicit subquery conversion related queries. |
| -search.dorisColdQueryCPULimit | int | 4 | CPU limit SQL variable for cold data queries. |
| -search.dorisDisableADBC | bool | false | Prefer Thrift over ADBC. |
| -search.dorisDisableSampling | bool | false | Disable sampling. |
| -search.dorisEnableSmallColdGroup | bool | false | Use dedicated workgroup for small cold queries. |
| -search.dorisLargeColdQueryRowCount | int | - | Deprecated, use search.minRowsForLargeQuery instead. |
| -search.dorisMaxCursorRows | int | 50000000 | Maximum rows to scan for cursor queries. |
| -search.dorisMaxLiteralArraySize | int | 1000 | Maximum number of elements in an array literal. |
| -search.dorisMaxOrderingRows | int | - | Maximum rows to scan for custom ordering queries. |
| -search.dorisMaxRowsForOrder | int | - | Maximum rows to use for ORDER BY on non-time columns. |
| -search.dorisMaxSamplingRows | int | - | Deprecated, use search.numRowsToSample instead. |
| -search.dorisThrottlerURL | string | - | Throttler API address. |
| -search.latencyOffset | duration | 30s | Delay after which data points become visible in query results after collection. Can be overridden by query parameter latency_offset. Too small a value may cause the last data point in query results to be incomplete. |
| -search.logImplicitConversion | bool | - | Whether to log queries that undergo implicit subquery conversion. Details see Implicit Conversion Explanation. Can be disabled with -search.disableImplicitConversion. |
| -search.logQueryMemoryUsage | size | 524288000 (500MB) | Log queries that occupy memory exceeding this value, for detecting and optimizing large queries. Off by default. Supports units like KB, MB, GB. |
| -search.maxConcurrentRequestsPerTenant | int | 5 | Maximum concurrent query requests per tenant. Too high may strain CPU and memory resources. |
| -search.maxExportDuration | duration | 720h (30 days) | Maximum call duration for /api/v1/export interface. |
| -search.maxGroups | int | 100000 | Maximum number of groups allowed in query results. |
| -search.maxLabelsAPIDuration | duration | 5s | Maximum response time for /api/v1/labels, /api/v1/label/.../values and /api/v1/series interfaces. |
| -search.maxLimit | int | 10000 | Maximum number of rows allowed in query results. |
| -search.maxLookback | duration | Dynamically detected | Synonym for Prometheus's -search.lookback-delta. Can be overridden by max_lookback parameter. Affects the lookback time window in queries. |
| -search.maxMemoryPerQuery | size | 0 | Maximum memory allowed for a single query, exceeding which the query is rejected. Supports units like KB, MB, GB. |
| -search.maxMetrics | int | 10000000 | Deprecated, migrated to -search.maxShowUniqueTimeseries and -search.maxQueryUniqueTimeseries. |
| -search.maxPointsPerTimeseries | int | 30000 | Maximum number of data points per time series returned by /api/v1/query_range, mainly limiting points for plotting clients. |
| -search.maxPointsSubqueryPerTimeseries | int | 100000 | Maximum data points generated per time series for subqueries. Details see related blog. |
| -search.maxQueryDuration | duration | 30s | Maximum execution time for a query. |
| -search.maxQueryLen | size | 16384 (16KB) | Maximum length of a query statement. Supports units like KB, MB. |
| -search.maxQueryUniqueTimeseries | int | 300000 | Maximum number of unique time series allowed to be selected in /api/v1/query queries. Limits memory usage. |
| -search.maxQueueDuration | duration | 10s | Maximum queuing wait time for requests when the maximum concurrent request limit is reached. |
| -search.maxResponseSeries | int | 0 (unlimited) | Maximum number of time series returned by /api/v1/query and /api/v1/query_range, 0 means unlimited. |
| -search.maxSamplesPerQuery | int | 1000000000 | Maximum number of raw samples scanned per query. Prevents resource exhaustion from overly large queries. |
| -search.maxSamplesPerSeries | int | 30000000 | Maximum number of raw samples scanned per time series. |
| -search.maxSeriesPerAggrFunc | int | 1000000 | Maximum number of time series an aggregation function can generate. |
| -search.maxShowUniqueTimeseries | int | 10000000 | Maximum number of time series allowed to be shown by show functions, limiting memory usage. |
| -search.maxStalenessInterval | duration | Dynamically calculated | Maximum time interval for staleness calculation, automatically calculated based on median sample interval by default. |
| -search.maxStatusRequestDuration | duration | 5m0s | Maximum response time for /api/v1/status/* requests. |
| -search.maxStepForPointsAdjustment | duration | 1m0s | Maximum step when adjusting points closer than latencyOffset to current time for /api/v1/query_range interface. |
| -search.maxWorkersPerQuery | int | 2 | Maximum number of CPU cores allowed per query. Adjustable for performance optimization, cannot exceed physical CPU cores. |
| -search.minRowsForLargeQuery | int | 10000000 | Minimum rows to scan for a large query. |
| -search.minStalenessInterval | duration | - | Minimum time interval for staleness calculation, used to remove chart gaps caused by irregular sampling intervals. |
| -search.minTimeRangeForLargeQuery | duration | 12h0m0s | Minimum time range for a large query. |
| -search.minWindowForInstantRollupOptimization | duration | 3h | Minimum window value to enable cache optimization for instant queries with lookback windows. |
| -search.noStaleMarkers | bool | false | If the database has no Prometheus staleness markers, set to true to save CPU resources. |
| -search.queryStats.lastQueriesCount | int | 20000 | Number of recent queries tracked by /api/v1/status/top_queries. 0 disables. |
| -search.queryStats.minQueryDuration | duration | 1ms | Threshold for the shortest query duration recorded in statistics. Queries below this duration are ignored. |
| -search.resetRollupResultCacheOnStartup | bool | false | Whether to reset the rollup result cache on startup. |
| -search.rowsToSample | int | 10000000 | Maximum rows to scan for sampling queries. |
| -search.rowsToSampleForFacet | int | 10000000 | Maximum rows to scan for show_x_field or distinct queries. |
| -search.scopeDB.firstCursorScanRows | int | 10000000 | Maximum rows scanned initially for cursor pagination queries. |
| -search.scopeDB.logQuery | bool | true | Whether to log ScopeDB query statements. |
| -search.scopeDB.maxLiteralArraySize | int | 1000 | Maximum number of elements in an array literal. |
| -search.scopeDB.maxRowsForOrder | int | 100000 | Maximum rows for ORDER BY on non-time columns. |
| -search.scopeDB.maxTimeRange | duration | - | Maximum time range for queries. |
| -search.setLookbackToStep | bool | false | Whether to fix lookback to the step parameter, adjusting the query model to be more like InfluxDB. When enabled, -search.maxLookback and -search.maxStalenessInterval are ignored. |
| -search.skipSlowReplicas | bool | false | Whether to skip the slowest vmstorage node in the replication factor during queries, may improve query speed but risks incomplete data. |
| -search.treatDotsAsIsInRegexps | bool | false | Whether to filter dot characters in regular expressions. This option is deprecated, graphite syntax is recommended. |
| -slowQueryDuration | duration | 1s | Queries exceeding this duration will be logged as slow queries. |
| -storageNode | array | - | Array of guance-storage node addresses, comma-separated or specified multiple times. |
| -streamaggr.cleanupInterval | duration | 10m0s | Interval for cleaning up expired queries. |
| -streamaggr.dataBlocksCacheSize | int | 157286400 (150MB) | Data block cache size. |
| -streamaggr.ignoreContinuousCheck | bool | false | Whether to ignore continuity check. |
| -streamaggr.indexBlocksCacheSize | int | 52428800 (50MB) | Index block cache size. |
| -streamaggr.queryRetentionPeriod | duration | 168h0m0s (7 days) | Query retention period. |
| -streamaggr.retentionMonths | int | 6 | Number of months to retain stream aggregation data. |
| -streamaggr.selectVerify | bool | false | Whether to verify stream aggregation results. |
| -tls | array | Whether to enable TLS (i.e., HTTPS) for the specified -httpListenAddr. -tlsCertFile and -tlsKeyFile must be set when using this parameter. Supports multiple comma-separated values or multiple settings. Empty value is treated as false. | |
| -tlsCertFile | array | Path to the TLS certificate file for the corresponding -httpListenAddr. ECDSA certificates are recommended over RSA certificates as RSA is slower. Certificate files are automatically re-read every second, allowing dynamic updates. Supports multiple values. | |
| -tlsCipherSuites | array | Optional list of TLS cipher suites for HTTPS requests when TLS is enabled. Supports multiple values. See supported list: https://pkg.go.dev/crypto/tls#pkg-constants | |
| -tlsKeyFile | array | Path to the TLS key file for the corresponding -httpListenAddr. Key files are automatically re-read every second, allowing dynamic updates. Supports multiple values. | |
| -tlsMinVersion | array | Minimum TLS version restriction (optional). Supports TLS10, TLS11, TLS12, TLS13. Supports multiple values. | |
| -version | No parameter | Display VictoriaMetrics version information. | |
| -vmstorageDialTimeout | duration | 3s | Timeout for vmselect to establish RPC connection with vmstorage. See -vmstorageUserTimeout. |
| -vmstorageUserTimeout | duration | 3s | Network timeout for RPC connections between vmselect and vmstorage (Linux only). Lower values reduce maximum query duration during network failures. See TCP_USER_TIMEOUT description. |
| -zipkin.batchSize | int | 100 | Maximum number of Spans to send in a single batch. |
| -zipkin.bufferSize | int | 10000 | Maximum number of Spans to buffer. |
| -zipkin.endpoint | string | Endpoint URL for the Zipkin collector, e.g.: http://localhost:9529. | |
| -zipkin.flushPeriod | duration | 1s | Maximum flush interval. |
| -zipkin.serviceName | string | guance-select | Service name used in Zipkin Spans. |
Guance Insert Parameter Description¶
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| -blockcache.missesBeforeCaching | int | 2 | Number of cache misses before a block is cached. Higher values may reduce cache size but increase CPU and disk read pressure. |
| -cacheExpireDuration | duration | 30m0s | Duration after which unaccessed data in the memory cache is removed. Smaller values reduce memory usage but increase CPU usage. |
| -denyQueryTracing | None | Whether to disable query tracing. See: https://docs.victoriametrics.com/#query-tracing | |
| -disableInflux | None | true | Whether to disable support for Influx format. |
| -disableRerouting | None | true | Whether to disable data rerouting. Rerouting can be triggered when some vmstorage writes are slow; turning this off can reduce active time series during rolling restarts. |
| -disableReroutingOnUnavailable | None | Whether to disable rerouting when vmstorage nodes are unavailable. Disabling stops data writes if a node is unavailable, which can reduce impact during restarts or drastic series changes. | |
| -doris.cacheDataPath | string | /data/file-queue | Cache file path. |
| -doris.coldDataTierOnly | None | Use cold data storage tier only. | |
| -doris.debugIndexName | string | default | indexName for which to add debug logs. |
| -doris.debugMeasurement | string | measurement for which to add debug logs. | |
| -doris.debugNamespace | string | namespace for which to add debug logs. | |
| -doris.debugTenantID | uint | Tenant ID (accountID) for which to add debug logs. | |
| -doris.disableBFOnNewTables | None | Do not enable bloom filters on new tables. | |
| -doris.disableKeepAlives | None | Disable keep-alive in stream load. | |
| -doris.disableUnicodeTokenizer | None | Use Chinese tokenizer instead of Unicode tokenizer. | |
| -doris.enableBFOnOldTables | None | Enable bloom filters for old tables. | |
| -doris.enableFileCacheTTL | None | Enable cloud database SelectDB data caching: https://help.aliyun.com/document_detail/2638759.html | |
| -doris.enableWarmDataTier | None | Enable warm+hot storage mode instead of cold+hot mode. | |
| -doris.forceFlushInterval | duration | 30s | Force flush interval for non-event data. |
| -doris.indexCacheTTL | duration | 30m0s | TTL for doris index cache. |
| -doris.loadToSingleTablet | None | Use load_to_single_tablet header in stream load requests. | |
| -doris.maxCacheSize | size | 0 | Deprecated, use fileQueue.maxTotalSize. Maximum total bytes for cached data. |
| -doris.maxConcurrentInserts | int | Deprecated, use fileQueue.workers. | |
| -doris.maxFieldCount | size | 512 | Maximum number of fields allowed per measurement. Supports units like KB, MB, GB. |
| -doris.maxFieldSize | size | 33554432 | Maximum byte size for a single field. Supports units like KB, MB, GB. |
| -doris.maxSizePerRequest | size | 0 | Deprecated, use fileQueue.maxFileSize. Maximum size per row in a single parse. |
| -doris.onlyQueryFE | None | If enabled, query data only from FE nodes, not directly from BE. | |
| -doris.onlyWriteFE | None | If enabled, write data only to FE nodes, not directly to BE. | |
| -doris.replicationFactor | int | 1 | Replication factor for Doris tables. |
| -doris.sampleIndexName | string | sample index name. | |
| -doris.sampleInsertRatio | int | sample write ratio. | |
| -doris.sampleInterval | value | 1s | sample interval time, supports units s/m/h/d/w/y. Default is in months. |
| -doris.sampleNamespace | string | sample namespace. | |
| -doris.sampleTenantID | string | sample tenant ID. | |
| -doris.storageResource | string | s3_default | Resource name used by the Doris storage policy. |
| -doris.variantSchemaMode | string | schema mode, supports 'none', 'minimal', 'full'. | |
| -dorisCluster | string | default_cluster | Doris cluster name. |
| -dorisFENode | array | Doris-FE node addresses (comma-separated for multiple). | |
| -dorisHTTPPort | int | 8030 | Doris HTTP port. |
| -dorisMySQLPort | int | 9030 | Doris MySQL port. |
| -dorisPassword | string | Password for connecting to Doris. | |
| -dorisUsername | string | root | Username for connecting to Doris. |
| -dropSamplesOnOverload | None | Whether to drop samples if vmstorage nodes are overloaded or unavailable to ensure cluster availability. Note this operation is performed before replication, use with caution. | |
| -enableTCP6 | None | Whether to enable IPv6 listening and dialing. Default is IPv4 only. | |
| -envflag.enable | None | Whether to allow reading parameters from environment variables. Command line parameters take precedence. See: https://docs.victoriametrics.com/#environment-variables | |
| -envflag.prefix | string | Prefix for environment variables (requires -envflag.enable). | |
| -fileQueue.maxFileSize | size | 104857600 | Maximum size of a single file in the file queue (default 100MB). |
| -fileQueue.maxTotalSize | size | 3758096384 | Maximum total size of the file queue (default 3.5GB). |
| -fileQueue.workers | int | 8 | Maximum number of concurrent threads for inserting into ScopeDB or Doris. |
| -filedb.maxFileSize | int | 10485760 | Maximum file size for filedb (default 10MB). |
| -filestream.disableFadvise | None | Whether to disable the fadvise() system call, used to prevent recently accessed data from being evicted from the OS cache when reading large files. | |
| -flagsAuthKey | value | Authentication key for the /flags interface. Can be read from a file or URL. | |
| -fs.disableMmap | None | Whether to disable mmap() and use pread() to read data files. Enabled by default for 64-bit systems. | |
| -gcolumnCompressLevel | int | Compression level for the guance column protocol. Higher values compress better but use more CPU; negative values reduce CPU usage but increase network traffic. | |
| -http.connTimeout | duration | 2m0s | HTTP connection timeout. Can be used to make load balancers distribute traffic more evenly. 0 means no timeout. |
| -http.disableResponseCompression | None | Whether to disable HTTP response compression to save CPU. Compression is enabled by default to save network bandwidth. | |
| -http.header.csp | string | Set the value for the Content-Security-Policy header. Recommended value: "default-src 'self'". |
|
| -http.header.frameOptions | string | Set the value for the X-Frame-Options header. |
|
| -http.header.hsts | string | Set the value for the Strict-Transport-Security header. Recommended value: "max-age=31536000; includeSubDomains". |
|
| -http.idleConnTimeout | duration | 1m0s | Timeout for idle HTTP connections. |
| -http.maxGracefulShutdownDuration | duration | 7s | Maximum wait time for HTTP service graceful shutdown. Higher values may be needed for high-load servers. |
| -http.pathPrefix | string | Prefix for all HTTP paths, e.g., set to /foo/bar so all paths start with it, useful for reverse proxies. |
|
| -http.shutdownDelay | duration | Delay before HTTP service shutdown. During this time, the /health interface returns non-OK to notify load balancers to switch traffic. | |
| -httpAuth.password | value | HTTP Basic Auth password. Authentication is disabled if username is empty. Supports reading from file or URL. | |
| -httpAuth.username | string | HTTP Basic Auth username. Empty means disabled. Requires -httpAuth.password. | |
| -httpListenAddr | array | HTTP service listening addresses. Supports multiple addresses. | |
| -httpListenAddr.useProxyProtocol | array | false | Whether to use proxy protocol for connections received on -httpListenAddr. When enabled, the HTTP server cannot provide the /metrics endpoint; use -pushmetrics.url for metric pushing. Supports comma-separated or multiple settings. Empty value is false. |
| -influx.defaultBatchLinesCount | size | 16 | Default number of lines per batch for InfluxDB parsing. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB. |
| -influx.defaultBatchSize | size | 1048576 | Default byte size per batch for InfluxDB parsing. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB. |
| -insert.maxFutureTimeDrift | duration | 1h0m0s | When inserting data, events with timestamps greater than the current time plus this value will be rejected. |
| -insert.maxPastTimeDrift | duration | When inserting data, events with timestamps less than the current time minus this value will be rejected. | |
| -insertNode | array | Specify the addresses of guance-insert nodes, comma-separated, supports quoted or bracketed values. | |
| -internStringCacheExpireDuration | duration | 6m0s | Expiration time for interned string cache. See: https://en.wikipedia.org/wiki/String_interning. |
| -internStringDisableCache | false | Whether to disable the interned string cache. May reduce memory usage but increase CPU usage. | |
| -internStringMaxLen | int | 500 | Maximum length for interned strings. Setting a smaller value may reduce memory usage but increase CPU usage. |
| -loggerDisableTimestamps | false | Whether to disable timestamp recording in logs. | |
| -loggerErrorsPerSecondLimit | int | Limit for ERROR logs output per second. Excess errors beyond the limit are suppressed. Set to 0 for no limit. | |
| -loggerFormat | string | default | Log format. Options: default, json. |
| -loggerJSONFields | string | Modify field names in JSON format logs, e.g., "ts:timestamp,msg:message". Supported fields are ts, level, caller, msg. | |
| -loggerLevel | string | INFO | Minimum level for log output. Options: INFO, WARN, ERROR, FATAL, PANIC. |
| -loggerMaxArgLen | int | 1000 | Maximum length for a single log argument. Exceeding parts are displayed with prefix and suffix, like 'arg_start..arg_end'. |
| -loggerOutput | string | stderr | Log output target. Supports: stderr, stdout. |
| -loggerTimezone | string | UTC | Timezone for timestamps in logs. Must be a valid IANA standard format, like America/New_York, Etc/GMT+3, or Local. |
| -loggerWarnsPerSecondLimit | int | Limit for WARN logs output per second. Excess warnings beyond the limit are suppressed. Set to 0 for no limit. | |
| -maxConcurrentInserts | int | 24 | Maximum number of concurrent insert requests allowed. The default is suitable for most cases; can be increased if the network is slow. |
| -maxInsertRequestSize | size | 134217728 | Maximum byte size for a single gcolumn insert request. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB. |
| -maxLabelValueLen | int | 16384 | Maximum length for label values in received time series. Exceeding parts are truncated, and the vm_too_long_label_values_total metric on the /metrics page increases. |
| -maxLabelsPerTimeseries | int | 256 | Maximum number of labels allowed per time series. Excess labels are discarded, and the corresponding /metrics page metric vm_metrics_with_dropped_labels_total increases. |
| -memory.allowedBytes | size | 0 | Upper limit of system memory that VictoriaMetrics cache can occupy (bytes). If non-zero, overrides -memory.allowedPercent. Setting too small increases cache miss rate; setting too large may affect OS page cache. |
| -memory.allowedPercent | float | 60 | Percentage of system memory that VictoriaMetrics cache can occupy. Setting too small may increase CPU and disk IO; too large affects page cache. |
| -metrics.exposeMetadata | false | Whether to expose TYPE and HELP metadata on the /metrics page. Some systems (like Google Cloud's Managed Prometheus) require this information. | |
| -metricsAuthKey | value | Authentication key for the /metrics endpoint, passed via the authKey query parameter. Supports reading key from file or HTTP(S) URL. | |
| -pprofAuthKey | value | Authentication key for the /debug/pprof/* endpoints, passed via the authKey query parameter. Supports reading key from file or HTTP(S) URL. | |
| -prevCacheRemovalPercent | float | 0.1 | Threshold percentage below which entries from the old cache are removed. Higher values reduce memory usage but may increase CPU usage. |
| -pushmetrics.disableCompression | false | Whether to disable request body compression when pushing to each -pushmetrics.url. | |
| -pushmetrics.extraLabel | array | Extra labels to add when pushing to each -pushmetrics.url, e.g., -pushmetrics.extraLabel='instance="foo"'. Supports commas, quotes, and brackets. |
|
| -pushmetrics.header | array | HTTP Headers to include when pushing requests to each -pushmetrics.url, e.g., Authorization: Basic foobar. Supports commas, quotes, and brackets. |
|
| -pushmetrics.interval | duration | 10s | Time interval for pushing metrics to each -pushmetrics.url. |
| -pushmetrics.url | array | Specify target addresses to push /metrics page data to. Not pushed by default. Supports multiple addresses and complex syntax. | |
| -relabelConfig | string | Path to the rewrite rule configuration file (local or http address), automatically reloaded upon receiving SIGHUP signal. See: https://docs.victoriametrics.com/#relabeling | |
| -replicationFactor | int | 1 | Number of replicas for data, i.e., copies of each data item across different -storageNode. If this value >1, vmselect must set -dedup.minScrapeInterval=1ms for deduplication. |
| -retentionFilters.cleanInterval | duration | 360h0m0s | Time interval for cleaning expired data. |
| -retentionFilters.config | string | Path to the retention policy configuration file. | |
| -retentionFilters.configCheckInterval | duration | 1h0m0s | Time interval for checking updates to the retention policy configuration file. |
| -rpc.disableCompression | false | Whether to disable compression when sending data from vminsert to vmstorage. Disabling reduces CPU usage but increases network bandwidth usage. | |
| -scopeDB.dbName | string | scopedb | ScopeDB database name. |
| -scopeDB.dumpIngestBody | false | Whether to output the request body content on insertion failure. | |
| -scopeDB.ensureJob | false | Whether to enable the ensure job. | |
| -scopeDB.indexCacheTTL | duration | 5m0s | TTL for ScopeDB index cache. |
| -scopeDB.maxConcurrentIndexRequests | int | 32 | Maximum number of concurrent index requests allowed for ScopeDB. |
| -scopeDB.maxFieldCount | size | 512 | Maximum number of fields per index. |
| -scopeDB.maxFieldSize | size | 33554432 | Maximum byte size for a single gcolumn field. |
| -scopeDB.node | array | List of ScopeDB node addresses. Supports various formats. | |
| -scopeDB.nodegroup.ctl | string | ingest-meta | ScopeDB node group used for the control plane. |
| -scopeDB.nodegroup.ingest | string | ingest | ScopeDB node group used for data ingestion. |
| -scopeDB.nodesUpdateInterval | duration | 10s | Time interval for updating ScopeDB node information. |
| -scopeDB.onlyUseBootstrapNodes | bool | false | Whether to use only bootstrap nodes. |
| -scopeDB.password | string | Access password for ScopeDB. | |
| -scopeDB.port | uint | 6543 | Access port for ScopeDB. |
| -scopeDB.username | string | Username for ScopeDB. | |
| -search.debugThrottler | bool | false | Debug the throttler. |
| -search.denyPartialResponse | bool | false | Whether to deny partial responses (improves consistency, sacrifices availability). |
| -search.dorisColdQueryCPULimit | int | 4 | Doris CPU limit used for cold data queries. |
| -search.dorisDisableADBC | bool | false | Whether to disable ADBC (prefer Thrift). |
| -search.dorisDisableSampling | bool | false | Whether to disable sampling. |
| -search.dorisEnableSmallColdGroup | bool | false | Enable dedicated workgroup for small cold queries. |
| -search.dorisMaxCursorRows | int | 50000000 | Maximum rows to scan in cursor queries. |
| -search.dorisMaxLiteralArraySize | int | 1000 | Maximum number of elements in literal value arrays. |
| -search.dorisMaxOrderingRows | int | Maximum rows to scan for custom ordering queries. | |
| -search.dorisMaxRowsForOrder | int | Maximum rows for ORDER BY on non-time columns. | |
| -search.dorisThrottlerURL | string | API address for the Throttler. | |
| -search.logQueryMemoryUsage | size | 524288000 | Log queries that occupy memory exceeding the specified size. |
| -search.maxExportDuration | duration | 720h0m0s | Maximum duration for /api/v1/export requests. |
| -search.maxGroups | int | 100000 | Maximum number of groups allowed in query results. |
| -search.maxLabelsAPIDuration | duration | 5s | Maximum duration for /api/v1/labels, /api/v1/label/.../values, and /api/v1/series requests. |
| -search.maxLimit | int | 10000 | Maximum number of rows allowed in query results. |
| -search.maxMemoryPerQuery | size | 0 | Maximum memory allowed for a single query; queries exceeding this are rejected. Supports units like KB, MB, GB. |
| -search.maxQueryDuration | duration | 30s | Maximum execution time for a query. |
| -search.maxStatusRequestDuration | duration | 5m0s | Maximum duration for /api/v1/status/* requests. |
| -search.minTimeRangeForLargeQuery | duration | 12h0m0s | Minimum time range to scan for a large query. |
| -search.scopeDB.firstCursorScanRows | int | 10000000 | Number of rows scanned initially for cursor pagination queries. |
| -search.scopeDB.logQuery | bool | true | Whether to log ScopeDB query statements. |
| -search.scopeDB.maxLiteralArraySize | int | 1000 | Maximum number of elements in literal value arrays. |
| -search.scopeDB.maxRowsForOrder | int | 100000 | Maximum rows for ORDER BY on non-time columns. |
| -search.scopeDB.maxTimeRange | duration | Maximum time range for queries. | |
| -sortLabels | bool | false | Whether to sort labels written to storage. Reduces memory usage but may decrease write performance. |
| -storageNode | array | List of guance-storage node addresses. Supports various formats. | |
| -streamaggr.cleanupInterval | duration | 10m0s | Interval for cleaning up expired queries. |
| -streamaggr.dataBlocksCacheSize | int | 157286400 | Data block cache size (bytes). |
| -streamaggr.ignoreContinuousCheck | bool | false | Whether to ignore continuous check. |
| -streamaggr.indexBlocksCacheSize | int | 52428800 | Index block cache size (bytes). |
| -streamaggr.insertVerify | bool | false | Enable streamaggr verification mode. |
| -streamaggr.queryRetentionPeriod | duration | 168h0m0s | Query retention period. |
| -streamaggr.replay | bool | false | Enable streamaggr replay mode. |
| -streamaggr.retentionMonths | int | 6 | Number of months to retain stream aggregation data. |
| -streamaggrDataPath | string | Data storage path. | |
| -tls | array | Whether to enable TLS for the specified httpListenAddr. Requires setting -tlsCertFile and -tlsKeyFile. | |
| -tlsCertFile | array | Path to the TLS certificate file. Supports dynamic updates. | |
| -tlsCipherSuites | array | Optional list of TLS cipher suites. | |
| -tlsKeyFile | array | Path to the TLS key file. Supports dynamic updates. | |
| -tlsMinVersion | array | Minimum TLS version (TLS10, TLS11, TLS12, TLS13). | |
| -usePromCompatibleNaming | bool | false | Whether to replace unsupported Prometheus characters with underscores. |
| -version | bool | false | Display VictoriaMetrics version information. |
| -vmstorageDialTimeout | duration | 3s | Timeout for vminsert to establish RPC connection to vmstorage. |
| -vmstorageUserTimeout | duration | 3s | Network timeout for vminsert to vmstorage (Linux specific). |
| -zipkin.batchSize | int | 100 | Maximum number of spans to send in a single batch. |
| -zipkin.bufferSize | int | 10000 | Maximum number of spans to buffer. |
| -zipkin.endpoint | string | Zipkin collector endpoint URL. | |
| -zipkin.flushPeriod | duration | 1s | Maximum flush interval. |
| -zipkin.serviceName | string | guance-insert | Service name used in Zipkin Spans. |
Guance Storage Parameter Description¶
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
| -bigMergeConcurrency | int | Deprecated: This parameter no longer has an effect. | |
| -blockcache.missesBeforeCaching | int | 2 | Number of cache misses before a block is cached. Higher values may reduce indexdb/dataBlocks cache size but increase CPU and disk reads. |
| -cacheExpireDuration | duration | 30m0s | Duration after which unaccessed entries in the memory cache are removed. Lower values may reduce memory usage but increase CPU usage. See -prevCacheRemovalPercent. |
| -dedup.minScrapeInterval | duration | Only the last sample per time series is kept within the specified discrete interval. Must be set greater than 0. See deduplication documentation. | |
| -denyQueriesOutsideRetention | bool | false | Whether to deny queries for data outside the configured -retentionPeriod range. When enabled, /api/v1/query_range returns a 503 error for expired queries. |
| -denyQueryTracing | bool | false | Whether to disable query tracing. See query tracing documentation. |
| -enableTCP6 | bool | false | Whether to enable IPv6 for listening and dialing. Default is IPv4 only. |
| -envflag.enable | bool | false | Whether to enable reading parameters from environment variables. Command line parameters take precedence. If not enabled, read only from command line. See environment variable documentation. |
| -envflag.prefix | string | Environment variable prefix when -envflag.enable is enabled. | |
| -filestream.disableFadvise | bool | false | Whether to disable the fadvise() system call when reading large files. This call prevents recently accessed data from being evicted by the system cache; disabling it may reduce CPU usage in some cases. |
| -finalMergeDelay | duration | Deprecated: This parameter no longer has an effect. | |
| -flagsAuthKey | value | Authentication key for the /flags endpoint, passed via the authKey query parameter. Supports reading key value from file or HTTP(S) URL. | |
| -forceFlushAuthKey | value | Authentication key required for the /internal/force_flush page. Supports reading from file or HTTP(S) URL. | |
| -forceMergeAuthKey | value | Authentication key required for the /internal/force_merge page. Supports reading from file or HTTP(S) URL. | |
| -fs.disableMmap | bool | false | Whether to use pread() instead of mmap() to read data files. Default is mmap() for 64-bit architectures, pread() for 32-bit. mmap() is faster for reading small data blocks. |
| -http.connTimeout | duration | 2m0s | Connection timeout for -httpListenAddr. Can help load balancers distribute requests evenly. 0 disables timeout close. |
| -http.disableResponseCompression | bool | false | Whether to disable HTTP response compression. Compression is enabled by default to save network bandwidth; disabling saves CPU. |
| -http.header.csp | string | "default-src 'self'" | Set the HTTP header Content-Security-Policy. Recommended value is "default-src 'self'". |
| -http.header.frameOptions | string | Set the HTTP header X-Frame-Options. | |
| -http.header.hsts | string | "max-age=31536000; includeSubDomains" | Set the HTTP header Strict-Transport-Security. Recommended value as example. |
| -http.idleConnTimeout | duration | 1m0s | HTTP idle connection timeout close time. |
| -http.maxGracefulShutdownDuration | duration | 7s | Maximum wait time for HTTP server graceful shutdown. Higher values are recommended for high-load servers. |
| -http.pathPrefix | string | Add a prefix to all HTTP paths, e.g., for accessing path prefixes in proxies. See related documentation. | |
| -http.shutdownDelay | duration | Delay before HTTP server shutdown. During this time, /health returns a non-OK status, facilitating load balancer request transfer. | |
| -httpAuth.password | value | HTTP basic authentication password. Authentication is invalid if username is not set. Supports reading from file or HTTP(S) URL. | |
| -httpAuth.username | string | HTTP basic authentication username. Invalid if not set. | |
| -httpListenAddr | array | HTTP listening addresses. Can be passed via comma or multiple parameters. Supports complex formats. | |
| -httpListenAddr.useProxyProtocol | array | false | Whether to enable Proxy Protocol for the specified listening address. Enabling prevents the use of the regular /metrics endpoint. See HAProxy documentation. |
| -inmemoryDataFlushInterval | duration | 5s | Interval for persisting in-memory data to disk. Saves data to prevent loss on abnormal shutdown. Larger intervals extend flash life; smaller intervals increase disk IO load. Minimum 1 second. |
| -insert.maxQueueDuration | duration | 1m0s | Maximum wait time for insert requests in the queue when maximum concurrent inserts are reached. |
| -internStringCacheExpireDuration | duration | 6m0s | Expiration time for string interning cache. See string interning mechanism. |
| -internStringDisableCache | bool | false | Whether to disable the string interning cache. Disabling reduces memory but increases CPU usage. |
| -internStringMaxLen | int | 500 | Maximum length for string interning. Lower values save memory but increase CPU usage. |
| -logNewSeries | bool | false | Whether to log new time series. For debugging only; may affect performance. |
| -loggerDisableTimestamps | bool | Whether to disable timestamp writing in logs. | |
| -loggerErrorsPerSecondLimit | int | 0 | Maximum number of ERROR logs allowed per second. Error logs exceeding this value are suppressed. 0 means no limit. |
| -loggerFormat | string | "default" | Log format. Options: default, json (default "default"). |
| -loggerJSONFields | string | Rename fields in JSON format logs. For example: "ts:timestamp,msg:message" changes "ts" to "timestamp", "msg" to "message". Supported fields: ts, level, caller, msg. | |
| -loggerLevel | string | "INFO" | Minimum log level. Options: INFO, WARN, ERROR, FATAL, PANIC (default "INFO"). |
| -loggerMaxArgLen | int | 1000 | Maximum length for a single log argument. Arguments exceeding this length are truncated and displayed as 'arg_start..arg_end', where the prefix and suffix lengths do not exceed -loggerMaxArgLen / 2. |
| -loggerOutput | string | "stderr" | Log output location. Supported values: stderr, stdout (default "stderr"). |
| -loggerTimezone | string | "UTC" | Timezone for log timestamps. Timezone must be a valid IANA timezone name, e.g., America/New_York, Europe/Berlin, Etc/GMT+3, or Local (default "UTC"). |
| -loggerWarnsPerSecondLimit | int | 0 | Maximum number of WARN logs allowed per second. Warning logs exceeding this value are suppressed. 0 means no limit. |
| -maxConcurrentInserts | int | 4 | Maximum number of concurrent insert requests. Can be increased if the client network is slow. The default is set based on the number of CPU cores and is generally suitable. See -insert.maxQueueDuration. |
| -memory.allowedBytes | size | 0 | System memory size (bytes) that VictoriaMetrics cache can occupy. Overrides -memory.allowedPercent if set to a non-zero value. Setting it too low increases cache miss rate, leading to higher CPU and disk IO. Supports unit suffixes KB, MB, GB, etc. |
| -memory.allowedPercent | float | 60 | Percentage of system memory that VictoriaMetrics cache is allowed to occupy. See -memory.allowedBytes. Too low increases cache miss rate; too high may cause more disk IO. |
| -metrics.exposeMetadata | bool | Whether to expose TYPE and HELP metadata on the /metrics page. Some systems (like Google Cloud Managed Prometheus) require this information. | |
| -metricsAuthKey | string | Authentication key for the /metrics interface. Passed via the authKey query parameter, takes precedence over httpAuth.* settings. Can be read from file or HTTP/HTTPS URL. | |
| -pprofAuthKey | string | Authentication key for the /debug/pprof/* interface. Passed via the authKey query parameter, takes precedence over httpAuth.* settings. Can be read from file or HTTP/HTTPS URL. | |
| -precisionBits | int | 64 | Number of precision bits stored per value. Lower bits mean higher compression but greater precision loss. (Default 64) |
| -prevCacheRemovalPercent | float | 0.1 | Entries from the previous cache are removed when the current cache serves requests below this percentage. Increasing this value reduces memory usage but increases CPU usage. See -cacheExpireDuration. |
| -pushmetrics.disableCompression | bool | Whether to disable request body compression when pushing to all -pushmetrics.url. | |
| -pushmetrics.extraLabel | array | Add extra labels to metrics pushed to all -pushmetrics.url. For example -pushmetrics.extraLabel='instance="foo"'. Supports arrays and multiple settings. | |
| -pushmetrics.header | array | HTTP request headers sent to all -pushmetrics.url. For example -pushmetrics.header='Authorization: Basic foobar'. Supports arrays and multiple settings. | |
| -pushmetrics.interval | duration | 10s | Time interval for pushing metrics to all -pushmetrics.url. |
| -loggerDisableTimestamps | bool | false | Whether to disable timestamp writing in logs. |
| -loggerErrorsPerSecondLimit | int | 0 | Upper limit for ERROR messages output per second. Errors exceeding the limit are suppressed. 0 means no limit. |
| -loggerFormat | string | "default" | Log format. Options: default, json. |
| -loggerJSONFields | string | "" | Rename fields in JSON format logs, e.g., "ts:timestamp,msg:message" renames "ts" to "timestamp". Supported fields: ts, level, caller, msg. |
| -loggerLevel | string | "INFO" | Minimum log output level. Options: INFO, WARN, ERROR, FATAL, PANIC. |
| -loggerMaxArgLen | int | 1000 | Maximum length for a single log argument. Arguments exceeding this length are truncated to 'arg_start..arg_end'. |
| -loggerOutput | string | "stderr" | Log output location. Supported values: stderr, stdout. |
| -loggerTimezone | string | "UTC" | Timezone for timestamps in logs. Must be a valid IANA timezone name, e.g., America/New_York. |
| -loggerWarnsPerSecondLimit | int | 0 | Upper limit for WARN messages output per second. Warnings exceeding the limit are suppressed. 0 means no limit. |
| -maxConcurrentInserts | int | 4 | Maximum number of concurrent write requests. Set automatically based on CPU cores by default. |
| -memory.allowedBytes | size | 0 | System memory size that VictoriaMetrics cache can use. Takes precedence over -memory.allowedPercent. Supports units KB, MB, GB, etc. |
| -memory.allowedPercent | float | 60 | Percentage of system memory that VictoriaMetrics cache can use. |
| -metrics.exposeMetadata | bool | false | Whether to expose TYPE and HELP metadata on the /metrics page. |
| -metricsAuthKey | string | "" | Authentication key for accessing the /metrics endpoint. Supports reading from file or URL. |
| -pprofAuthKey | string | "" | Authentication key for accessing the /debug/pprof/* endpoints. Supports reading from file or URL. |
| -precisionBits | int | 64 | Number of precision bits stored per value. Lower values improve compression but reduce precision. |
| -prevCacheRemovalPercent | float | 0.1 | Threshold percentage for removing entries from the previous generation cache. Higher values reduce memory usage but increase CPU usage. |
| -pushmetrics.disableCompression | bool | false | Whether to disable request body compression when pushing metrics. |
| -pushmetrics.extraLabel | array | [] | Array of extra labels to add to pushed metrics, e.g., instance="foo". |
| -pushmetrics.header | array | [] | HTTP request headers to attach when pushing metrics, e.g., Authorization. |
| -pushmetrics.interval | duration | 10s | Time interval for pushing metrics. |
| -pushmetrics.url | array | [] | List of remote URLs to push metrics to. Not pushed by default. |
| -retentionFilters.cleanInterval | duration | 360h | Time interval for cleaning expired data. |
| -retentionFilters.config | string | "" | Path to the retention filter configuration file. |
| -retentionFilters.configCheckInterval | duration | 1h | Interval for checking changes to the retention filter configuration file. |
| -retentionPeriod | value | 1 | Data retention period. Data older than this period is automatically deleted. Supports units s, m, h, d, w, y. |
| -retentionTimezoneOffset | duration | 0 | Timezone offset for indexdb rotation execution. 0 means UTC 4 AM. |
| -rpc.disableCompression | bool | false | Whether to disable data compression between vmstorage and vmselect. Disabling reduces CPU but increases network bandwidth. |
| -search.maxConcurrentRequests | int | 4 | Maximum number of concurrent vmselect requests that vmstorage can handle. |
| -search.maxQueueDuration | duration | 10s | Maximum queuing wait time for requests. |
| -search.maxTagKeys | int | 100000 | Maximum number of tag keys returned in a single search. |
| -search.maxTagValues | int | 100000 | Maximum number of tag values returned in a single search. |
| -search.maxUniqueTimeseries | int | 0 | Maximum number of unique time series that can be scanned in a query. 0 means unlimited. |
| -smallMergeConcurrency | int | (Deprecated) | Deprecated, currently has no effect. |
| -snapshotAuthKey | string | "" | Authentication key for accessing the /snapshot* page. Supports reading from file or URL. |
| -snapshotCreateTimeout | duration | (Deprecated) | Deprecated, no effect. |
| -snapshotsMaxAge | value | 0 | Automatically delete snapshots older than this time. Supports units s, m, h, d, w, y. |
| -storage.cacheSizeIndexDBDataBlocks | size | 0 | Maximum size for indexdb/dataBlocks cache. |
| -storage.cacheSizeIndexDBIndexBlocks | size | 0 | Maximum size for indexdb/indexBlocks cache. |
| -storage.cacheSizeIndexDBTagFilters | size | 0 | Maximum size for indexdb/tagFiltersToMetricIDs cache. |
| -storage.cacheSizeStorageTSID | size | 0 | Maximum size for storage/tsid cache. |
| -storage.maxDailySeries | int | 0 | |
| -storage.maxHourlySeries | int | 0 | Maximum number of unique series that can be created in 1 hour. Series exceeding the limit are discarded and logged. |
| -storage.maxSeriesPerSecond | int | 2000 | Maximum number of series that can be created per second. Series exceeding the limit are discarded and logged. |
| -storage.minFreeDiskSpaceBytes | size | 10000000 | Minimum free disk space remaining on the storage path. Storage stops receiving data below this value. |
| -storage.vminsertConnsShutdownDuration | duration | 25s | Time required for graceful shutdown of vminsert connections. Controls shutdown speed to reduce load fluctuations. |
| -storageDataPath | string | "vmstorage-data" | Storage data path. |
| -tls | array | [] | Whether to enable TLS for the specified HTTP listening address. Requires setting both certificate and key files. |
| -tlsCertFile | array | [] | Path to the TLS certificate file. Supports dynamic updates. |
| -tlsCipherSuites | array | [] | List of TLS cipher suites. |
| -tlsKeyFile | array | [] | Path to the TLS key file. Supports dynamic updates. |
| -tlsMinVersion | array | [] | Minimum TLS version requirement. Supports TLS10, TLS11, TLS12, TLS13. |
| -version | bool | false | Display VictoriaMetrics version. |
| -vminsertAddr | string | ":8400" | vminsert service listening address. |
| -vmselectAddr | string | ":8401" | vmselect service listening address. |
