# Managing resources (Hot, Warm, Cold)

Weaviate provides flexible resource management features that help you to balance search speeds; search accuracy and recall; and system resource costs.

This guide provides an overview of these topics to help you make allocate resources effectively:

- **[Storage tiers (_hot, warm, cold_)](#storage-tiers---temperatures)**
- **[Vector index types](#vector-index-types)**
- **[Vector compression](#vector-compression)**
- **[Tenant states](#tenant-states)**
- **[Tips](#tips)**

:::callout{intent="tip" title="Resource management Tips"}
* Start with the dynamic [index type](#vector-index-types) unless you have a reason not to.
* Consider [vector compression](#vector-compression) techniques if some loss of accuracy is acceptable.
  - This will improve query speeds.
  - For HNSW indexes, this will reduce memory usage.
* Avoid overprovisioning storage. Especially _hot_ storage.
  - Can you use [tenant states](#tenant-states) to reduce costs?
  - Can you use [vector compression](#vector-compression) to reduce memory usage?
:::

## Storage Tiers - Temperatures

![Storage Tiers](/assets/docs/weaviate/starter-guides/managing-resources/img/storage-tiers.jpg)

We categorize storage resources using three tiers: [_hot_](#-hot), [_warm_](#-warm), and [_cold_](#-cold). Each tier has different performance characteristics and costs.

| Tier    | Vector <br> Index Type | Vector <br> Compression | Tenant State | Storage | Performance            | Cost     |
| ------- | ---------------------- | ----------------------- | ------------ | ------- | ---------------------- | -------- |
| 🟥 Hot  | HNSW                   | PQ, SQ, BQ              | Active       | Memory  | Fastest                | High     |
| 🟨 Warm | Flat                   | BQ                      | Active       | SSD     | Slower                 | Moderate |
| 🟦 Cold | Any                    | Any                     | Inactive     | Cloud   | Resource not available | Low      |

### 🟥 Hot

![Storage Tiers - Hot](/assets/docs/weaviate/starter-guides/managing-resources/img/storage-tiers-hot.jpg)

- Describes memory usage
- Fastest and most expensive
- Primarily driven by [`HNSW`](managing-resources-indexing.md#hnsw-indexes) vector indexes
- Always available (active) for use
- Costs increase rapidly with scale

### 🟨 Warm

![Storage Tiers - Warm](/assets/docs/weaviate/starter-guides/managing-resources/img/storage-tiers-warm.jpg)

- Describes data stored on disk (SSD)
- Slower than [hot](#-hot) tier but less expensive
- Driven by [flat](managing-resources-indexing.md#flat-indexes) vector index, object data, and [inverted indexes](managing-resources-indexing.md#inverted-indexes)
- Always available (active) for use
- Costs increase more slowly than hot tier as data grows

### 🟦 Cold

![Storage Tiers - Cold](/assets/docs/weaviate/starter-guides/managing-resources/img/storage-tiers-cold.jpg)

:::callout{intent="info" title="Offloading: AWS S3 only"}
As of Weaviate `v1.26.0`, tenants can only be offloaded to cold storage in AWS S3. Additional storage options may be added in future releases.

To offload a tenant, use the `offload-s3` module.
:::

- Describes data stored in cloud storage
- Slowest and least expensive tier
- Primarily driven by [offloaded tenants](#tenant-states)
- Resources are not available (inactive) for use
- Requires [reactivation](#tenant-states) to access

## Resource Management - Key Factors

Effective resource management in Weaviate involves balancing performance, cost, and data accessibility. The key levers to manage resources are:

- **[Vector index types](#vector-index-types)**: Choose the right index type based on the number of objects and desired performance.
- **[Vector compression](#vector-compression)**: Use compression techniques to reduce memory usage and improve query performance at the cost of some accuracy.
- **[Tenant states](#tenant-states)**: Manage tenant states to balance cost and performance.

### Vector index types

The choice of vector index type can have a significant impact on performance and resource usage. Weaviate supports the following index types:

| Index Type | Resource Usage | Performance | Suitable for      | Description                                                                                                                  |
| ---------- | -------------- | ----------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| HNSW       | 🟥 Hot         | Fast        | Any object count  | A memory-based, fast index ([read more](managing-resources-indexing.md#hnsw-indexes))                                        |
| Flat       | 🟨 Warm        | Medium      | <\~10k objects    | A disk-based, brute-force index ([read more](managing-resources-indexing.md#flat-indexes))                                   |
| Dynamic    | Depends        | Depends     | Any object count  | Transitions from flat to HNSW index at a specified threshold ([read more](managing-resources-indexing.md#dynamic-indexes))   |
| HFresh     | 🟨 Warm        | Fast        | Large collections | A cluster-based index with memory efficiency for large datasets ([read more](managing-resources-indexing.md#hfresh-indexes)) |

The choice of index type depends on the number of objects and the desired performance. As a rule of thumb, use the following guidelines for a multi-tenant collection:

```mermaid
flowchart LR
    %% Define nodes and connections
    subgraph vectorIndex ["Vector Index Selection"]
        direction LR
        multiTenant{"Is multi-tenancy<br> enabled?"}
        objCount{"Does the collection have<br> more than 100k objects?"}
        stayUnder{"Is the collection likely to stay<br> at under 100k objects?"}

        multiTenant -->|No| objCount
        multiTenant -->|Yes| useDynamic["Use Dynamic"]
        objCount -->|Yes| useHNSW["Use HNSW"]
        objCount -->|No| stayUnder
        stayUnder -->|Yes| useFlat["Use Flat"]
        stayUnder -->|"No/Unsure"| useDynamic["Use Dynamic"]
    end

    %% Style nodes
    style multiTenant fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style objCount fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style stayUnder fill:#ffffff,stroke:#B9C8DF,color:#130C49

    %% Terminal nodes
    style useHNSW fill:#ffffff,stroke:#61BD73,color:#130C49
    style useFlat fill:#ffffff,stroke:#61BD73,color:#130C49
    style useDynamic fill:#ffffff,stroke:#61BD73,color:#130C49

    %% Style subgraph
    style vectorIndex fill:#ffffff,stroke:#130C49,stroke-width:2px,color:#130C49
```

If you are unsure which index type to use, the dynamic index type is a good starting point, as it automatically transitions from a flat to an HNSW index based on the number of objects.

- [Starter guide: indexes](managing-resources-indexing.md)
- [How-to: Set the vector index type](../how-to-manage-collections/vector-config.md#set-vector-index-type)

### Vector compression

Vector compression techniques reduce the size of vectors by quantizing them into a smaller representation.

This can have the impact of reducing memory usage, or improving performance by reducing the amount of data that needs to be read from disk. The trade-off is that the resulting search quality may be lower.

Weaviate supports the following vector compression methods:

| Compression Method           | Index Type      | Requires Training | Description                                                                                                                    |
| ---------------------------- | --------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Product Quantization (PQ)    | HNSW            | Yes               | Each vector becomes an array of integer-based centroids ([read more](../concepts/vector-quantization.md#product-quantization)) |
| Binary Quantization (BQ)     | HNSW, Flat      | No                | Each vector dimension becomes a bit ([read more](../concepts/vector-quantization.md#binary-quantization))                      |
| Scalar Quantization (SQ)     | HNSW            | Yes               | Each vector dimension becomes an integer ([read more](../concepts/vector-quantization.md#scalar-quantization))                 |
| Rotational Quantization (RQ) | All index types | No                | Each vector is rotated then quantized to an integer ([read more](../concepts/vector-quantization.md#rotational-quantization))  |

As a starting point, use the following guidelines for selecting a compression method:

```mermaid
flowchart LR
    %% Define nodes and connections
    subgraph compression ["Compression Strategy"]
        direction LR
        startIndexType{"What is your<br> vector index type?"}
        sample{"Do you have a<br> representative sample<br> of your final dataset?"}
        tunable{"Do you want<br> tunable<br> compression?"}
        bqcompat{"Is your vectorizer<br> model compatible<br> with BQ?"}

        startIndexType -->|HNSW| sample
        startIndexType -->|Flat| bqcompat
        sample -->|Yes| tunable
        tunable -->|Yes| usePQ["Use PQ"]
        tunable -->|No| useSQ["Use SQ"]
        sample -->|No| useBQ["Use BQ"]
        bqcompat -->|Yes| useBQ["Use BQ"]
        bqcompat -->|No| noCompress["Do not use<br> compression"]
    end

    %% Style nodes
    style startIndexType fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style sample fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style tunable fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style bqcompat fill:#ffffff,stroke:#B9C8DF,color:#130C49

    %% Terminal nodes
    style usePQ fill:#ffffff,stroke:#61BD73,color:#130C49
    style useSQ fill:#ffffff,stroke:#61BD73,color:#130C49
    style useBQ fill:#ffffff,stroke:#61BD73,color:#130C49
    style noCompress fill:#ffffff,stroke:#61BD73,color:#130C49

    %% Style subgraph
    style compression fill:#ffffff,stroke:#7AD6EB,stroke-width:2px,color:#130C49
```

If you are unsure which index type to use, scalar quantization is a good starting point, provided that you have a representative sample of your likely final dataset.

- [Starter guide: Vector compression](managing-resources-compression.md)
- [How-to: Configure vector compression](../how-to-configure-weaviate/compression.md)

### Tenant states

Multi-tenant collections enable you to efficiently manage isolated subsets of data. Each tenant share the same schema and configuration.

Weaviate supports the following tenant states:

| Tenant state     | CRUD & Queries | Vector Index | Inverted Index | Object Data | Time to Activate | Description                                                 |
| ---------------- | -------------- | ------------ | -------------- | ----------- | ---------------- | ----------------------------------------------------------- |
| Active (default) | **Yes**        | Hot/Warm     | Warm           | Warm        | None             | Tenant is available for use                                 |
| Inactive         | **No**         | Warm         | Warm           | Warm        | Fast             | Tenant is locally stored but not available for use          |
| Offloaded        | **No**         | Cold         | Cold           | Cold        | Slow             | Tenant is stored in cloud storage and not available for use |

_Hot_ tenants can be deactivated to _warm_ storage to reduce memory usage, and any tenant can be offloaded to _cold_ storage to reduce memory and disk usage. Conversely, any tenant can be reactivated when needed.

```mermaid
flowchart LR
    %% Define nodes and connections
    subgraph tenantData ["Tenant Data Availability"]
        direction LR
        needNow{"Does the tenant data<br> need to be<br> available now?"}
        howQuick{"When it is needed,<br> how quickly does it<br> need to be available?"}

        needNow -->|Yes| active["Active"]
        needNow -->|No| howQuick
        howQuick -->|Quickly| inactive["Inactive"]
        howQuick -->|"Latency is acceptable"| offloaded["Offloaded"]
    end

    %% Style nodes
    style needNow fill:#ffffff,stroke:#B9C8DF,color:#130C49
    style howQuick fill:#ffffff,stroke:#B9C8DF,color:#130C49

    %% Terminal nodes
    style active fill:#ffffff,stroke:#61BD73,color:#130C49
    style inactive fill:#ffffff,stroke:#61BD73,color:#130C49
    style offloaded fill:#ffffff,stroke:#61BD73,color:#130C49

    %% Style subgraph
    style tenantData fill:#ffffff,stroke:#61BD73,stroke-width:2px,color:#130C49
```

Consider a strategy of deactivating tenants that are not frequently accessed, and offloading tenants that are rarely accessed.

- [Starter guide: tenant states](managing-resources-tenant-states.md)
- [How-to: Configure tenant offloading](../storage-and-backups/tenant-offloading.md)
- [How-to: Manage tenant states](../how-to-manage-collections/tenant-states.md)

## Tips

### Best Practices

- Start with the dynamic [index type](#vector-index-types) for new collections. This is particularly useful for multi-tenant collections, as it allows each tenant to use the most appropriate index type.
- Use [vector compression](#vector-compression) techniques to optimize storage and query performance, especially for large collections or tenants.
- Conduct thorough testing when changing index types or compression methods to ensure performance meets your requirements.

### Common Pitfalls

- Overprovisioning hot storage: Keeping all data in hot storage can lead to unnecessary costs. Regularly assess what data truly needs the fastest access.
- Neglecting to plan for growth: Not anticipating data growth can lead to performance issues. Always design your resource management strategy with scalability in mind.
- Improper tenant management: In multi-tenant scenarios, forgetting to [offload inactive tenants](#tenant-states) can lead to resource waste. Implement automated processes to manage tenant states based on usage patterns.
- Mismatch between quantization techniques, model and data: When using compression technique, ensure that the quantization technique is compatible with the model (e.g. BQ) and that the data is sufficient and representative for training (e.g. PQ, SQ).

## Related pages

- [Starter guide: Compression](managing-resources-compression.md)
- [Starter guide: Indexing](managing-resources-indexing.md)
- [Starter guide: Tenant states](managing-resources-tenant-states.md)
- [Concepts: Vector Index](../indexing/vector-index.md)
- [Concepts: Vector Quantization](../concepts/vector-quantization.md)
- [Concepts: Multi-Tenancy](../concepts/data.md#multi-tenancy)
- [How-to: Set the vector index type](../how-to-manage-collections/vector-config.md#set-vector-index-type)
- [How-to: Configure vector compression](../how-to-configure-weaviate/compression.md)
- [How-to: Perform multi-tenancy operations](../how-to-manage-collections/multi-tenancy.md)
- [How-to: Manage tenant states](../how-to-manage-collections/tenant-states.md)

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
