Hydrolix Tunable Name Examples

Examples of how to use HTN tunables

Examples of HTN tunables

HTN tunables control Kubernetes cluster configuration by specifying services, pools, and containers. Add these values to the hydrolixcluster.yaml file in the spec: section.

Format structure for HTN tunables

HTN tunables follow a specific naming convention:

htn:tunable_name:service_name:pool_name:container_name: value

The key components for each HTN tunable are:

  • htn: Prefix indicates the tunable uses the HTN naming structure
  • tunable_name: The tunable parameter name
  • value: The tunable value
  • service_name: (Optional) The service where the tunable is applied, can be omitted by using an empty string
  • pool_name: (Optional) The pool in the service, can be left empty
  • container_name: (Optional) The specific container in the pool and service, can be left empty

Basic examples

These basic examples are a starting point to learn how to use HTN tunables for cluster configuration.

Define a tunable for a specific service

In this example, the alter-peer service and all attached pools and services, are limited to 10% of the max memory usage.

htn:max_server_memory_usage_perc:alter-peer::: 10

Define a tunable for a specific service and pool

In this example, the merge-peer service, and merge-peer-ii pool, and their included containers are limited to 70% of the max server memory usage.

htn:max_server_memory_usage_perc:merge-peer:merge-peer-ii:: 70

Define a tunable for a specific service, pool, and container

In this example, the turbine container, merge-peer-ii pool, and intake-head services are limited to 30% of the max server memory usage.

htn:max_server_memory_usage_perc:merge-peer:merge-peer-ii:turbine: 30

Add all tunables to the hydrolixcluster.yaml file

In this example, we add the previous HTN tunables to configure the max server memory usage allotted to different services, pools, and containers.

apiVersion: hydrolix.io/v1
kind: HydrolixCluster
metadata:
  name: hdx
  namespace: dev
spec:
  ...omitting other tunables...
  max_server_memory_usage_perc: 50
  htn:max_server_memory_usage_perc:alter-peer::: 10
  htn:max_server_memory_usage_perc:intake-head::: 30
  htn:max_server_memory_usage_perc:merge-peer:merge-peer-ii:: 70

Practical examples

Use these examples for more specific and advanced cluster configuration.

Set io_perf_mappings for specific services

In this example, we set the io_perf_mappings tunable at the service level for the query-head and merge-peer services.

htn:io_perf_mappings:query-head::: new_value
htn:io_perf_mappings:merge-peer::: new_value

Configure max_concurrent_queries for a Turbine container

In this example, we apply a limit of 50 max_concurrent_queries to the Turbine container in the alter-peer and batch-peer services.

htn:max_concurrent_queries:alter-peer::turbine: 50
htn:max_concurrent_queries:batch-peer::turbine: 50

Apply a value across a pool

In this example, we apply a limit of 100 max_concurrent_queries at the pool level, including all services and containers in the merge-peer-iii pool.

htn:max_concurrent_queries::merge-peer-iii:: 100

Omit levels

Use HTN tunables for more flexibility when defining specific levels isn't needed. For example, leave any optional component of the HTN blank if there's no need to specify it.

Set empty values with consecutive colons, ::.

Empty value examples

  • htn:tunable_name::: 0 applies 0 globally (derivative case, equivalent to bare tunable)
  • htn:tunable_name:service_name:: 0 applies 0 only to a specific service
  • htn:tunable_name:service_name:pool_name:: 0 applies 0 to a service and a pool, but not a specific container

What’s Next

See the Hydrolix tunables