Previous Topic: (Optional) Check Space Used by the TSF Database ManuallyNext Topic: Back Up the TSF Database


Calculate the TSF Data Store Size

To help you determine how much space to allocate to the Time Series Facility (TSF) data store, use this algorithm. The TSF data store refers to the allocation parameters for the zFS that houses the TSF database.

Note: For the TSF database size recommendations, see Time Series Facility Database Recommendations.

Follow these steps:

Note: This algorithm assumes a 3390 KB cylinder size.

  1. Calculate the TSF data store space that is required for an entity:
    Unique_metric_count = entityInstanceCount * metricCountInEntity
    Metric_Count_Gathered = (TIME_STORAGE_IN_DAYS*24*60*60 / METRIC_SEND_RATE)
    SPACE_REQUIRED_B = SPACE_REQUIRED_B + (Unique_metric_count * 4) * Metric_Count_Gathered
    
    entityInstanceCount

    Indicates the total number of expected instances of the entity that is reporting to the TSF Server.

    Note: An entity is an object that is defined by one or more primary key columns. A unique combination of the entity's primary key columns forms an entity instance. For example, an entity that is named CPU has primary keys LPAR and SYSPLEX. This entity has two entity instances that are named CPU_a and CPU_b. CPU_a has primary keys LPAR="LPAR11" and SYSPLEX="PLEX11." CPU_b has primary keys LPAR="LPAR31" and SYSPLEX="PLEX31."

    metricCountInEntity

    Indicates the total number of metrics in the entity.

    TIME_STORAGE_IN_DAYS

    Indicates the number of days to retain data in the TSF database. This value should be the same for all entities.

    Example: 7 days

    METRIC_SEND_RATE

    Indicates the entity-specific rate (in seconds) at which metrics are sent.

    Example: 60 seconds

    SPACE_REQUIRED_B

    Indicates the running total of the space (in bytes) that is required for each entity that you are sending to the TSF Server. For the first entity, the value is 0. For each additional entity, the value is the sum of all entity instances that you have calculated so far.

  2. Repeat step 1 for each entity that you are gathering metrics for.
  3. Calculate the total recommended size for the TSF data store:
    SPACE_REQUIRED_CYL = RoundUp (SPACE_REQUIRED_B / BYTES_PER_CYLINDER) + 124
    
    SPACE_REQUIRED_B

    Indicates the running total of the space (in bytes) that is required for each entity that you are sending to the TSF Server. For the first entity, the value is 0. For each additional entity, the value is the sum of all entity instances that you have calculated so far.

    BYTES_PER_CYLINDER

    Indicates the number of bytes per cylinder on the target DASD.

You have calculated the total space (in cylinders) that is required for the TSF database.

Example:

In this example, we assume the following information:

  1. Calculate the TSF data store space that is required for Sysview Entity 1:
    Unique_metric_count = 200*41 -> 8200
    Metric_Count_Gathered = (7*24*60*60 / 60) -> (7*24*60) -> 10080
    SPACE_REQIURED_B = 0  [no previous SPACE_REQUIRED_B value] + (8200*4) * 10080 -> 330,624,000 Bytes (~315MB)
    
  2. Calculate the TSF data store space that is required for Sysview Entity 2:
    Unique_metric_count = 20*20 -> 400
    Metric_Count_Gathered = (7*24*60*60 / 60) -> (7*24*60) -> 10080
    SPACE_REQUIRED_B = 330,624,000 [value from entity 1 calculation] + (400*4) * 10080 -> 346,752,000 Bytes (~330MB)
    
  3. Calculate the total size of the TSF data store:
    SPACE_REQUIRED_CYL = 346,752,000 [total for both entities] / 849,960 + 124 -> 531.96 -> 532 Cylinders
    

    The value of the SPACE_REQUIRED_CYL is the total space (in cylinders) that is required for the TSF data store. In this example, the TSF database requires 532 cylinders.

You have customized the TSF database to optimize database space performance.