# Server

Server configuration can be provided as part of the server startup parameters.

```
bin/pinot-admin.sh StartServer -configFileName /path/to/server.conf
```

`server.conf` can have the following properties

| Property                                                                  | Default                                                                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| pinot.server.netty.port                                                   | 8098                                                                                                                                 | Port to query Pinot Server                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| pinot.server.netty.host                                                   |                                                                                                                                      | Pinot server hostname                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| pinot.server.adminapi.port                                                | 8097                                                                                                                                 | Port for Pinot Server Admin UI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.instance.id                                                  |                                                                                                                                      | By default the server instance id used by Helix is *Server\_hostname\_port* where the hostname and port are configured through host and port config values above. This config overwrites the default setting. User can put server id independent of the server's hostname and port.                                                                                                                                                                                                                                                                                              |
| pinot.server.instance.dataDir                                             | `java.io.tmpdir` + `/PinotServer/index`                                                                                              | Directory to hold all the data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.instance.consumerDir                                         |                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.segmentTarDir                                       | `java.io.tmpdir` + `/PinotServer/segmentTar`                                                                                         | Directory to hold temporary segments downloaded from Controller or Deep Store                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| pinot.server.instance.readMode                                            | `mmap`                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.reload.consumingSegment                             | true                                                                                                                                 | Specifies if the reload segment API should reload the consuming segments. This is useful when the corresponding schema is updated and we want the changes to be reflected in the consuming segment.                                                                                                                                                                                                                                                                                                                                                                              |
| pinot.server.instance.data.manager.class                                  | <p><code>org.apache.pinot.server.</code><br><code>starter.helix.HelixInstanceDataManager</code></p>                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.query.scheduler.name                                                | `fcfs`                                                                                                                               | Currently only FCFS (first-come-first-serve) is supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| pinot.query.scheduler.query\_runner\_threads                              | CPU cores                                                                                                                            | Main thread to execute the queries (one thread per query)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| pinot.query.scheduler.query\_worker\_threads                              | 2 \* CPU cores                                                                                                                       | Worker thread to process the segments (multiple threads per query)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| pinot.query.scheduler.query.log.maxRatePerSecond                          | unlimited                                                                                                                            | Maximum queries to be logged per second. Queries with exceptions and costly queries are always logged.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| pinot.server.query.executor.class                                         | <p><code>org.apache.pinot.core.query.</code><br><code>executor.ServerQueryExecutorV1Impl</code></p>                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.query.executor.pruner.class                                  | <p><code>ValidSegmentPruner,DataSchemaSegmentPruner,</code><br><code>ColumnValueSegmentPruner,SelectionQuerySegmentPruner</code></p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.query.executor.timeout                                       | `15000`                                                                                                                              | Timeout for Server to process Query in Milliseconds                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| pinot.server.query.executor.max.execution.threads                         | `-1` (unlimited)                                                                                                                     | Maximum number of execution threads allowed for a query. Limiting this can prevent a single expensive query from occupying all the execution threads.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| pinot.server.query.executor.max.init.group.holder.capacity                | `10000`                                                                                                                              | Initial capacity of the group key holder. Increasing this value can reduce the resizing of the group key holder, but increase the heap usage for small group-by queries.                                                                                                                                                                                                                                                                                                                                                                                                         |
| pinot.server.query.executor.num.groups.limit                              | `100000`                                                                                                                             | Maximum number of groups kept from each segment during query execution. Once this limit is reached, no more groups will be taken (will still aggregate on existing groups).                                                                                                                                                                                                                                                                                                                                                                                                      |
| pinot.server.query.executor.min.segment.group.trim.size                   | `-1` (do not trim)                                                                                                                   | Minimum number of groups kept at segment level during query execution. If there are enough groups found in a segment, pinot will trim the groups to `max(5 * LIMIT, minSegmentgroupTrimSize)` groups based on the order-by clause. Increasing this value can increase the accuracy of the results, but also increase the heap usage of the group-by queries.                                                                                                                                                                                                                     |
| pinot.server.query.executor.min.server.group.trim.size                    | `5000`                                                                                                                               | Minimum number of groups kept at server level during query execution. If there are enough groups found in a server, pinot will trim the groups to `max(5 * LIMIT, minServergroupTrimSize)` groups based on the order-by clause. Increasing this value can increase the accuracy of the results, but also increase the heap usage and data transfer cost of the group-by queries.                                                                                                                                                                                                 |
| pinot.server.query.executor.groupby.trim.threshold                        | `1000000`                                                                                                                            | Threshold for number of groups to trigger the server group trimming. Increasing this value can reduce the times of trimming, but also increase the heap usage of the group-by queries.                                                                                                                                                                                                                                                                                                                                                                                           |
| pinot.server.requestHandlerFactory.class                                  | <p><code>org.apache.pinot.server.</code><br><code>request.SimpleRequestHandlerFactory</code></p>                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.segment.format.version                              |                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.enable.split.commit                                 |                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.enable.commitend.metadata                           |                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.max.parallel.refresh.threads                        | 1                                                                                                                                    | Number of simultaneous segments that can be refreshed on one server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| pinot.server.instance.realtime.max.parallel.segment.builds                | 0                                                                                                                                    | Specifies how many parallel real-time segments can be built. Value of <= 0 indicates unlimited.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.instance.realtime.alloc.offheap                              | false                                                                                                                                | Boolean value to control whether memory for real-time consuming segments should be allocated off-heap.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| pinot.server.instance.realtime.alloc.offheap.direct                       | false                                                                                                                                | If 'real-time.alloc.offheap' is set to true, this boolean value controls whether the corresponding allocation should be direct or not (false indicate mmap allocation)                                                                                                                                                                                                                                                                                                                                                                                                           |
| pinot.server.startup.minResourcePercent                                   | 100                                                                                                                                  | The percentage of tables that need to be in an `ONLINE` state before the server is marked as `STARTED` to server queries                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| pinot.server.startup.timeoutMs                                            | 10 minutes                                                                                                                           | The total amount of time a server will wait for all status checks before server is marked as `STARTED` to server queries                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| pinot.server.starter.realtimeConsumptionCatchupWaitMs                     | 0                                                                                                                                    | <p>On it's own, this is a static amount of time servers will wait for consuming segments before server is marked as <code>STARTED</code> to server queries<br><br>When paired with <code>pinot.server.starter.enableRealtimeOffsetBasedConsumptionStatusChecker</code> or <code>pinot.server.starter.enableRealtimeFreshnessBasedConsumptionStatusChecker</code>, this is how long those status checkers will wait for segments to turn <code>GOOD</code><br><br>This should not be set to more than <code>pinot.server.startup.timeoutMs</code> as it will not be respected</p> |
| pinot.server.starter.enableRealtimeOffsetBasedConsumptionStatusChecker    | false                                                                                                                                | When `true`, the server will collect the current, latest offsets for all consuming segments and will mark those segments as `GOOD` once they have caught up to those offsets                                                                                                                                                                                                                                                                                                                                                                                                     |
| pinot.server.starter.enableRealtimeFreshnessBasedConsumptionStatusChecker | false                                                                                                                                | <p>When <code>true</code>, the server will not be marked as <code>STARTED</code> or serve queries until</p><p><br>1) the server has caught up to the latest available offset or the latest consumed event for each segment is at least within <code>pinot.server.starter.realtimeMinFreshnessMs</code> of the current time<br>2) <code>pinot.server.startup.timeoutMs</code> has elapsed</p>                                                                                                                                                                                     |
| pinot.server.starter.realtimeMinFreshnessMs                               | 10 seconds                                                                                                                           | <p>When <code>pinot.server.starter.enableRealtimeFreshnessBasedConsumptionStatusChecker=true</code>, this configures the minimum freshness (now - last\_event\_time) for the server status checker to consider a consuming segment <code>GOOD</code></p><p>This only applies when <code>pinot.server.starter.enableRealtimeFreshnessBasedConsumptionStatusChecker=true</code></p>                                                                                                                                                                                                |
| pinot.server.starter.realtimeFreshnessIdleTimeoutMs                       | 0                                                                                                                                    | When `pinot.server.starter.enableRealtimeFreshnessBasedConsumptionStatusChecker=true`, this will mark a segment as `GOOD` after this timeout if it has not consumed any events.                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.startup.exitOnServiceStatusCheckFailure                      | false                                                                                                                                | When `true`, the server will shutdown after `pinot.server.shutdown.timeoutMs` rather than be marked as `STARTED` if the status has not turned `GOOD`                                                                                                                                                                                                                                                                                                                                                                                                                             |
| pinot.server.startup.enableServiceStatusCheck                             | true                                                                                                                                 | <p><code>true</code> - server will run all configured checks<br><br><code>false</code> - server will be marked as <code>STARTED</code> without performing an startup checks</p>                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.startup.serviceStatusCheckIntervalMs                         | 10 seconds                                                                                                                           | Interval at which server will perform service stats checks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| pinot.server.shutdown.timeoutMs                                           | 10 minutes                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.shutdown.enableQueryCheck                                    | true                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.shutdown.noQueryThresholdMs                                  | 15 seconds                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.shutdown.enableResourceCheck                                 | false                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.shutdown.resourceCheckIntervalMs                             | 10 seconds                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.admin.access.control.factory.class                           | <p><code>org.apache.pinot.server.</code><br><code>api.access.AllowAllAccessFactory</code></p>                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.adminapi.access.protocols                                    | http                                                                                                                                 | Ingress protocols to access server admin api (http or https or http,https)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| pinot.server.adminapi.access.protocols.http.port                          |                                                                                                                                      | Port to access server admin api via http                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| pinot.server.adminapi.broker.protocols.https.port                         |                                                                                                                                      | Port to access server admin api via https                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| pinot.server.tls.keystore.path                                            |                                                                                                                                      | Path to server TLS keystore                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| pinot.server.tls.keystore.password                                        |                                                                                                                                      | keystore password                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| pinot.server.tls.truststore.path                                          |                                                                                                                                      | Path to server TLS truststore                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| pinot.server.tls.truststore.password                                      |                                                                                                                                      | truststore password                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| inot.server.tls.client.auth                                               | false                                                                                                                                | toggle for requiring TLS client auth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| pinot.server.netty.enabled                                                | true                                                                                                                                 | toggle for enabling unsecured netty connections to server                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| pinot.server.netty.port                                                   |                                                                                                                                      | Port for accessing pinot server via unsecured netty                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| pinot.server.nettytls.enabled                                             |                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pinot.server.nettytls.port                                                |                                                                                                                                      | Port for accessing pinot server via TLS-secured netty                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| pinot.server.http.server.thread.pool.corePoolSize                         | 2 \* cores                                                                                                                           | Config for the thread-pool used by pinot-server's http-server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.http.server.thread.pool.maxPoolSize                          | 2 \* cores                                                                                                                           | Config for the thread-pool used by pinot-server's http-server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.segment.fetcher.http.client.maxConnTotal                     |                                                                                                                                      | Config for the http-client used by HttpSegmentFetcher for downloading segments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.segment.fetcher.http.client.maxConnPerRoute                  |                                                                                                                                      | Config for the http-client used by HttpSegmentFetcher for downloading segments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| pinot.server.instance.max.segment.preload.threads                         | 0                                                                                                                                    | <p>Number of threads that should be created to preload the segments in an upsert table.<br><br>Value should be greater than 0 otherwise preload is synchronous.</p>                                                                                                                                                                                                                                                                                                                                                                                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pinot.apache.org/release-1.1.0/configuration-reference/server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
