# Configure and manage system tunings

> Learn how to configure and manage CubeCOS tunings to customize system usage and functionality.

A tuning is a configurable system parameter that changes how a CubeCOS cluster behaves. Use the web UI for a guided workflow, or the CLI for scripting and advanced control.

## UI-based tuning management {#ui-based-tuning-management}

1. Log in to the CubeCOS management interface.
2. Navigate to **Maintenance > Tunings** to view all available tunings.

   ![tunings-1-tunings_overview](/assets/configuration/tunings-1-tunings_overview.png)

3. Click **+ Create Tuning**.

   ![tunings-2-configure_tunings](/assets/configuration/tunings-2-configure_tunings.png)

4. Select a tuning, enter the new value in the **Enter Value** field, then click **Next**.

   ![tunings-3-set_tunings_value](/assets/configuration/tunings-3-set_tunings_value.png)

5. Select which hosts receive the tuning:
   - **Hostname**: Apply the tuning to one selected host only.
   - **Select All**: Apply the tuning to every host in the cluster.

   ![tunings-4-select_hosts](/assets/configuration/tunings-4-select_hosts.png)

6. Confirm the application details, then click **Publish** to apply the tunings.

   ![tunings-5-publish_tunings](/assets/configuration/tunings-5-publish_tunings.png)

## CLI-based tuning management {#cli-based-tuning-management}

### Check for existing tunings {#check-for-existing-tunings}

Run the following command to list configured tunings.

```bash
tuning list
enabled                            name                                 value
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
```

### Dump all available tunings {#dump-all-available-tunings}

Run the following command to list every available tuning.

```bash
cc1:tuning> dump

Published Tunings
----------------------------------------------------------------
Name                          Description                                                                                         Default|Min|Max
debug.level.%s                Set debug level for process %s                                                                      [0|0|9]
debug.enable_core_dump.%s     Enable core dump for process %s                                                                     [False]
# ... output truncated
kapacitor.alert.extra.prefix  Set kapacitor alert message prefix.                                                                 ["Cube" (Any)]
opensearch.curator.rp         opensearch curator retention policy in days.                                                        [7|0|365]
opensearch.heap.size          opensearch heap size in GB.                                                                         [2|1|1024]
----------------------------------------------------------------

Network Interfaces
------------------------------------------------------------------------------------------------------------------------
     Dev    Label        DevID/Cfg   BusID/Slaves               HWAddr     Driver  Link  State Speed(actual/advertised)
------------------------------------------------------------------------------------------------------------------------
    eth0     IF.1        14e4.165f   0000:01:00.0    18:66:da:eb:c7:1c        tg3   yes     UP        1000F/1000F
    eth1     IF.2        14e4.165f   0000:01:00.1    18:66:da:eb:c7:1d        tg3    no   DOWN           NA/1000F
------------------------------------------------------------------------------------------------------------------------
```

### Configure a new tuning {#configure-a-new-tuning}

:::info

If high availability (HA) is enabled, configure the tuning on **all** control nodes.

:::

1. Run the following command.

   ```bash
   tuning configure
    enabled                            name                                 value
   -------------------------------------------------------------------------------
   -------------------------------------------------------------------------------
   1: modify tunings
   2: apply
   3: exit
   Enter index: 1
   ```

2. Enter `1` to add a new tuning, then enter the tuning name and value. Find the tuning name in the output of `tuning dump`.

   ```bash
   Select action:
   1: Add
   2: Delete
   3: Update
   Enter index: 1
   Enter tuning name: <tuning-name>
   Enter tuning value: <tuning-value>
   ```

3. Enter `1` to enable the tuning.

   ```bash
   Enable the tuning:
   1: Enabled
   2: Disabled
   Enter index: 1
   ```

4. Enter `2` to apply the tuning to the node.

   ```bash
   Adding tuning: <tuning-name> = <tuning-value>
   (Enabled)
    enabled                            name                                 value
   -------------------------------------------------------------------------------
        [x]        <tuning-name>  <tuning-value>
   -------------------------------------------------------------------------------
   1: modify tunings
   2: apply
   3: exit
   Enter index: 2
    enabled                            name                                 value
   -------------------------------------------------------------------------------
        [x]         <tuning-name>  <tuning-value>
   -------------------------------------------------------------------------------
   Apply the changes?
   Enter 'YES' to confirm: YES
   Applying policy changes.
   Policy changes were successfully applied.
   ```
