All Products
Search
Document Center

Data Lake Formation:Storage optimization

Last Updated:Jul 15, 2026

DLF storage optimization simplifies Paimon table maintenance through adaptive compaction, expired snapshot cleanup, partition lifecycle management, and orphan file cleanup. This guide covers the available optimization strategies and how DLF executes them.

Important

Iceberg tables lack automatic storage reclamation. To prevent storage cost spikes, periodically clean up expired snapshots and orphan files as described in Iceberg table storage governance.

Storage optimization strategies

Strategy type

Description

DLF execution mechanism

Compaction

Merges small files into larger ones, reducing file count, metadata overhead, and file lookup costs during queries. Improves Paimon table query performance.

DLF automatically triggers compaction when data writes are committed.

Expired snapshot cleanup

Snapshots protect referenced data files from deletion, preserving historical states. As snapshots accumulate, storage consumption grows. Expiring unneeded snapshots frees storage space.

DLF triggers expired snapshot cleanup automatically during storage optimization jobs. The default expiration time is one hour, adjustable through Paimon table parameters. For more information, see Clean up expired data.

Partition lifecycle management

Many scenarios require only recent data. Partition data by time and set expiration rules to automatically delete old partitions, freeing storage. Configure intelligent storage tiering to move infrequently accessed data from Standard to lower-cost storage classes (Infrequent Access, Archive, or Cold Archive).

Configure expiration time through Paimon table parameters in Set partition expiration time. After configuration, cleanup triggers automatically during DLF storage optimization jobs. Use intelligent storage tiering to move eligible partition data to lower-cost storage classes, or manually change the storage class on the Table Details page. The Storage Overview page shows tiering distribution across catalogs, databases, and tables.

Orphan file cleanup

Orphan files are files that exist under the table storage path but are not referenced by any snapshot. They typically result from interrupted write jobs, failed commits, or residue left by abnormal cleanup processes. Because no snapshot references them, snapshot expiration cannot remove them, so they require periodic cleanup.

You can trigger orphan file cleanup manually from the console or enable automatic cleanup. Cleaned orphan files are moved to the recycle bin (system.trash) temporarily and deleted after the retention period.

Enable or disable intelligent storage optimization

Note

The Storage Optimization tab appears only for Paimon tables.

  1. Log on to the DLF console

  2. On the Catalogs page, click the catalog name.

  3. On the Database tab, click the name of the target database to view its tables.

  4. In the Tables list, click the name of the target table to view its schema information.

  5. Click the Storage Optimization tab. The intelligent storage optimization switch is enabled by default. To disable it, click the image switch.

View and configure storage optimization strategies

Compaction

On the Storage Optimization tab, click Compaction to view the execution status, rescale records, and execution history.

Edit the policy mode based on your requirements:

Dynamic resource mode (recommended)

The system automatically scales compute resources based on real-time workload, eliminating manual capacity planning. Suitable for fluctuating traffic.
Three configuration preferences are available:

  • Balanced: Balances compaction speed and resource consumption (default).

  • Low latency: Allocates more resources for faster compaction, reducing data visibility delay.

  • Low resource usage: Limits resource usage to reduce compute costs at the expense of longer compaction time.

    Dynamic resource allocation and scaling

    In dynamic resource mode, the system allocates compute resources based on real-time workload and data characteristics. The following factors drive resource allocation and automatic scaling.

    Write throughput
    Write traffic is the primary driver. Higher write traffic triggers more compute resources for stable data ingestion.

    Active concurrency
    The number of active partitions and buckets determines resource requirements. More active partitions and buckets result in more parallel processing resources.

    Data scale for advanced features
    Tables with advanced features like deletion vectors or a lookup changelog producer increase computational complexity. Larger total file sizes within active partitions require more resources.

    Data row characteristics
    Extreme row sizes increase processing overhead. Whether rows are too small (many null values) or too large (long string fields), the system increases resource allocation to maintain performance.

    Resource optimization for small tables

    For small tables, the system uses a sharing mechanism to reduce resource overhead:

    When a table uses postponed bucketing (bucket = -2) and "Prioritize Latency" mode is not enabled, the system combines optimization tasks from multiple small tables into a single job, reducing overall resource consumption.

    Resource monitoring and troubleshooting

    To analyze resource consumption, navigate to Catalogs > Resource Overview > Resource Requests and view the Top Tables by CU-Hours list.

    Note

    Abnormally high resource usage for a single table is often caused by an overly fine-grained partitioning strategy, which increases concurrently active partitions and forces excessive resource allocation. Review and optimize your partitioning strategy.

Fixed resource mode

Manually specify compute resources for compaction. Suitable for stable traffic or strict cost control.

  • Configuration requirements: Minimum 2 CU.

  • Parameter settings: Customize the compaction trigger interval and bucket count.

View execution status

View the optimization execution status for the current table and configure CloudMonitor alert subscriptions through Monitor lakehouse optimization.

View rescale records

Logs bucket rescaling events for a table or specific partitions, reflecting changes in the physical storage structure. Rescaling addresses performance issues from data volume changes. Use these records to check if a table is undergoing a rescale, which prevents compaction.

View execution history

View the compaction execution history for the current table. Use these records to:

  1. Confirm task execution: Verify that background compaction tasks run correctly and prevent small file accumulation.

  2. Evaluate compaction efficiency: Compare file count and size before and after compaction to assess strategy effectiveness.

Expired snapshot cleanup

On the Storage Optimization tab, click Expired Snapshot Cleanup to configure cleanup rules and view results.

  • Configure snapshot cleanup rules

    Click Modify, set the Snapshot Retention Period (default is 1 hour), and click Save.

  • View snapshot cleanup results

    • Current snapshot count: The number of remaining snapshots.

    • Earliest snapshot information: Details of the earliest snapshot, including snapshot ID, commit time, commit type, total row count, and rows added in the commit.

Partition lifecycle management

On the Storage Optimization tab, click Partition Lifecycle to configure cleanup rules, view results, and set up storage tiering.

Partition cleanup rules

  1. Click the image switch next to Expired Partition Cleanup to enable it.

  2. Configure the following cleanup rules, then click Save.

    You can also configure these settings through table option key-value pairs.

    Parameter

    Description

    Expiration Policy

    (partition.expiration-strategy)

    You can select one of the following expiration strategies:

    • Based on last access time (access-time): Expires partitions based on their last access time.

    • Based on partition value (values-time): You can configure the partition timestamp format and pattern.

      • Timestamp format (partition.timestamp-formatter): You can configure formats such as yyyy-MM-dd, yyyyMdd, dd/MM/yyyy, and dd.MM.yyyy.

      • Timestamp pattern (partition.timestamp-pattern): By default, the first partition field is used. You can configure patterns such as $dt or $year-$month-$day.

    • Based on last update time (update-time): Expires partitions based on their last update time.

    Partition Retention Period

    (partition.expiration-time)

    Unit: days. Example: 30d. The maximum value is 999,999 days. The retention period starts based on the selected expiration strategy.

  3. (Optional) After saving, click Cleanup Rule Settings next to Modify to modify settings.

Note

To retain partitions permanently, do not configure expiration rules. The system does not clean up partition data by default.

Partition cleanup results

Click View Partitions to view the partition list, including partition name, row count, referenced files, file size, creator, storage class, last modified by, timestamps, and actions.

Storage tiering

Parameter

Description

Intelligent Tiering

imageWhen enabled, the system automatically tiers storage for all tables in the catalog based on configured lifecycle rules. Specify the strategy and rules as needed.

Note
  • If enabled at the catalog level, tables inherit the setting by default. Table-level modifications override the catalog setting and remove the inheritance indicator.

  • If not enabled at the catalog level, you can still enable it at the table level.

Tiering Strategy

  • Last access time: Evaluates rules based on the last access time of table or partition data.

  • Last update time: Evaluates rules based on the last update time of table or partition data.

Tiering Rule

Minimum storage duration requirements vary by storage class.

Configure tiering rules:

  • Transition to Infrequent Access

    • Inactivity threshold: Custom. The default is 30 days.

      Data transitions to Infrequent Access storage after this inactivity period. Compute engines can still access the data, but with reduced performance.

    • Automatically convert to Standard storage upon access: Converts a table or partition back to Standard storage when accessed.

      Note

      This feature is supported only when the tiering strategy is set to "Last access time".

  • Transition to Archive

    • Inactivity threshold: Custom. The default is 60 days.

      Data transitions to Archive storage after this inactivity period. Compute engines cannot access archived data.

    • Automatically Convert to Standard Storage upon Access: Converts a table or partition back to Standard storage when accessed.

      Note

      This feature is supported only when the tiering strategy is set to "Last access time".

  • Transition to Cold Archive

    • Inactivity threshold: Custom. The default is 180 days.

      Data transitions to Cold Archive storage after this inactivity period. Compute engines cannot access cold-archived data.

Note

Beyond intelligent storage tiering, you can manually change the storage class on the table details page. The Storage Overview page shows tiering distribution across catalogs, databases, and tables.

Orphan file cleanup

On the Storage Optimization tab, click Orphan file cleanup to trigger orphan file cleanup manually.

To enable automatic cleanup, add auto-orphan-files-clean.enabled = true to the catalog configuration. Cleaned orphan files are moved to the recycle bin (system.trash) temporarily. Adjust how long files stay in the recycle bin with the dlf.trashed-file-retained-days catalog configuration.

Manually change the storage class

  1. In the Database list, click a database name to view the table list.

  2. In the Tables list, click a table name to view its schema.

  3. Click the Table Details tab to manually change the storage class for partitioned and non-partitioned tables.

    Partitioned tables

    On the Partitions tab, you can change the storage class for partitions.

    • For partitions in the Standard, Infrequent Access, or Archive storage class:

      In the Actions column, click Modify Storage Class to change to any other storage class.

    • For partitions in the Cold Archive storage class:

      Restore the data first, then change the storage class:

      1. Click Restore and configure the Restored Copy Availability Duration. You can select multiple partitions for a batch restore.

        • Value range: An integer from 1 to 365 (unit: days).

        • Default value: 1 day.

      2. When the data enters the restored state, click Modify Storage Class in the Actions column to change the storage class.

    Non-partitioned tables

    In the Basic Information section of the table, you can modify the Storage Class.

    • For Standard, Infrequent Access, or Archive storage classes:

      Click Edit next to Storage Class to change to any other storage class.

    • For the Cold Archive storage class:

      Restore the data first, then change the storage class:

      1. Click Restore next to Storage Class and configure the Restored Copy Availability Duration.

        • Value range: An integer from 1 to 365 (unit: days).

        • Default value: 1 day.

      2. When the Storage Class changes to Cold Archive (Restored), click Edit next to Storage Class. You can then change it to any other storage class.

    Note
    • Restore time: Cold Archive supports only standard restore priority, which takes 2 to 5 hours.

    • Restored state start time: When the first Cold Archive object in a partition enters the restored state after the restore completes.

    • Restored copy availability duration: How long data remains accessible after restoration from Cold Archive. After expiration, the partition returns to the frozen state. Submit a new restore request to access it again.

    Restore procedure

    1. The object starts in the frozen state.

    2. After submitting a restore request, the object enters the restoring state. Restore time varies.

    3. After restoration completes, the object enters the restored state. For table-level storage tiering, the partition becomes accessible after all objects are restored.

      Extend the restored state by adjusting the restored copy availability duration, up to the maximum allowed for the storage class.

    4. After the restored copy availability duration expires, the object returns to the frozen state. Submit a new restore request to access it again.