Configure cold storage

Updated at:

LindormSearch supports hot and cold data tiering by using capacity-oriented cloud storage for cold data. Configure cold storage at the table level to reduce storage costs. Queries on cold-storage tables are slower than queries on hot storage, so cold storage is best suited for data that is written infrequently and queried rarely.

Prerequisites

Before you begin, ensure that you have:

When to use cold storage

Cold storage is a good fit when a table meets both of the following conditions:

  • Little to no write activity: the table is rarely written to.

  • Infrequent queries: the table is queried only occasionally.

If the table is still queried frequently, keep it in hot storage. Moving frequently queried data to cold storage will noticeably increase query response times.

Move a table to cold storage

Replace collection_name with the name of your table in all commands below.

  1. Enable capacity-oriented cloud storage on your Lindorm instance. For more information, see Enable cold storage.

  2. Run the RELOAD command. This helps reduce the period of time that is required to migrate cold data to cold storage.

    ./search-cli reload_collection -c collection_name
  3. Set the storage type of the table to cold storage.

    ./search-cli modify_collection -c collection_name -s COLD
  4. Trigger a major compaction to migrate data from hot storage to cold storage.

    ./search-cli major_compaction -c collection_name
  5. After the migration is complete, run the following command to release the hot storage capacity. The migration is performed in an asynchronous manner. We recommend that you wait 30 to 60 minutes before you release the hot storage capacity.

    ./search-cli reload_collection -c collection_name