Forum Discussion
CPU data, control and analytics plane utilization
When we execute a GET request to https://<BIG-IP-ADDRESS>/mgmt/tm/sys/host-info, the BIG-IP returns the information in JSON format.
I had created a Python script that wasn't well formatted, but after adjusting a few things using AI, it seems to be working well now.
In the case of the .py script, I am separating even and odd CPUs in an attempt to visualize the data plane (even CPU) and control plane (odd CPU).
If it helps, here is the script.
Hi,
Thanks for the answer. Given the figure below, the average of odd-numbered CPUs represents the orange line (Control Plane), and the average of even-numbered CPUs represents the Data Plane, am I correct? What about Analysis Plane and System Average?
By the way, could you share the script or provide a link to access it?
Regards
- welinton_trigueiroNov 08, 2024Cirrus
Each CPU core is designated as data, control, or analytics, with all usage assigned to the core's designated category. Each even-numbered core is designated as a data plane, each odd-numbered core as a control plane, and the highest odd-numbered core as an analytics plane.
Analytics plane-related processes are typically pinned to the highest odd-numbered core, and no control or analytics processes have access to the even-numbered cores. The processes pinned to the analytics plane usually consume all available CPU cycles when running, which is why they are assigned to a single specific core.
This division occurs when the CPU supports Hyper-Threading Technology (HT Technology). Overview of the HTSplit feature - https://my.f5.com/manage/s/article/K23505424
The BIG-IP VE system does not support this feature on generic hypervisors such as VMware ESX/i, where each vCPU will be allocated one TMM process. https://my.f5.com/manage/s/article/K15468#tmsh
If you are seeing control plane and data plane CPU statistics in the dashboard, this is related to bug I id 969329 - https://my.f5.com/manage/s/article/K000132982
here is the script:
import requests from requests.auth import HTTPBasicAuth from tabulate import tabulate import json # BIG-IP BIGIP_ADDRESS = "192.168.1.10" USERNAME = "admin" PASSWORD = "admin" # disable warnings de SSL requests.packages.urllib3.disable_warnings() def get_cpu_stats(): url = f"https://{BIGIP_ADDRESS}/mgmt/tm/sys/host-info" response = requests.get(url, auth=HTTPBasicAuth(USERNAME, PASSWORD), verify=False) if response.status_code == 200: data = response.json() cpu_info_path = data.get("entries", {}).get("https://localhost/mgmt/tm/sys/host-info/0", {}).get("nestedStats", {}).get("entries", {}).get("https://localhost/mgmt/tm/sys/hostInfo/0/cpuInfo", {}).get("nestedStats", {}).get("entries", {}) odd_cpus = [] even_cpus = [] if cpu_info_path: for cpu_key, stats in cpu_info_path.items(): cpu_id = stats["nestedStats"]["entries"].get("cpuId", {}).get("value") one_min_usage = stats["nestedStats"]["entries"].get("oneMinAvgUser", {}).get("value", "N/A") five_min_usage = stats["nestedStats"]["entries"].get("fiveMinAvgUser", {}).get("value", "N/A") if cpu_id % 2 == 0: even_cpus.append([f"cpu{cpu_id}", one_min_usage, five_min_usage]) else: odd_cpus.append([f"cpu{cpu_id}", one_min_usage, five_min_usage]) print("\nTable of Even CPUs:") print(tabulate(even_cpus, headers=["CPU", "1 Min Usage (%)", "5 Min Usage (%)"], tablefmt="pretty")) print("\nTable of Odd CPUs:") print(tabulate(odd_cpus, headers=["CPU", "1 Min Usage (%)", "5 Min Usage (%)"], tablefmt="pretty")) else: print("Unable to find CPU information in the returned JSON.") else: print(f"Failed to retrieve data: {response.status_code} - {response.text}") get_cpu_stats()
- welinton_trigueiroNov 08, 2024Cirrus
Each CPU core is designated as data, control, or analytics, with all usage assigned to the core's designated category. Each even-numbered core is designated as a data plane, each odd-numbered core as a control plane, and the highest odd-numbered core as an analytics plane.
Analytics plane-related processes are typically pinned to the highest odd-numbered core, and no control or analytics processes have access to the even-numbered cores. The processes pinned to the analytics plane usually consume all available CPU cycles when running, which is why they are assigned to a single specific core.
This division occurs when the CPU supports Hyper-Threading Technology (HT Technology). Overview of the HTSplit feature - https://my.f5.com/manage/s/article/K23505424
The BIG-IP VE system does not support this feature on generic hypervisors such as VMware ESX/i, where each vCPU will be allocated one TMM process. https://my.f5.com/manage/s/article/K15468#tmsh
If you are seeing control plane and data plane CPU statistics in the dashboard, this is related to bug I id 969329 - https://my.f5.com/manage/s/article/K000132982
Here is the script:
import requests from requests.auth import HTTPBasicAuth from tabulate import tabulate import json # BIG-IP BIGIP_ADDRESS = "192.168.1.19" USERNAME = "admin" PASSWORD = "admin" # disable warnings de SSL requests.packages.urllib3.disable_warnings() def get_cpu_stats(): url = f"https://{BIGIP_ADDRESS}/mgmt/tm/sys/host-info" response = requests.get(url, auth=HTTPBasicAuth(USERNAME, PASSWORD), verify=False) if response.status_code == 200: data = response.json() cpu_info_path = data.get("entries", {}).get("https://localhost/mgmt/tm/sys/host-info/0", {}).get("nestedStats", {}).get("entries", {}).get("https://localhost/mgmt/tm/sys/hostInfo/0/cpuInfo", {}).get("nestedStats", {}).get("entries", {}) odd_cpus = [] even_cpus = [] if cpu_info_path: for cpu_key, stats in cpu_info_path.items(): cpu_id = stats["nestedStats"]["entries"].get("cpuId", {}).get("value") one_min_usage = stats["nestedStats"]["entries"].get("oneMinAvgUser", {}).get("value", "N/A") five_min_usage = stats["nestedStats"]["entries"].get("fiveMinAvgUser", {}).get("value", "N/A") if cpu_id % 2 == 0: even_cpus.append([f"cpu{cpu_id}", one_min_usage, five_min_usage]) else: odd_cpus.append([f"cpu{cpu_id}", one_min_usage, five_min_usage]) print("\nTable of Even CPUs:") print(tabulate(even_cpus, headers=["CPU", "1 Min Usage (%)", "5 Min Usage (%)"], tablefmt="pretty")) print("\nTable of Odd CPUs:") print(tabulate(odd_cpus, headers=["CPU", "1 Min Usage (%)", "5 Min Usage (%)"], tablefmt="pretty")) else: print("Unable to find CPU information in the returned JSON.") else: print(f"Failed to retrieve data: {response.status_code} - {response.text}") get_cpu_stats()
- welinton_trigueiroNov 08, 2024Cirrus
Each CPU core is designated as data, control, or analytics, with all usage assigned to the core's designated category. Each even-numbered core is designated as a data plane, each odd-numbered core as a control plane, and the highest odd-numbered core as an analytics plane.
Analytics plane-related processes are typically pinned to the highest odd-numbered core, and no control or analytics processes have access to the even-numbered cores. The processes pinned to the analytics plane usually consume all available CPU cycles when running, which is why they are assigned to a single specific core.
This division occurs when the CPU supports Hyper-Threading Technology (HT Technology). Overview of the HTSplit feature - https://my.f5.com/manage/s/article/K23505424
The BIG-IP VE system does not support this feature on generic hypervisors such as VMware ESX/i, where each vCPU will be allocated one TMM process. https://my.f5.com/manage/s/article/K15468#tmsh
If you are seeing control plane and data plane CPU statistics in the dashboard, this is related to bug I id 969329 - https://my.f5.com/manage/s/article/K000132982
For some reason, I’m unable to upload the .zip file here in the post. Here’s the link with the script.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com