This file has been truncated. show original
# Capacity And Utilization
1. A capture request is kicked off by the schedule worker every so often (configurable, 10 minutes with a 50 minute threshold).
1. The capture request finds all VMs and Hosts (and Storages, but those are different) enabled for capture (configurable).
1. For each target it then queues up a capture.
1. A collector worker will pick up one of these work items, collect the data since the last capture, and write new records in the metrics table.
1. Then the worker queues up a rollup (explained below).
1. A processor worker will pick up one of these rollup work items and queue up ANOTHER rollup for the next stage of the rollup chain.
1. This continues until we hit the end of the chain.
After enabling the Capacity & Utilization Collector Role, data collection begins immediately. However, the first collection begins 5 minutes after the CFME Server is started, and every 10 minutes after that. Therefore, the longest the collection will take after enabling the Capacity & Utilization Collector CFME Server Role is 10 minutes. The first collection from a particular management system may take a few minutes since CFME is gathering data points going one month back in time
There are two types of rollups, **time-based** and **infrastructure-based**.
* **Time-based** rollups go from realtime → hourly → daily.
* **Infrastructure-based** rollups for hourly go from `Vm` → `Host` → `EmsCluster` → `ExtManagementSystem` → `MiqRegion` (and maybe to `MiqEnterprise`?).
Say we do a capture on a VM and we get back data with timestamps between 4:05 and 4:15. This would cause records to be written in the metrics for each interval. Then, it would put a rollup on the queue for that VM for the 4:00 hour *(time-based)*. A processor worker will pick up that queue item, gather all of the real-time records for that VM for the 4:00 hour, and write a rollup hourly record for that VM. Then it will queue up 2 more rollups. One rollup is for the parent Host of that VM for the 4:00 hour *(infrastructure-based)*, and another is for that VM for the day *(time-based)*.