Skip to content

GuanceDB Engine Deployment

Note

The CPU needs to support the AVX2 instruction set. Execute grep avx2 /proc/cpuinfo to test. If there is no output, 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 both the GuanceDB for Metrics component and the GuanceDB for Logs component. These two components share the guance-insert and guance-select services, providing a unified write and query interface.
  • 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.
  • Retrieves data from all storage nodes and performs calculations.
  • Returns the final query results.

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 Deployment Configuration Information

Service Name Address Port
guance-insert guance-insert.guancedb 8480
guance-select guance-select.guancedb 8481

Capacity Planning

1.Memory Reservation

  • All components should reserve at least 50% of memory.
  • Used to handle sudden write bursts and avoid OOM.

2.CPU Reservation

  • All components should reserve at least 50% of CPU.
  • Avoids slow writes and queries caused by sudden write bursts.

3.Storage Space Reservation

  • guance-storage nodes should reserve 20% of storage space.
  • Can be configured using the -storage.minFreeDiskSpaceBytes parameter.

Reference Configuration

For 1 million time series (writing every 10s, real-time write QPS of 100k/s, query QPS of 100, data retention of 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 number of time series during actual deployment. Each component supports 2 instances by default.

GuanceDB Engine Deployment

Note

The deployment of GuanceDB for Metrics and GuanceDB for Logs has a sequential relationship. You can deploy GuanceDB for Metrics first, and after Doris is deployed, you can configure Doris information and install GuanceDB for Logs. If you only want to deploy the GuanceDB for Logs component, you can 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 that the /data directory 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 with cloud box, 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 disk type
  everest.io/passthrough: "true"
provisioner: everest-csi-provisioner
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

Deploy the following yaml configuration:

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: guancedb-cs
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

Download Chart

Note

It is recommended to use Git to manage values.yaml, include the values.yaml file in Git management, ensure that each configuration change is recorded, and facilitate tracking and rollback.

Download the chart package:

helm pull oci://pubrepo.guance.com/guancedb/guancedb --untar

--untar is for uncompressed, default is compressed.

Configure and Install GuanceDB for Metrics

1.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 address. If there is no such requirement, do not modify.
    repository: pubrepo.guance.com/guancedb/guance-select
  # Modify nodeSelector and tolerations to schedule guance-select containers. If there is no such requirement, do not modify.
  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 address. If there is no such requirement, do not modify.
    repository: pubrepo.guance.com/guancedb/guance-insert
  # Modify nodeSelector and tolerations to schedule guance-insert containers. If there is no such requirement, do not modify.
  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 address. If there is no such requirement, do not modify.
    repository: pubrepo.guance.com/guancedb/guance-storage
  # Modify nodeSelector and tolerations to schedule guance-storage containers. If there is no such requirement, do not modify.
  nodeSelector: {}
  tolerations:
    []
    # - key: "key"
    #   operator: "Equal|Exists"
    #   value: "value"
    #   effect: "NoSchedule|PreferNoSchedule"

2.Install GuanceDB for Metrics

helm upgrade -i guancedb oci://pubrepo.guance.com/guancedb/guancedb \
   -n guancedb --create-namespace -f values.yaml

3.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 GuanceDB for Metrics is already deployed, installing GuanceDB for Logs will not add new services, but only add service startup parameters.

1.Configure GuanceDB for Logs

Enter the guancedb directory and modify values.yaml

Note

values.yaml is the file for configuring GuanceDB for Metrics. If values.yaml is lost, you can execute helm get values -n guancedb guancedb > values.yaml to obtain 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 regular user password
  userReadPassword: ''
  # memory size for cache data
  cacheSizeLimit: 4Gi

guance_throttler:
  # Enable 
  enabled: true
  ...

2.Install GuanceDB for Logs

helm upgrade -i guancedb oci://pubrepo.guance.com/guancedb/guancedb \
   -n guancedb --create-namespace -f values.yaml

3.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

helm uninstall -n guancedb guancedb

Other

Modify Component Parameters

1.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
    streamaggr.insertVerify: 'true'

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'

2.Update 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 The number of cache misses before a cache block is placed into the cache. A higher value may reduce the size of the indexdb/dataBlocks cache but increase CPU and disk read operations.
-cacheDataPath string "/tmp/guance-select" The path to the cache file directory. If empty, no cache is saved.
-cacheExpireDuration duration 30m0s The duration after which unaccessed cache items are removed from memory. A lower value may reduce memory usage but increase CPU usage.
-dedup.minScrapeInterval duration 1ms Only the last sample within each discrete time interval is retained for each time series, preventing duplication.
-denyQueryTracing bool Whether to disable query tracing.
-doris.coldDataTierOnly bool Use only cold storage.
-doris.disableBFOnNewTables bool Do not use Bloom filters for new tables.
-doris.disableUnicodeTokenizer bool Use a Chinese tokenizer instead of a Unicode tokenizer.
-doris.enableBFOnOldTables bool Use Bloom filters for old tables.
-doris.enableFileCacheTTL bool Use the data cache of the cloud database SelectDB version.
-doris.enableWarmDataTier bool Use hot plus warm storage instead of hot plus cold storage.
-doris.indexCacheTTL duration 30m0s The TTL of the Doris index cache.
-doris.onlyQueryFE bool When enabled, do not query data directly from the backend (be).
-doris.onlyWriteFE bool When enabled, do not write data directly to the backend (be).
-doris.replicationFactor int 1 The number of replicas for Doris tables.
-doris.storageResource string "s3_default" The name of the storage policy resource used.
-doris.variantSchemaMode string Supported values: 'none', 'minimal', 'full'.
-dorisCluster string "default_cluster" The name of the Doris cluster.
-dorisFENode array The list of Doris FE node addresses, comma-separated.
-dorisHTTPPort int 8030 The HTTP port of Doris.
-dorisMySQLPort int 9030 The MySQL port of Doris.
-dorisPassword string The password for Doris.
-dorisUsername string "root" The username for Doris.
-enableTCP6 bool Whether to enable IPv6 listening and dialing. By default, only IPv4 is used.
-envflag.enable bool Whether to allow reading parameters from environment variables, with command-line parameters taking precedence.
-envflag.prefix string The prefix for environment variables, which takes effect only when reading from environment variables is enabled.
-filestream.disableFadvise bool Whether to disable the fadvise() system call, which can reduce CPU usage when reading large files but is generally not recommended to turn off.
-flagsAuthKey value The authentication key for the /flags endpoint. Supported to be read from a file or URL.
-fs.disableMmap bool Whether to use pread() instead of mmap() to read data files. By default, mmap() is used on 64-bit architectures and pread() is used on 32-bit architectures.
-globalReplicationFactor int 1 The number of replicas for each sample in the vmstorage group. Supports high availability.
-http.connTimeout duration 2m0s The timeout for HTTP connections, after which the connection is closed. 0 means no timeout.
-http.disableResponseCompression bool Whether to disable HTTP response compression to save CPU. By default, compression is enabled 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 The timeout for idle HTTP connections.
-http.maxGracefulShutdownDuration duration 7s The maximum duration for graceful shutdown of the HTTP server.
-http.pathPrefix string Add a prefix to all HTTP paths, suitable for proxy paths.
-http.shutdownDelay duration The delay before the HTTP server shuts down, during which /health returns non-OK, making it easier for load balancers to switch requests.
-httpAuth.password value The password for HTTP basic authentication, supported to be read from a file or URL.
-httpAuth.username string The username for HTTP basic authentication. If empty, authentication is disabled.
-httpListenAddr array The list of HTTP listening addresses, supports multiple values or comma-separated values.
-httpListenAddr.useProxyProtocol array Whether to enable the proxy protocol for the specified listening address. When enabled, the /metrics endpoint cannot be provided.
-insert.maxFutureTimeDrift duration 1h0m0s Events with timestamps greater than the current time plus this value will be rejected.
-insert.maxPastTimeDrift duration Events with timestamps less than the current time minus this value will be rejected.
-insertNode array The list of Guance-insert node addresses, comma-separated.
-internStringCacheExpireDuration duration 6m0s The TTL of the interned string cache.
-internStringDisableCache bool Whether to disable the interned string cache. Disabling it may reduce memory but increase CPU usage.
-internStringMaxLen int 500 The maximum length of interned strings. A lower value may reduce memory but increase CPU usage.
-loggerDisableTimestamps bool false Whether to disable timestamp writing in logs.
-loggerErrorsPerSecondLimit int 0 The limit on the number of error logs per second. Excess errors will be suppressed. 0 means no limit.
-loggerFormat string "default" The log format, options: "default" or "json".
-loggerJSONFields string - Rename fields in JSON format logs, e.g., "ts:timestamp,msg:message".
-loggerLevel string "INFO" The minimum log level, supported: INFO, WARN, ERROR, FATAL, PANIC.
-loggerMaxArgLen int 1000 The maximum length of a single log argument. Excess parts will be replaced with prefixes and suffixes.
-loggerOutput string "stderr" The log output location, supported: stderr and stdout.
-loggerTimezone string "UTC" The timezone used for log timestamps, must be a valid IANA timezone name.
-loggerWarnsPerSecondLimit int 0 The limit on the number of warning logs per second. Excess warnings will be suppressed. 0 means no limit.
-memory.allowedBytes size 0 The system memory size that VictoriaMetrics cache can use. If set, it overrides -memory.allowedPercent.
-memory.allowedPercent float 60 The 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 - The authentication key for the /metrics endpoint, supported to be read from a file or URL.
-pprofAuthKey value - The authentication key for the /debug/pprof/* endpoints, supported to be read from a file or URL.
-prevCacheRemovalPercent float 0.1 The percentage of service requests in the previous cache that, when below this value, will remove cache entries, improving memory usage efficiency but increasing CPU usage.
-pushmetrics.disableCompression bool false Whether to disable request body compression when pushing metrics.
-pushmetrics.extraLabel array - Additional labels to add when pushing metrics, e.g., instance="foo".
-pushmetrics.header array - Additional HTTP headers to add when pushing metrics.
-pushmetrics.interval duration 10s The interval for pushing metrics.
-pushmetrics.url array - The list of URLs to push metrics to.
-queryPermitRatio float 1 The ratio of query requests allowed.
-replicationFactor array 1 The number of replicas for each sample, supports key:value format.
-retentionFilters.cleanInterval duration 360h The interval for cleaning expired data.
-retentionFilters.config string - The path to the retention filter configuration file.
-retentionFilters.configCheckInterval duration 1h The interval for checking changes in the retention filter configuration file.
-scopeDB.dbName string "scopedb" The database name for ScopeDB.
-scopeDB.dumpIngestBody bool false Whether to print the ingestion body when it fails.
-scopeDB.ensureJob bool false Whether to enable the ensure job feature.
-scopeDB.indexCacheTTL duration 5m The TTL for the ScopeDB index cache.
-scopeDB.maxConcurrentIndexRequests int 32 The maximum number of concurrent index requests.
-scopeDB.node array - The list of ScopeDB node addresses.
-scopeDB.nodegroup.ctl string "query-meta" The name of the control plane node group.
-scopeDB.nodegroup.detailQuery string "detail-query" The name of the non-aggregation query node group.
-scopeDB.nodegroup.job string "job" The name of the job execution node group.
-scopeDB.nodegroup.largeQuery string "large-query" The name of the large query node group.
-scopeDB.nodegroup.query string "query" The name of the regular query node group.
-scopeDB.nodegroup.systemQuery string "system-query" The name of the system query node group from referrers like "func" and "kodo".
-scopeDB.nodesUpdateInterval duration 10s The interval for updating nodes.
-scopeDB.onlyUseBootstrapNodes bool false Whether to use only bootstrap nodes.
-scopeDB.password string - The password for ScopeDB.
-scopeDB.port uint 6543 The port for ScopeDB.
-scopeDB.storage.accessKeyID string - The access key ID for ScopeDB storage.
-scopeDB.storage.bucket string - The bucket for ScopeDB storage.
-scopeDB.storage.endpoint string - The endpoint for ScopeDB storage service.
-scopeDB.storage.prefix string - The prefix for ScopeDB storage.
-scopeDB.storage.region string - The region for ScopeDB storage.
-scopeDB.storage.secretAccessKey string - The secret access key for ScopeDB storage.
-scopeDB.storage.type string - The type of ScopeDB storage.
-scopeDB.username string - The username for ScopeDB.
-search.cacheTimestampOffset duration 5m The maximum time offset for query response data, avoiding response gaps due to clock synchronization 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 The CPU limit for cold data query SQL variables.
-search.dorisDisableADBC bool false Prefer Thrift over ADBC.
-search.dorisDisableSampling bool false Disable sampling.
-search.dorisEnableSmallColdGroup bool false Use a dedicated workgroup for small cold queries.
-search.dorisLargeColdQueryRowCount int - Deprecated, use search.minRowsForLargeQuery instead.
-search.dorisMaxCursorRows int 50000000 The maximum number of rows to scan in cursor queries.
-search.dorisMaxLiteralArraySize int 1000 The maximum number of elements in array literals.
-search.dorisMaxOrderingRows int - The maximum number of rows to scan in custom ordering queries.
-search.dorisMaxRowsForOrder int - The maximum number of rows to use for ORDER BY on non-time columns.
-search.dorisMaxSamplingRows int - Deprecated, use search.numRowsToSample instead.
-search.dorisThrottlerURL string - The API address for the throttler.
-search.latencyOffset duration 30s The delay after which data points become visible in query results after collection. It can be overridden by the latency_offset query parameter. A value too small may result in incomplete data points in query results.
-search.logImplicitConversion bool - Whether to log queries that involve implicit subquery conversion. For details, see Implicit Conversion Explanation. Can be disabled with -search.disableImplicitConversion.
-search.logQueryMemoryUsage size 524288000 (500MB) Log queries that use more than this amount of memory, facilitating the detection and optimization of large queries. Default is off. Supports KB, MB, GB, etc.
-search.maxConcurrentRequestsPerTenant int 5 The maximum number of concurrent query requests per tenant. A value too high can cause CPU and memory resource strain.
-search.maxExportDuration duration 720h (30 days) The maximum duration for calls to the /api/v1/export interface.
-search.maxGroups int 100000 The maximum number of groups allowed in query results.
-search.maxLabelsAPIDuration duration 5s The maximum response duration for /api/v1/labels, /api/v1/label/.../values, and /api/v1/series interfaces.
-search.maxLimit int 10000 The maximum number of rows allowed in query results.
-search.maxLookback duration Dynamic detection Synonymous with Prometheus's -search.lookback-delta. Can be overridden by the max_lookback parameter. Affects the lookback time window in queries.
-search.maxMemoryPerQuery size 0 The maximum memory allowed for a single query. Queries exceeding this limit will be rejected. Supports KB, MB, GB, etc.
-search.maxMetrics int 10000000 Deprecated, migrated to -search.maxShowUniqueTimeseries and -search.maxQueryUniqueTimeseries.
-search.maxPointsPerTimeseries int 30000 The maximum number of data points returned for a single time series in /api/v1/query_range, mainly limiting the number of points for plotting clients.
-search.maxPointsSubqueryPerTimeseries int 100000 The maximum number of data points generated per time series in subqueries. For details, see the related blog.
-search.maxQueryDuration duration 30s The maximum execution duration for queries.
-search.maxQueryLen size 16384 (16KB) The maximum length of a query statement. Supports KB, MB, etc.
-search.maxQueryUniqueTimeseries int 300000 The maximum number of unique time series allowed to be selected in /api/v1/query queries. Limits memory usage.
-search.maxQueueDuration duration 10s The maximum queuing time for requests when the maximum concurrent request limit is reached.
-search.maxResponseSeries int 0 (no limit) The maximum number of time series returned in /api/v1/query and /api/v1/query_range. 0 means no limit.
-search.maxSamplesPerQuery int 1000000000 The maximum number of raw samples scanned in a single query. Prevents resource exhaustion from overly large queries.
-search.maxSamplesPerSeries int 30000000 The maximum number of raw samples scanned per time series.
-search.maxSeriesPerAggrFunc int 1000000 The maximum number of time series generated by aggregation functions.
-search.maxShowUniqueTimeseries int 10000000 The maximum number of time series allowed to be displayed by show functions. Limits memory usage.
-search.maxStalenessInterval duration Dynamic calculation The maximum time interval for staleness calculation, automatically calculated based on the median interval of samples by default.
-search.maxStatusRequestDuration duration 5m0s The maximum response time for /api/v1/status/* requests.
-search.maxStepForPointsAdjustment duration 1m0s The maximum step for adjusting points in /api/v1/query_range when the distance to the current time is less than latencyOffset.
-search.maxWorkersPerQuery int 2 The maximum number of CPU cores allowed for a single query. Can be adjusted to optimize performance, but cannot exceed the number of physical CPU cores.
-search.minRowsForLargeQuery int 10000000 The minimum number of rows to scan for large queries.
-search.minStalenessInterval duration - The minimum time interval for staleness calculation, used to remove chart gaps caused by irregular sampling intervals.
-search.minTimeRangeForLargeQuery duration 12h0m0s The minimum time range for large queries.
-search.minWindowForInstantRollupOptimization duration 3h The minimum window value for enabling cache optimization for instant queries with lookback windows.
-search.noStaleMarkers bool false If the database has no Prometheus staleness markers, setting this to true can save CPU resources.
-search.queryStats.lastQueriesCount int 20000 The number of recent queries tracked by /api/v1/status/top_queries. 0 disables tracking.
-search.queryStats.minQueryDuration duration 1ms The minimum query duration threshold for statistics. Queries shorter than this are ignored.
-search.resetRollupResultCacheOnStartup bool false Whether to reset the rollup result cache on startup.
-search.rowsToSample int 10000000 The maximum number of rows to scan for sampling queries.
-search.rowsToSampleForFacet int 10000000 The maximum number of rows to scan for show_x_field or distinct queries.
-search.scopeDB.firstCursorScanRows int 10000000 The maximum number of rows to scan in the first cursor pagination query.
-search.scopeDB.logQuery bool true Whether to log ScopeDB query statements.
-search.scopeDB.maxLiteralArraySize int 1000 The maximum number of elements in array literals.
-search.scopeDB.maxRowsForOrder int 100000 The maximum number of rows for ORDER BY on non-time columns.
-search.scopeDB.maxTimeRange duration - The 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, potentially improving query speed but risking incomplete data.
-search.treatDotsAsIsInRegexps bool false Whether to filter dot characters in regular expressions. This option is deprecated; it is recommended to use graphite syntax.
-slowQueryDuration duration 1s Queries that exceed this duration will be logged as slow queries.
-storageNode array - The array of guance-storage node addresses, comma-separated or specified multiple times.
-streamaggr.cleanupInterval duration 10m0s The interval for cleaning up expired queries.
-streamaggr.dataBlocksCacheSize int 157286400 (150MB) The size of the data block cache.
-streamaggr.ignoreContinuousCheck bool false Whether to ignore continuity checks.
-streamaggr.indexBlocksCacheSize int 52428800 (50MB) The size of the index block cache.
-streamaggr.queryRetentionPeriod duration 168h0m0s (7 days) The retention period for queries.
-streamaggr.retentionMonths int 6 The number of months to retain stream aggregation data.
-streamaggr.selectVerify bool false Whether to verify stream aggregation results.
-tls array None Whether to enable TLS (i.e., HTTPS) for the specified -httpListenAddr. When setting this parameter, -tlsCertFile and -tlsKeyFile must also be set. Supports multiple values separated by commas or specified multiple times. An empty value is treated as false.
-tlsCertFile array None The path to the TLS certificate file for the corresponding -httpListenAddr. It is recommended to use ECDSA certificates instead of RSA certificates, as RSA certificates are slower. The certificate file is automatically re-read every second, allowing for dynamic updates. Supports multiple values.
-tlsCipherSuites array None An optional list of TLS cipher suites to use for HTTPS requests when TLS is enabled. Supports multiple values. For a detailed list of supported cipher suites, see: https://pkg.go.dev/crypto/tls#pkg-constants
-tlsKeyFile array None The path to the TLS key file for the corresponding -httpListenAddr. The key file is automatically re-read every second, allowing for dynamic updates. Supports multiple values.
-tlsMinVersion array None The minimum TLS version to allow (optional). Supports TLS10, TLS11, TLS12, TLS13. Supports multiple values.
-version No parameter None Display the version information of VictoriaMetrics.
-vmstorageDialTimeout duration 3s The timeout for establishing an RPC connection between vmselect and vmstorage. See -vmstorageUserTimeout for details.
-vmstorageUserTimeout duration 3s The network timeout for RPC connections between vmselect and vmstorage (Linux only). A lower value reduces the maximum query duration in case of network failures. See TCP_USER_TIMEOUT for details.
-zipkin.batchSize int 100 The maximum number of Spans to send in a single batch.
-zipkin.bufferSize int 10000 The maximum number of Spans to buffer.
-zipkin.endpoint string None The endpoint URL of the Zipkin collector, e.g., http://localhost:9529.
-zipkin.flushPeriod duration 1s The maximum interval between flushes.
-zipkin.serviceName string guance-select The service name used in Zipkin Spans.

Guance Insert Parameter Description

Parameter Name Type Default Value Description
-blockcache.missesBeforeCaching int 2 The number of cache misses before a cache block is placed into the cache. A higher value may reduce cache size but increase CPU and disk read pressure.
-cacheExpireDuration duration 30m0s Data in the memory cache is removed after being unaccessed for a certain period. A smaller value may reduce memory usage but increase CPU usage.
-denyQueryTracing None 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 nodes write slowly. Turning off this feature can reduce active time series during rolling restarts.
-disableReroutingOnUnavailable None None Whether to disable rerouting when vmstorage nodes are unavailable. When disabled, data writing stops if a node is unavailable, reducing the impact during restarts or drastic sequence changes.
-doris.cacheDataPath string /data/file-queue The path to the cache file.
-doris.coldDataTierOnly None None Use only the cold data storage tier.
-doris.debugIndexName string default The indexName to add debug logs for.
-doris.debugMeasurement string None The measurement to add debug logs for.
-doris.debugNamespace string None The namespace to add debug logs for.
-doris.debugTenantID uint None The tenant ID (accountID) to add debug logs for.
-doris.disableBFOnNewTables None None Do not enable Bloom filters for new tables.
-doris.disableKeepAlives None None Disable keep-alive in stream load.
-doris.disableUnicodeTokenizer None None Use a Chinese tokenizer instead of a Unicode tokenizer.
-doris.enableBFOnOldTables None None Enable Bloom filters for old tables.
-doris.enableFileCacheTTL None None Enable cloud database SelectDB data cache: https://help.aliyun.com/document_detail/2638759.html
-doris.enableWarmDataTier None None Enable hot + warm storage mode instead of hot + cold mode.
-doris.forceFlushInterval duration 30s The forced flush interval for non-event data.
-doris.indexCacheTTL duration 30m0s The TTL for the Doris index cache.
-doris.loadToSingleTablet None None Use the load_to_single_tablet header in stream load requests.
-doris.maxCacheSize size 0 Deprecated, use fileQueue.maxTotalSize instead. The maximum number of bytes for total cached data.
-doris.maxConcurrentInserts int None Deprecated, use fileQueue.workers instead.
-doris.maxFieldCount size 512 The maximum number of fields allowed per measurement. Supports KB, MB, GB, etc.
-doris.maxFieldSize size 33554432 The maximum byte size for a single field. Supports KB, MB, GB, etc.
-doris.maxSizePerRequest size 0 Deprecated, use fileQueue.maxFileSize instead. The maximum size of a single line in a single parse.
-doris.onlyQueryFE None None When enabled, query data only from FE nodes, not directly from BE.
-doris.onlyWriteFE None None When enabled, write data only to FE nodes, not directly to BE.
-doris.replicationFactor int 1 The replication factor for Doris tables.
-doris.sampleIndexName string None The sample index name.
-doris.sampleInsertRatio int None The sample insert ratio.
-doris.sampleInterval value 1s The sample interval time, supports s/m/h/d/w/y as units. Defaults to monthly.
-doris.sampleNamespace string None The sample namespace.
-doris.sampleTenantID string None The sample tenant ID.
-doris.storageResource string s3_default The name of the storage policy resource used by Doris.
-doris.variantSchemaMode string None The schema mode, supports 'none', 'minimal', 'full'.
-dorisCluster string default_cluster The name of the Doris cluster.
-dorisFENode array None The Doris-FE node addresses (multiple values separated by commas).
-dorisHTTPPort int 8030 The HTTP port of Doris.
-dorisMySQLPort int 9030 The MySQL port of Doris.
-dorisPassword string None The password for connecting to Doris.
-dorisUsername string root The username for connecting to Doris.
-dropSamplesOnOverload None None Whether to discard samples if vmstorage nodes are overloaded or unavailable to ensure cluster availability. Note that this operation is performed before replication, so use with caution.
-enableTCP6 None None Whether to enable IPv6 listening and dialing. By default, only IPv4 is enabled.
-envflag.enable None None Whether to allow reading parameters from environment variables. Command-line parameters take precedence. See: https://docs.victoriametrics.com/#environment-variables
-envflag.prefix string None The prefix for environment variables (requires -envflag.enable to be enabled).
-fileQueue.maxFileSize size 104857600 The maximum size of a single file in the file queue (default 100MB).
-fileQueue.maxTotalSize size 3758096384 The total size limit of the file queue (default 3.5GB).
-fileQueue.workers int 8 The maximum number of concurrent threads for inserting into ScopeDB or Doris.
-filedb.maxFileSize int 10485760 The maximum file size for filedb (default 10MB).
-filestream.disableFadvise None None Whether to disable the fadvise() system call, which prevents recently accessed data from being evicted from the OS cache when reading large files.
-flagsAuthKey value None The authentication key for the /flags interface. Can be read from a file or URL.
-fs.disableMmap None None Whether to disable mmap() and use pread() to read data files. By default, mmap() is enabled on 64-bit systems.
-gcolumnCompressLevel int None The compression level for the guance column protocol. Higher values compress better but consume more CPU; negative values reduce CPU usage but increase network transmission.
-http.connTimeout duration 2m0s The timeout for HTTP connections. Can be used to make load balancers distribute traffic more evenly. 0 means no timeout.
-http.disableResponseCompression None None Whether to disable HTTP response compression to save CPU. By default, compression is enabled to save network bandwidth.
-http.header.csp string None Set the Content-Security-Policy header value, recommended value: "default-src 'self'".
-http.header.frameOptions string None Set the X-Frame-Options header value.
-http.header.hsts string None Set the Strict-Transport-Security header value, recommended value: "max-age=31536000; includeSubDomains".
-http.idleConnTimeout duration 1m0s The timeout for idle HTTP connections.
-http.maxGracefulShutdownDuration duration 7s The maximum wait time for graceful shutdown of the HTTP service. High-load servers may need a higher value.
-http.pathPrefix string None The prefix for all HTTP paths, e.g., setting to /foo/bar will make all paths start with this, facilitating reverse proxy.
-http.shutdownDelay duration None The delay before the HTTP service shuts down. During this time, the /health interface returns non-OK, notifying load balancers to switch traffic.
-httpAuth.password value None The password for HTTP Basic Auth. Authentication is disabled if the username is empty. Can be loaded from a file or URL.
-httpAuth.username string None The username for HTTP Basic Auth. If empty, authentication is disabled. Requires -httpAuth.password to be set.
-httpListenAddr array None The HTTP service listening address. 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 multiple values separated by commas or specified multiple times. An empty value is treated as false.
-influx.defaultBatchLinesCount size 16 The default number of lines per batch for InfluxDB parsing. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB.
-influx.defaultBatchSize size 1048576 The default byte size per batch for InfluxDB parsing. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB.
-insert.maxFutureTimeDrift duration 1h0m0s Events with timestamps greater than the current time plus this value will be rejected during insertion.
-insert.maxPastTimeDrift duration Events with timestamps less than the current time minus this value will be rejected during insertion.
-insertNode array The addresses of guance-insert nodes, multiple values separated by commas, supports values with quotes or brackets.
-internStringCacheExpireDuration duration 6m0s The expiration duration for interned string cache. See: https://en.wikipedia.org/wiki/String_interning.
-internStringDisableCache false Whether to disable the interned string cache. Disabling it may reduce memory usage but increase CPU usage.
-internStringMaxLen int 500 The maximum length of interned strings. Setting a lower value may reduce memory usage but increase CPU usage.
-loggerDisableTimestamps false Whether to disable timestamp writing in logs.
-loggerErrorsPerSecondLimit int The maximum number of ERROR logs allowed per second. Excess errors will be suppressed. 0 means no limit.
-loggerFormat string default The log format, options: default, json.
-loggerJSONFields string - Rename fields in JSON format logs, e.g., "ts:timestamp,msg:message". Supported fields: ts, level, caller, msg.
-loggerLevel string INFO The minimum log level, supported: INFO, WARN, ERROR, FATAL, PANIC.
-loggerMaxArgLen int 1000 The maximum length of a single log argument. Excess parts will be replaced with prefixes and suffixes.
-loggerOutput string stderr The log output location, supported: stderr, stdout.
-loggerTimezone string UTC The timezone used for log timestamps, must be a valid IANA timezone name, e.g., America/New_York, Etc/GMT+3, or Local.
-loggerWarnsPerSecondLimit int The maximum number of WARN logs allowed per second. Excess warnings will be suppressed. 0 means no limit.
-maxConcurrentInserts int 24 The maximum number of concurrent insert requests allowed. The default value is suitable for most cases and can be increased when the network is slow.
-maxInsertRequestSize size 134217728 The maximum byte size for a single gcolumn insert request. Supports unit suffixes: KB, MB, GB, TB, KiB, MiB, GiB, TiB.
-maxLabelValueLen int 16384 The maximum length of label values in received time series. Excess parts will be truncated, and the vm_too_long_label_values_total metric on the /metrics page will increase.
-maxLabelsPerTimeseries int 256 The maximum number of labels allowed per time series. Excess labels will be discarded, and the vm_metrics_with_dropped_labels_total metric on the /metrics page will increase.
-memory.allowedBytes size 0 The maximum system memory that VictoriaMetrics cache can occupy (in bytes). If non-zero, it overrides -memory.allowedPercent. Setting it too small increases cache misses, and setting it too large may affect the OS page cache.
-memory.allowedPercent float 60 The percentage of system memory that VictoriaMetrics cache can occupy. Setting it too small may increase CPU and disk IO, and setting it too large may affect the page cache.
-metrics.exposeMetadata false Whether to expose TYPE and HELP metadata on the /metrics page. Some systems (e.g., Google Cloud Managed Prometheus) require this information.
-metricsAuthKey value The authentication key for the /metrics endpoint, can be passed via the authKey query parameter. Supports reading the key from a file or URL.
-pprofAuthKey value The authentication key for the /debug/pprof/* endpoints, can be passed via the authKey query parameter. Supports reading the key from a file or URL.
-prevCacheRemovalPercent float 0.1 The percentage of old cache hits below which entries are removed. Higher values reduce memory usage but may increase CPU usage.
-pushmetrics.disableCompression false Whether to disable request body compression when pushing metrics to each -pushmetrics.url.
-pushmetrics.extraLabel array Extra labels to add when pushing metrics to each -pushmetrics.url, e.g., -pushmetrics.extraLabel='instance="foo"'. Supports commas, quotes, and brackets.
-pushmetrics.header array HTTP Headers to include when pushing metrics to each -pushmetrics.url, e.g., Authorization: Basic foobar. Supports commas, quotes, and brackets.
-pushmetrics.interval duration 10s The interval for pushing metrics to each -pushmetrics.url.
-pushmetrics.url array The target addresses to push /metrics page data to. By default, no pushing is done. Supports multiple addresses and complex syntax.
-relabelConfig string The path to the relabeling rules configuration file (local or http address). Automatically reloaded upon receiving SIGHUP. See: https://docs.victoriametrics.com/#relabeling
-replicationFactor int 1 The number of replicas for data, i.e., the number of copies of each data on different -storageNode. If this value >1, vmselect must set -dedup.minScrapeInterval=1ms for deduplication.
-retentionFilters.cleanInterval duration 360h0m0s The interval for cleaning expired data.
-retentionFilters.config string The path to the retention policy configuration file.
-retentionFilters.configCheckInterval duration 1h0m0s The interval for checking changes in the retention policy configuration file.
-rpc.disableCompression false Whether to disable compression when sending data from vminsert to vmstorage. Disabling it reduces CPU usage but increases network bandwidth usage.
-scopeDB.dbName string scopedb The database name for ScopeDB.
-scopeDB.dumpIngestBody false Whether to output the request body content when insertion fails.
-scopeDB.ensureJob false Whether to enable ensure job.
-scopeDB.indexCacheTTL duration 5m0s The TTL for the ScopeDB index cache.
-scopeDB.maxConcurrentIndexRequests int 32 The maximum number of concurrent index requests allowed for ScopeDB.
-scopeDB.maxFieldCount size 512 The maximum number of fields per index.
-scopeDB.maxFieldSize size 33554432 The maximum byte size for a single gcolumn field.
-scopeDB.node array The list of ScopeDB node addresses, supports multiple formats.
-scopeDB.nodegroup.ctl string ingest-meta The ScopeDB node group used by the control plane.
-scopeDB.nodegroup.ingest string ingest The ScopeDB node group used for data ingestion.
-scopeDB.nodesUpdateInterval duration 10s The interval for updating ScopeDB node information.
-scopeDB.onlyUseBootstrapNodes bool false Whether to use only bootstrap nodes.
-scopeDB.password string The access password for ScopeDB.
-scopeDB.port uint 6543 The access port for ScopeDB.
-scopeDB.username string The username for ScopeDB.
-search.debugThrottler bool false Debug the throttler.
-search.denyPartialResponse bool false Whether to deny partial responses (improves consistency at the cost of availability).
-search.dorisColdQueryCPULimit int 4 The CPU limit for cold data queries in Doris.
-search.dorisDisableADBC bool false Whether to disable ADBC (prefer Thrift).
-search.dorisDisableSampling bool false Whether to disable sampling.
-search.dorisEnableSmallColdGroup bool false Enable a dedicated workgroup for small cold queries.
-search.dorisMaxCursorRows int 50000000 The maximum number of rows to scan in cursor queries.
-search.dorisMaxLiteralArraySize int 1000 The maximum number of elements in literal value arrays.
-search.dorisMaxOrderingRows int The maximum number of rows to scan in custom ordering queries.
-search.dorisMaxRowsForOrder int The maximum number of rows for ORDER BY on non-time columns.
-search.dorisThrottlerURL string The API address for the Throttler.
-search.logQueryMemoryUsage size 524288000 Log queries that use more than the specified amount of memory.
-search.maxExportDuration duration 720h0m0s The maximum duration for /api/v1/export requests.
-search.maxGroups int 100000 The maximum number of groups allowed in query results.
-search.maxLabelsAPIDuration duration 5s The maximum response duration for /api/v1/labels, /api/v1/label/.../values, and /api/v1/series requests.
-search.maxLimit int 10000 The maximum number of rows allowed in query results.
-search.maxMemoryPerQuery size 0 The maximum memory allowed for a single query. Queries exceeding this limit will be rejected. Supports KB, MB, GB, etc.
-search.maxQueryDuration duration 30s The maximum execution duration for queries.
-search.maxStatusRequestDuration duration 5m0s The maximum response duration for /api/v1/status/* requests.
-search.minTimeRangeForLargeQuery duration 12h0m0s The minimum time range for large queries.
-search.scopeDB.firstCursorScanRows int 10000000 The number of rows to scan in the first cursor pagination query.
-search.scopeDB.logQuery bool true Whether to log ScopeDB query statements.
-search.scopeDB.maxLiteralArraySize int 1000 The maximum number of elements in literal value arrays.
-search.scopeDB.maxRowsForOrder int 100000 The maximum number of rows for ORDER BY on non-time columns.
-search.scopeDB.maxTimeRange duration The maximum time range for queries.
-sortLabels bool false Whether to sort labels before writing to storage, reducing memory usage but potentially decreasing write performance.
-storageNode array The list of guance-storage node addresses, supports multiple formats.
-streamaggr.cleanupInterval duration 10m0s The interval for cleaning up expired queries.
-streamaggr.dataBlocksCacheSize int 157286400 The size of the data block cache (in bytes).
-streamaggr.ignoreContinuousCheck bool false Whether to ignore continuous checks.
-streamaggr.indexBlocksCacheSize int 52428800 The size of the index block cache (in bytes).
-streamaggr.insertVerify bool false Enable streamaggr verification mode.
-streamaggr.queryRetentionPeriod duration 168h0m0s The retention period for queries.
-streamaggr.replay bool false Enable streamaggr replay mode.
-streamaggr.retentionMonths int 6 The number of months to retain stream aggregation data.
-streamaggrDataPath string The path to store data.
-tls array Whether to enable TLS for the specified httpListenAddr. Requires setting -tlsCertFile and -tlsKeyFile.
-tlsCertFile array The path to the TLS certificate file, supports dynamic updates.
-tlsCipherSuites array An optional list of TLS cipher suites.
-tlsKeyFile array The path to the TLS key file, supports dynamic updates.
-tlsMinVersion array The minimum TLS version (TLS10, TLS11, TLS12, TLS13).
-usePromCompatibleNaming bool false Whether to replace unsupported Prometheus characters with underscores.
-version bool false Display the version information of VictoriaMetrics.
-vmstorageDialTimeout duration 3s The timeout for establishing an RPC connection from vminsert to vmstorage.
-vmstorageUserTimeout duration 3s The network timeout for connections from vminsert to vmstorage (Linux only).
-zipkin.batchSize int 100 The maximum number of spans to send in a single batch.
-zipkin.bufferSize int 10000 The maximum number of spans to buffer.
-zipkin.endpoint string The endpoint URL of the Zipkin collector.
-zipkin.flushPeriod duration 1s The maximum interval between flushes.
-zipkin.serviceName string guance-insert The service name used in Zipkin Spans.

Guance Storage Parameter Description

Parameter Name Type Default Value Description
-bigMergeConcurrency int None Deprecated: This parameter no longer has any effect.
-blockcache.missesBeforeCaching int 2 The number of cache misses before a cache block is placed into the cache. A higher value may reduce the size of the indexdb/dataBlocks cache but increase CPU and disk read operations.
-cacheExpireDuration duration 30m0s Unaccessed entries in the memory cache are removed after this duration. A lower value may reduce memory usage but increase CPU usage. See -prevCacheRemovalPercent.
-dedup.minScrapeInterval duration None Only the last sample within each discrete interval is retained for each time series. Must be set greater than 0. See deduplication documentation.
-denyQueriesOutsideRetention bool false Whether to deny queries for data outside the configured -retentionPeriod. When enabled, /api/v1/query_range returns 503 for queries outside the retention period.
-denyQueryTracing bool false Whether to disable query tracing. See query tracing documentation.
-enableTCP6 bool false Whether to enable IPv6 for listening and dialing. By default, only IPv4 is enabled.
-envflag.enable bool false Whether to enable reading parameters from environment variables, with command-line parameters taking precedence. If not enabled, parameters are only read from the command line. See environment variable documentation.
-envflag.prefix string None The prefix for environment variables 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 from the system cache. Disabling it may reduce CPU usage in some cases.
-finalMergeDelay duration None Deprecated: This parameter no longer has any effect.
-flagsAuthKey value None The authentication key for the /flags endpoint, must be passed via the authKey query parameter. Supports reading the key value from a file or HTTP(S) URL.
-forceFlushAuthKey value None The authentication key required for the /internal/force_flush page, supports reading from a file or HTTP(S) URL.
-forceMergeAuthKey value None The authentication key required for the /internal/force_merge page, supports reading from a file or HTTP(S) URL.
-fs.disableMmap bool false Whether to use pread() instead of mmap() to read data files. By default, mmap() is used on 64-bit architectures and pread() is used on 32-bit architectures. mmap() is faster for reading small data blocks.
-http.connTimeout duration 2m0s The timeout for closing connections to -httpListenAddr. Helps load balancers distribute requests evenly. 0 disables timeout.
-http.disableResponseCompression bool false Whether to disable HTTP response compression. By default, compression is enabled to save network bandwidth. Disabling it 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 None 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 shown.
-http.idleConnTimeout duration 1m0s The timeout for closing idle HTTP connections.
-http.maxGracefulShutdownDuration duration 7s The maximum wait time for graceful shutdown of the HTTP server. High-load servers may need to increase this value.
-http.pathPrefix string None Add a prefix to all HTTP paths, e.g., for proxy path prefixes. See related documentation.
-http.shutdownDelay duration None The delay before the HTTP server shuts down. During this time, /health returns non-OK status, making it easier for load balancers to switch requests.
-httpAuth.password value None The password for HTTP basic authentication. Authentication is disabled if the username is not set. Supports reading from a file or HTTP(S) URL.
-httpAuth.username string None The username for HTTP basic authentication. If not set, authentication is disabled.
-httpListenAddr array None The HTTP listening address. Supports multiple values or complex formats.
-httpListenAddr.useProxyProtocol array false Whether to enable Proxy Protocol for the specified listening address. When enabled, the regular /metrics endpoint cannot be used. See HAProxyProxy documentation.
-inmemoryDataFlushInterval duration 5s The interval for flushing in-memory data to disk, saving data in case of abnormal shutdown. A larger interval increases flash lifespan, while a smaller interval increases disk IO load. Minimum 1 second.
-insert.maxQueueDuration duration 1m0s The maximum queuing time for insert requests when the maximum concurrent inserts are reached.
-internStringCacheExpireDuration duration 6m0s The TTL for the interned string cache. See string interning mechanism.
-internStringDisableCache bool false Whether to disable the interned string cache. Disabling it reduces memory but increases CPU usage.
-internStringMaxLen int 500 The maximum length of interned strings. A lower value saves memory but increases CPU usage.
-logNewSeries bool false Whether to log new time series. Only used for debugging, may affect performance.
-loggerDisableTimestamps bool None Whether to disable timestamps in logs.
-loggerErrorsPerSecondLimit int 0 The maximum number of ERROR logs allowed per second. Excess logs will be suppressed. 0 means no limit.
-loggerFormat string "default" The log format. Options: default, json (default "default").
-loggerJSONFields string None Rename fields in JSON format logs. For example, "ts:timestamp,msg:message" will rename "ts" to "timestamp" and "msg" to "message". Supported fields: ts, level, caller, msg.
-loggerLevel string "INFO" The minimum log level. Options: INFO, WARN, ERROR, FATAL, PANIC (default "INFO").
-loggerMaxArgLen int 1000 The maximum length of a single log argument. Arguments exceeding this length will be truncated and displayed as 'arg_start..arg_end', with the prefix and suffix lengths not exceeding -loggerMaxArgLen / 2.
-loggerOutput string "stderr" The log output location. Options: stderr, stdout (default "stderr").
-loggerTimezone string "UTC" The timezone used for log timestamps. The timezone must be a valid IANA timezone name, such as America/New_York, Europe/Berlin, Etc/GMT+3, or Local (default "UTC").
-loggerWarnsPerSecondLimit int 0 The maximum number of WARN logs allowed per second. Excess logs will be suppressed. 0 means no limit.
-maxConcurrentInserts int 4 The maximum number of concurrent insert requests. Can be increased for slow client networks. The default value is set based on the number of CPU cores and is generally suitable. See -insert.maxQueueDuration.
-memory.allowedBytes size 0 The maximum system memory that VictoriaMetrics cache can occupy (in bytes). If set to a non-zero value, it overrides -memory.allowedPercent. A value too low increases cache misses, leading to higher CPU and disk IO. Supports unit suffixes KB, MB, GB, etc.
-memory.allowedPercent float 60 The percentage of system memory that VictoriaMetrics cache can occupy. See -memory.allowedBytes. A value too low increases cache misses, while a value too high may lead to more disk IO.
-metrics.exposeMetadata bool None Whether to expose TYPE and HELP metadata on the /metrics page. Some systems (e.g., Google Cloud Managed Prometheus) require this information.
-metricsAuthKey string None The authentication key for the /metrics endpoint. Passed via the authKey query parameter, takes precedence over httpAuth.* settings. Can be read from a file or HTTP/HTTPS URL.
-pprofAuthKey string None The authentication key for the /debug/pprof/* endpoints. Passed via the authKey query parameter, takes precedence over httpAuth.* settings. Can be read from a file or HTTP/HTTPS URL.
-precisionBits int 64 The number of precision bits stored per value. Fewer bits increase compression but reduce precision. (Default 64)
-prevCacheRemovalPercent float 0.1 The percentage of service requests in the previous cache that, when below this value, will remove cache entries. Increasing this value reduces memory usage but increases CPU usage. See -cacheExpireDuration.
-pushmetrics.disableCompression bool None Whether to disable request body compression when pushing metrics to all -pushmetrics.url.
-pushmetrics.extraLabel array None Extra labels to add when pushing metrics to all -pushmetrics.url. For example, -pushmetrics.extraLabel='instance="foo"'. Supports arrays and multiple settings.
-pushmetrics.header array None HTTP headers to add when pushing metrics to all -pushmetrics.url. For example, -pushmetrics.header='Authorization: Basic foobar'. Supports arrays and multiple settings.
-pushmetrics.interval duration 10s The interval for pushing metrics to all -pushmetrics.url.
-loggerDisableTimestamps bool false Whether to disable timestamps in logs.
-loggerErrorsPerSecondLimit int 0 The maximum number of ERROR messages allowed per second. Excess logs will be suppressed. 0 means no limit.
-loggerFormat string "default" The log format. Options: default, json.
-loggerJSONFields string "" Rename fields in JSON format logs. For example, "ts:timestamp,msg:message" renames "ts" to "timestamp". Supported fields: ts, level, caller, msg.
-loggerLevel string "INFO" The minimum log level. Options: INFO, WARN, ERROR, FATAL, PANIC.
-loggerMaxArgLen int 1000 The maximum length of a single log argument. Arguments exceeding this length will be truncated as 'arg_start..arg_end'.
-loggerOutput string "stderr" The log output location. Options: stderr, stdout.
-loggerTimezone string "UTC" The timezone used for log timestamps. Must be a valid IANA timezone name, such as America/New_York.
-loggerWarnsPerSecondLimit int 0 The maximum number of WARN messages allowed per second. Excess logs will be suppressed. 0 means no limit.
-maxConcurrentInserts int 4 The maximum number of concurrent write requests. The default is set automatically based on the number of CPU cores.
-memory.allowedBytes size 0 The maximum system memory that VictoriaMetrics cache can use. Takes precedence over -memory.allowedPercent. Supports units KB, MB, GB, etc.
-memory.allowedPercent float 60 The 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 "" The authentication key for the /metrics endpoint. Supports reading from a file or URL.
-pprofAuthKey string "" The authentication key for the /debug/pprof/* endpoints. Supports reading from a file or URL.
-precisionBits int 64 The number of precision bits stored per value. A lower value increases compression but reduces precision.
-prevCacheRemovalPercent float 0.1 The percentage threshold for removing entries from the previous cache. A higher value reduces memory usage but increases 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, e.g., Authorization.
-pushmetrics.interval duration 10s The interval for pushing metrics.
-pushmetrics.url array [] The list of remote URLs to push metrics to. By default, no pushing is done.
-retentionFilters.cleanInterval duration 360h The interval for cleaning expired data.
-retentionFilters.config string "" The path to the retention filter configuration file.
-retentionFilters.configCheckInterval duration 1h The interval for checking changes in the retention filter configuration file.
-retentionPeriod value 1 The data retention period. Data older than this period is automatically deleted. Supports units s, m, h, d, w, y.
-retentionTimezoneOffset duration 0 The timezone offset for indexdb rotation. 0 means UTC 4 AM.
-rpc.disableCompression bool false Whether to disable compression between vmstorage and vmselect. Disabling it reduces CPU usage but increases network bandwidth.
-search.maxConcurrentRequests int 4 The maximum number of concurrent vmselect requests that vmstorage can handle.
-search.maxQueueDuration duration 10s The maximum queuing time for requests.
-search.maxTagKeys int 100000 The maximum number of tag keys returned in a single search.
-search.maxTagValues int 100000 The maximum number of tag values returned in a single search.
-search.maxUniqueTimeseries int 0 The maximum number of unique time series that can be scanned in a query. 0 means no limit.
-smallMergeConcurrency int (Deprecated) Deprecated, no longer has any effect.
-snapshotAuthKey string "" The authentication key for the /snapshot* pages. Supports reading from a file or URL.
-snapshotCreateTimeout duration (Deprecated) Deprecated, no longer has any effect.
-snapshotsMaxAge value 0 Automatically delete snapshots older than this age. Supports units s, m, h, d, w, y.
-storage.cacheSizeIndexDBDataBlocks size 0 The maximum size of the indexdb/dataBlocks cache.
-storage.cacheSizeIndexDBIndexBlocks size 0 The maximum size of the indexdb/indexBlocks cache.
-storage.cacheSizeIndexDBTagFilters size 0 The maximum size of the indexdb/tagFiltersToMetricIDs cache.
-storage.cacheSizeStorageTSID size 0 The maximum size of the storage/tsid cache.
-storage.maxDailySeries int 0 The maximum number of unique series that can be created in 24 hours. Excess series will be discarded and logged.
-storage.maxHourlySeries int 0 The maximum number of unique series that can be created in 1 hour. Excess series will be discarded and logged.
-storage.maxSeriesPerSecond int 2000 The maximum number of series that can be created per second. Excess series will be discarded and logged.
-storage.minFreeDiskSpaceBytes size 10000000 The minimum free disk space for the storage path. If the available space is below this value, the storage stops accepting data.
-storage.vminsertConnsShutdownDuration duration 25s The time required for gracefully closing vminsert connections. Controls the shutdown speed to reduce load fluctuations.
-storageDataPath string "vmstorage-data" The path to store data.
-tls array [] Whether to enable TLS for the specified HTTP listening address. Requires setting the certificate and key files.
-tlsCertFile array [] The path to the TLS certificate file. Supports dynamic updates.
-tlsCipherSuites array [] The list of TLS cipher suites.
-tlsKeyFile array [] The path to the TLS key file. Supports dynamic updates.
-tlsMinVersion array [] The minimum TLS version required. Supports TLS10, TLS11, TLS12, TLS13.
-version bool false Display the version of VictoriaMetrics.
-vminsertAddr string ":8400" The listening address for the vminsert service.
-vmselectAddr string ":8401" The listening address for the vmselect service.

Feedback

Is this page helpful? ×