## 4 Resource-Aware Federated Profiling Model
For instance, in a cloud-based service use case, the system initially operates with expert-set CPU and network bandwidth thresholds. However, it observes that during peak business hours, CPU usage consistently exceeds these thresholds, leading to performance bottlenecks. By dynamically adjusting the CPU threshold based on this historical data, the system can allocate more processing power during these peak hours, thereby reducing latency and enhancing user experience. This practical utility demonstrates how adaptive resource profiling can respond to fluctuating workload demands, ensuring optimal resource utilization and system performance. The client edge is discarded if the edge resources are limited. For the duration of the data streaming process, iterations are performed, and the profile is incrementally \begin{table}
\begin{tabular}{c c} \hline \hline
**Edge Resource** & **Threshold** \\ \hline CPU & 80\% \\ Memory & 70\% \\ \hline Network & 90\% \\ Sensors & 95\% \\ Storage & 80\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Resources and their suggested thresholds. updated. To minimize the overhead, only the profile updates are transmitted following the initial run and at every federated aggregation event. As time is often a deciding factor in PSN deployments, the objective of this process was to select the nodes with the fastest response times by facilitating the faster convergence of the ML algorithms with resource optimizations. 2. **Workload profiling model formulation** The EWP is executed at the edge, to determine if the edge satisfies the federation's profiling requirements. The static EWP is based on \(C_{e}\), which is the maximum computation capacity of the edge node e; \(\beta_{e}\) which is the computation cost of profiling; \(\mu_{e}\) which is the effective memory at the edge; and \(S_{e}\), which is the data size available at the edge. However, the dynamic EWP relies on resource usage monitoring process that is responsible for collecting the edge's real-time status in terms of resource utilization and performance. This process collects the CPU usage \(C_{u}\), the effective spare memory \(\mu_{u}\), and the battery level \(E_{e}\). Furthermore, this process will initiate a training model on the existing data and collect the accuracy results to measure the performance \(P_{e}\), as well as measure the training time \(T_{train}\). The results are sent back to the server for profiling. The server, specifically the FWP module collects the aforementioned parameters as well as measuring the transmission cost of the EWP message from each node e, denoted as \(EWP_{e}\). Let \(T_{delay}\) be the tolerable delay, and \(EWP_{Te}\) be the transmission cost of \(EWP_{e}\). The model considers the reputation of the edge as part of profiling evaluation. The reputation of an edge e is determined by its mobility status and its historic performance in terms of the number of previous successful model training requests using the following formula:  
\[Reputation_{e}=\sum\frac{(No\,of\,successful\,Training\,of\,e)}{(Total\,No\,of\,Requests\,to\,e)}- \begin{cases}1,&\text{if Mobile\,Node}\\ 0,&\text{if\,Stationary\,Node}\end{cases}  \tag{1}\]  
The Data Flow Rate \(DFR_{e}\) is expressed as a function of the effective distance between the edge node i and the centralized cloud to the average packet forwarding rate. The FWP module at the server will generate an aggregated profile for each edge \(EWP_{e}\) using a utility function, which calculates the weighted average of all resources' normalized quality attributes, including the static and dynamic characteristics as follows:  
\[EWP_{e}= \begin{cases}U(C_{e,\beta,e},S_{e},\mu_{e},DFR_{e},Reputation_{e}),Static \_Profile\\ U(C_{u},E_{e},P_{e},\mu_{u},T_{train},DFR_{e},Reputation_{e}),Dynamic\_Profile \end{cases}