---
title: "Install considerations"
description: "Explore advanced configuration for ITRS Analytics Query Service using KOTS Admin Console, including storage, resource allocation, and batch processing settings."
url: "https://docs.itrsgroup.com/docs/itrs-analytics/app/query-service/2.33.0/user-guide/install/index.html"
---
## KOTS advanced configuration

When configuring advanced settings in your ITRS Analytics deployment using the KOTS Admin Console, use the `iax-*` wrapper names in your Helm overrides. These names correspond to the keys defined in the Helm values and are the entry points for configuration.

Settings defined under the `iax-*` keys are applied to the corresponding underlying `obcerv-*` components.

For example:

```yaml
iax-app-query-service:
  sink:
    signalsSubscribeFrom: "P0D"
```

Use the `iax-app-query-service` prefix for all related configuration sections, including `db`, `bff`, `sink`, and `maintenance`, when defining overrides in the KOTS Admin Console.

## Storage

The Persistent Volume Claims (PVC) used by the Query Service are:

| PVC                     | Mount  |
|-------------------------|--------|
| app-query-service-data  | /data  |
| app-query-service-wal   | /wal   |

The allocated storage can be changed by modifying the PVCs in Kubernetes, or the defaults can be overridden at install
time by setting `db.dataDiskSize` and `db.walDiskSize` in the chart config file.

```
iax-app-query-service
db:
  dataDiskSize: 20Gi
  walDiskSize: 5Gi
```

## Storage class

It is recommended to use a dedicated, high-performance disk for the Query Service database. If not specified, the Query Service DB will use the default storage class defined for the cluster.

To change the storage class, set  both `dataStorageClass` and `walStorageClass` in the values file.

```
db:
 dataStorageClass: "<name of the storage class>"
 walStorageClass: "<name of the storage class>"
```

## Resource allocation

The app deploys a query service and a database with the following default resource allocations:

```yaml
bff:   
  threadPoolSize: 20
  resources: 
    requests: 
      memory: "512Mi"
      cpu: "200m"
    limits: 
      memory: "2Gi"
      cpu: "1"
db:
  resources: 
    requests: 
      memory: "4Gi"
      cpu: "1"
    limits: 
      memory: "8Gi"
      cpu: "4"
```

The following additional parameters are available:

- `bff.threadPoolSize` — determines how many parallel requests the internal gRPC service can handle. If request queuing is experienced in any of the apps using this service, then you should increase the number of threads to allow more parallelism.
- `bff.resources.*` — specifies the resource allocations for the query service container.

## Batch processing

The following additional parameters for `sink` are available:

```yaml
  sink:
      batchSize: 1000
      queueSize: 100000
      entitiesSubscribeFrom: P14D
      attributesSubscribeFrom: P14D
      signalsSubscribeFrom: P14D
```

- `batchSize` — since the Query Service inserts data into the database in batches, increasing the batch size may help improve the effective data insertion rate.
- `queueSize` — during its operation, the Query Service maintains three platform subscriptions: entities, signals, and entity attributes. The rate at which the ITRS Analytics platform supplies these data can be greater than the rate at which the Query Service can insert them into its own database.
  
  Items that arrive from the ITRS Analytics platform but cannot be immediately inserted into the Query Service database are added to a queue. Use this parameter to increase the queue size if the volume of data received by the ITRS Analytics platform is causing the queue to fill up.
- `entitiesSubscribeFrom` — the lookback period for entities. This setting defines the range of historical data requested from the Platform upon startup. This setting affects the `inactive-since` attributes within the Entity Viewer app. Entities with an `inactive-since` timestamp older than the lookback period are discarded. A lookback period of P0D disables historical data retrieval. No lookback is done if set to `P0D`.
- `attributesSubscribeFrom` — the lookback period for `Severity` and `Snooze` attributes. This setting determines the amount of historical data requested from the Platform on startup. No lookback is done if set to `P0D`.
- `signalsSubscribeFrom` — the lookback period for signals. This setting determines the amount of historical data requested from the Platform on startup. No lookback is done if set to `P0D`.

Additionally, the `maintenance` job optimizes the database by removing redundant data. 

```yaml
  maintenance:
      analyzeFrequency: P1D
      maintenanceFrequency: PT8H
      orphanedSignalThreshold: P1D
```
    
- `analyzeFrequency` — specifies how often to run the analyze operation on the database. Set to `0` to not run.
- `maintenanceFrequency` — specifies how often to run the DB maintenance job. Set to `0` to not run.
- `orphanedSignalThreshold` — detects and removes orphaned signals in the DB. Orphaned signals are those without a corresponding entity. The entity might have been deleted, or it was never indexed by the DB. A signal is considered orphaned if it has been in the system longer than the threshold, and no entity has been indexed for it.

## Queue size

Since each queue has a different data source, the volume of data largely differs. You can separately configure queue size parameters for entities, attributes, and signals.

The following additional parameters for `sink` are available:

```yaml
  sink:
    queue:
      entities: 100000
      attributes: 500000
      signals: 100000
```

- `entities` — the entity subscription queue size.
- `attributes` — the entity attribute subscription queue size.
- `signals` — the signals subscription queue size.

