This topic describes how to enable the hot and cold-tiered storage feature for a Logstore. This feature helps you reduce the costs of long-term storage without impacts on the queries, analysis, visualization, alerting, shipping, and processing of the log data in the Logstore. The fee that you must pay for the storage of log data in the cold storage tier is calculated based on specific pricing standards. You are not charged for the conversion from hot data to cold data.

Background information

Log Service provides two storage tiers: the hot storage tier and the cold storage tier.
  • You can enable the hot and cold-tiered storage feature for a Logstore on the Logstore Attributes page of the Logstore in the Log Service console. After you enable this feature, hot data is converted to cold data.
  • After you enable the hot and cold-tiered storage feature for a Logstore, you can modify the Hot Data Retention Period parameter on the Logstore Attributes page of the Logstore in the Log Service console to prolong the retention period of hot data. This way, cold data can be converted back to hot data.

Compared with hot storage, cold storage features compromised query and analysis performance, but the other features such as alerting, shipping, transformation, and visualization remain unchanged. The following table describes the major differences between hot storage and cold storage.

Item Hot storage Cold storage
Scenario Log data is frequently queried. Log data is not frequently queried.
Query and analysis performance Log data can be queried and analyzed at high speeds, and query and analysis results can be returned in seconds. Log data is queried and analyzed at low speeds, and the query and analysis results are returned at a latency of 10 seconds.
Query and analysis fee
  • If the Logstore uses Standard SQL, you are not charged for query or analysis operations.
  • If the Logstore uses Dedicated SQL, you are charged for query and analysis operations. For more information, see Enable Dedicated SQL.
  • If the Logstore uses Standard SQL, you are not charged for query or analysis operations.
  • If the Logstore uses Dedicated SQL, you are charged for query and analysis operations. For more information, see Enable Dedicated SQL.
Price USD 0.002875 per GB per day. USD 0.000762 per GB per day.

Enable the hot and cold-tiered storage feature

  1. Log on to the Log Service console.
  2. In the Projects section, click the name of the project that you want to view.
  3. Choose Log Storage > Logstores. On the Logstores tab, find the Logstore for which you want to enable the hot and cold-tiered storage feature, click the Logstore icon, and then select Modify.
  4. On the Logstore Attributes page, click Modify.
  5. Enable the hot and cold-tiered storage feature.
    Cold storage

    The following table describes the parameters that you must specify if you want to enable the hot and cold-tiered storage feature. For more information about the attributes of a Logstore, see Create a Logstore.

    Parameter Description
    Data Retention Period The period of time for which you want to retain the log data in the Logstore. Valid values: 1 to 3000. Unit: days. Log Service automatically deletes log data that is stored for longer than the specified data retention period.
    Notice If you shorten the data retention period, the new retention period takes effect after 1 hour. Then, Log Service deletes data based on the new retention period. However, the data volume that is displayed on the Storage Size(Log) card on the homepage of the Log Service console is updated the next day. For example, after you change the data retention period from five days to one day, Log Service starts to delete the log data of the previous four days after 1 hour.
    Hot and Cold-Tiered Storage If you turn on Hot and Cold-Tiered Storage, the hot and cold-tiered storage feature is enabled.
    Hot Data Retention Period The period of time for which you want to retain log data in the hot storage tier of the Logstore. The minimum value of this parameter is 30. Valid values: 30 to 3000. Unit: days.

    Hot data that is stored for longer than the period of time specified by the Hot Data Retention Period parameter is converted to cold data.

    Notice
    • After you modify the Hot Data Retention Period parameter, Log Service starts to convert hot data to cold data based on the new retention period after 1 hour. For example, after you change the retention period of hot data from 30 days to 40 days, Log Service starts to convert cold data back to hot data after 1 hour.
    • The value of the Hot Data Retention Period parameter must be less than the value of the Data Retention Period parameter.
  6. Click Save.