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 structuretunable_name: The tunable parameter nameservice_name: (Optional) The service where the tunable is applied, can be omitted by using an empty stringpool_name: (Optional) The pool in the service, can be left emptycontainer_name: (Optional) The specific container in the pool and service, can be left emptyvalue: The tunable value
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 available server memory.
htn:max_server_memory_usage_perc:alter-peer::: 10
Define a tunable for a specific service and pool
In this example, the merge-peer-ii pool in the merge-peer service and its included containers are limited to 70% of the available server memory.
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 containers in the merge-peer-ii pool in the merge-peer service are limited to 30% of the available server memory.
htn:max_server_memory_usage_perc:merge-peer:merge-peer-ii:turbine: 30
Add all tunables to the hydrolixcluster.yaml file
hydrolixcluster.yaml fileIn 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
io_perf_mappings for specific servicesIn 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
max_concurrent_queries for a turbine containerIn 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
Updated 2 months ago