> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xloud.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance

> Optimize XSDS storage performance using storage tiering, deduplication, compression, and read caching for your workload's I/O profile.

## Overview

XSDS provides several performance optimization features that can be configured
independently or combined to match your workload's I/O requirements. Understanding
how each feature works helps you select the right combination without unnecessary
overhead.

<Note>
  **Prerequisites**

  * An active Xloud account with project member access
  * Storage tiering, deduplication, and caching are configured at the pool level by
    an administrator — contact your storage administrator to enable these features. Your administrator can configure this through [XDeploy](/deployment).
</Note>

***

## Storage Tiering

XSDS supports multiple storage device classes within a single cluster. Administrators
configure volume types that map to specific device classes, allowing you to direct
each workload to the appropriate media tier.

| Tier     | Device Class    | Volume Type | Typical Use Case                                          |
| -------- | --------------- | ----------- | --------------------------------------------------------- |
| **NVMe** | NVMe SSD        | `ceph-nvme` | Databases, high-IOPS OLTP, latency-critical applications  |
| **SSD**  | SATA/SAS SSD    | `ceph-ssd`  | General-purpose workloads, web servers, application tiers |
| **HDD**  | Hard Disk Drive | `ceph-hdd`  | Backups, archives, cold data, large sequential workloads  |

<Tabs>
  <Tab title="Selecting a Tier" icon="gauge">
    <Steps titleSize="h3">
      <Step title="View available volume types" icon="list">
        ```bash title="List volume types" theme={null}
        openstack volume type list
        ```

        Volume types prefixed with `ceph-` correspond to XSDS-backed tiers.
      </Step>

      <Step title="Create a volume on the target tier" icon="plus">
        ```bash title="Create an NVMe-tier volume" theme={null}
        openstack volume create \
          --size 200 \
          --type ceph-nvme \
          prod-db-nvme
        ```

        ```bash title="Create an HDD-tier archive volume" theme={null}
        openstack volume create \
          --size 10000 \
          --type ceph-hdd \
          archive-cold-data
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Automatic Tiering" icon="zap">
    Xloud can automate tiering based on access patterns — hot data migrates to faster
    media automatically while cold data moves to higher-capacity, lower-cost tiers.

    Automatic tiering is managed through the [Xloud Resource Optimizer](/services/optimization/user-guide).
    The optimizer monitors access patterns and issues migration recommendations that
    can be applied manually or executed automatically.

    <Tip>
      If your workload exhibits strong temporal locality (recent data is hot, older
      data is cold), automatic tiering can significantly reduce costs while maintaining
      performance for active data.
    </Tip>
  </Tab>
</Tabs>

***

## Deduplication and Compression

Inline deduplication and compression reduce the effective storage footprint of
compressible workloads.

<AccordionGroup>
  <Accordion title="Deduplication" icon="copy">
    Deduplication eliminates redundant data blocks across all objects in a pool.
    When two objects contain identical blocks, only one physical copy is stored.

    * Transparent to applications — no changes to client code required
    * Most effective for backup workloads (multiple similar backup sets)
    * Effectiveness varies: typical savings range from 1.5× to 4× for backup data
    * CPU-intensive — may reduce throughput on write-heavy workloads

    <Note>
      Deduplication is enabled at the pool level by an administrator. Check with your
      storage administrator whether deduplication is active on your assigned pools.
    </Note>
  </Accordion>

  <Accordion title="Compression" icon="minimize-2">
    Compression applies lossless compression to stored data before writing to disk.
    Common algorithms include LZ4 (fast, lower ratio) and ZSTD (slower, better ratio).

    * Transparent to applications — reads/writes use normal protocols
    * Most effective for text data, logs, and structured data formats (JSON, CSV)
    * Less effective for already-compressed formats (JPEG, MP4, ZIP, encrypted data)
    * Typical savings: 1.2× to 2× depending on data type

    To check whether compression is enabled on your pool:

    ```bash title="Check pool compression" theme={null}
    openstack volume type show <TYPE_NAME> -c extra_specs
    ```
  </Accordion>
</AccordionGroup>

***

## Read Caching

A tiered caching layer accelerates read-intensive workloads by promoting hot data
to a faster media tier (typically SSD or NVMe) while the bulk of data resides on
slower, higher-capacity devices.

<Tabs>
  <Tab title="How Caching Works" icon="zap">
    When the caching tier is active:

    1. Frequently-accessed data blocks are automatically promoted from the capacity
       tier to the cache tier
    2. Subsequent reads are served directly from the faster cache
    3. Cache eviction moves cold data back to the capacity tier without data loss

    * Effective for workloads with a working set significantly smaller than total dataset size
    * Cache promotion is automatic and policy-driven — no application changes required
    * Latency for cached reads approaches native NVMe/SSD latency

    <Tip>
      If your workload is primarily write-heavy or exhibits no temporal access locality,
      caching provides limited benefit. Use a native SSD or NVMe-backed pool instead.
    </Tip>
  </Tab>

  <Tab title="Enabling Caching" icon="settings">
    Read caching is configured at the pool level by an administrator. Contact your
    storage administrator to enable a cache tier for your storage pool. Your administrator can configure this through [XDeploy](/deployment).

    Once enabled, caching is transparent — your existing volumes automatically benefit
    from the cache without re-creating or migrating data.

    <Note>
      Cache pools are shared by all volumes in the backing pool. Heavy write workloads
      from one project can evict cache entries for others. Contact your administrator to
      discuss cache tier isolation options for production workloads. Your administrator can configure this through [XDeploy](/deployment).
    </Note>
  </Tab>
</Tabs>

***

## Performance Validation

Measure the effective I/O performance of your storage configuration:

<Tabs>
  <Tab title="Basic I/O Test" icon="terminal">
    From inside a Xloud Compute instance with a volume attached:

    ```bash title="Sequential write throughput (1 GB test)" theme={null}
    dd if=/dev/zero of=/dev/vdb bs=1M count=1024 oflag=direct
    ```

    ```bash title="Random read IOPS (4K blocks)" theme={null}
    fio --name=random-read \
      --filename=/dev/vdb \
      --rw=randread \
      --bs=4k \
      --numjobs=4 \
      --iodepth=32 \
      --runtime=60 \
      --group_reporting
    ```

    <Warning>
      Run I/O tests on a dedicated test volume, not on a volume containing production
      data. Direct device tests (`/dev/vdb`) will corrupt any file system on that device.
    </Warning>
  </Tab>

  <Tab title="Interpreting Results" icon="chart-bar">
    Expected performance ranges by tier (approximate, varies by cluster load):

    | Tier | Sequential Read   | Sequential Write | Random 4K IOPS |
    | ---- | ----------------- | ---------------- | -------------- |
    | NVMe | 3–5 GB/s          | 2–4 GB/s         | 200K–400K      |
    | SSD  | 500 MB/s–1.5 GB/s | 400 MB/s–1 GB/s  | 50K–150K       |
    | HDD  | 100–300 MB/s      | 80–200 MB/s      | 200–500        |

    If measured performance is significantly below these ranges, open a support ticket
    with the fio output — the storage team can investigate backend bottlenecks.
  </Tab>
</Tabs>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Storage Types" href="/services/sds/user-guide/storage-types" color="#197560">
    Understand which storage interface best fits your workload's access pattern
  </Card>

  <Card title="Data Protection" href="/services/sds/user-guide/data-protection" color="#197560">
    Configure replication and erasure coding for durability
  </Card>

  <Card title="XSDS Admin — Storage Tiers" href="/services/sds/admin-guide/storage-tiers" color="#197560">
    Configure multi-tier storage pools and device class rules (administrator)
  </Card>

  <Card title="Resource Optimizer" href="/services/optimization/user-guide" color="#197560">
    Automate data placement across tiers based on access patterns
  </Card>
</CardGroup>
