Application Component Placement and Resource Optimization in Computing Continua
Abstract
This repository contains the appendix and implementation files for the paper “Application Component Placement and Resource Optimization in Computing Continua,” accepted for publication in IEEE Transactions on Services Computing, 2025.
Full text
JOURNAL OF L A T EX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1 Supplementary Appendix for ”Application Component Placement and Resource Optimization in Computing Continua” Hamta Sedghani, Mauro Passacantando, Danilo Ardagna F INTRODUCTION This document provides supplementary material for the paper “Application Component Placement and Resource Optimization in Computing Continua”, submitted in in IEEE Transactions on Service Computing. Only supporting materials are included here; the main text is omitted in accordance with IEEE copyright policy. In the following subsections, we present the theorem proofs, the experimental setup tables, and the results for components and paths response times, edge energy consumption, and the ANCOVA test. Proofs of the theorems We provide the proofs of the theorems stated in Sections 4, 5 and 6, and we outline the idea behind the correctness of Algorithm 1. We recall that Theorems 4.1 and 5.1 state the non-convexity of constraints (P1g) in problem (P1) and convexity of problem (P2), respectively. Theorem 6.1 investigates all possible conditions related to the global constraint Pand if the problem is feasible, it provides an optimal number of additional instances across all layers for a specific resource partitioning. Proof of Theorem 4.1 Proof. Recall that the global constraint (P1g) has a term that contains the product of two binary decision variables: f(x)= X i,k2P: i6=k ik g(x),where g(x)= X j,l2J, j6=l Bjlxijxkl. The first order partial derivatives of fwith respect to the variables xij are @f @xij =X i,k2P: i6=k ik 1 g(x)2 @g(x) @xij , where @g(x) @xij =X l2J, l6=j Bjlxkl, thus @f @xij =X i,k2P: i6=k ik 1 g(x)2X l2J, l6=j Bjlxkl •H. Sedghani and D. Ardagna are with Politecnico di Milano. Milan, Italy. Email: {name.lastname}@polimi.it (Corresponding author: Hamta Sedghani, Email: [email protected]) •M. Passacantando is with University of Milano-Bicocca, Milan, Italy, Email: [email protected]. The second order partial derivatives of fare @2f @xij@xkl =@ @xkl 0 B B @X i,k2P: i6=k ik 1 g(x)2X l2J, l6=j Bjlxkl1 C C A . The first term 1 g(x)2involves g(x), which is the sum of bilinear terms; hence its partial derivative with respect to xkl is @ @xkl ✓1 g(x)2◆=21 g(x)3 @g(x) @xkl . The second term Pl2J, l6=j Bjlxkl is linear, so its partial derivative with respect to xkl is @ @xkl 0 B B @X l2J, l6=j Bjlxkl1 C C A =Bjl. Therefore, we get @2f @xij @xkl =X i,k2P: i6=k ik 2 6 6 4 2 g(x)3X l2J, l6=j Bjlxkl X m2J, m6=k Bjmxil Bjl g(x)2 3 7 7 5 . The Hessian matrix above is indefinite due to the presence of mixed second-order partial derivatives involving products of the decision variables xijxkl. Hence, the global constraint (P1g) is non-convex. Proof of Theorem 5.1 Proof. To prove that problem (P2) is convex, it is sufficient to prove that the function f(nj)= nj njLj is convex when nj>L j. The first derivative of fis f0(nj)=Lj (njLj)2, while the second derivative of fis f00(nj)= 2Lj (njLj)3>0, thus fis convex. Proof of Theorem 6.1 Proof. We remark that X j2JP (NCj+n0 j)ZPj NCj+n0 jLjX j2JP (NCj+N0 j)ZPj NCj+N0 jLj
JOURNAL OF L A T EX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 2 Scenario #Components #Computational layers Bimodal trace range (req/s) #Local and global constraints Activation function Neurons per layer #Training iterations 1 5 Edge: 1, Cloud: 2 [25, 85] 3, 3 [ReLU, ReLU] [256, 128] 600 2 7 Edge: 1, Cloud: 3 [45, 105] 4, 4 [ReLU, ReLU] [512, 256] 600 3 10 Edge: 2, Cloud: 3 [20, 170] 5, 5 [ReLU, ReLU, ReLU] [512, 256, 128] 800 4 15 Edge: 3, Cloud: 7 [20, 170] 7, 7 [ReLU, ReLU, ReLU] [1024, 512, 256] 800 Table 1: Parameters of scalability analysis. Scenario Edge layers Edge power model Cloud device PCpk PCid 1 Raspberry Pi 1B P=0.1220 ⇥U+1.3143 Cloud-1 60 24 Cloud-2 117 86 2 Raspberry Pi 1B P=0.1220 ⇥U+1.3143 Cloud-1 60 24 Cloud-2 117 86 Cloud-3 135 93 3 Raspberry Pi 1B P=0.1220 ⇥U+1.3143 Cloud-1 60 24 Raspberry Pi 2B P=1.1488 ⇥U+1.2903 Cloud-2 117 86 Cloud-3 135 93 4 Raspberry Pi 1B P=0.1220 ⇥U+1.3143 Cloud-1 60 24 Raspberry Pi 2B P=1.1488 ⇥U+1.2903 Cloud-2 117 86 Raspberry Pi 4B P=3.4842 ⇥U+2.2434 Cloud-3 135 93 Cloud-4 117 75 Cloud-5 169 105 Cloud-6 276 164 Cloud-7 352 216 Table 2: Edge and cloud devices per scenario with corresponding linear power-consumption models. The edge power model is adapted from [1], and the parameters PCpk and PCid (see the linear model in (14)) are derived from [2]. holds for any n0 j2[0,N0 j]. Hence, if P j2JP (NCj+N0 j)ZPj NCj+N0 jLj> THPholds, then constraint (P3b) cannot be satisfied and problem (P3) is infeasible. Problem (P3) is convex because its objective function is linear and constraint (P3b) is convex. Moreover, it admits an optimal solution and the Slater constraint qualification holds. Hence, problem (P3) is equivalent to solve the corresponding KKT system: cjµLjZPj (NCj+n0 jLj)2⌫j+j=0 8j2J P µ2 4X j2J (NCj+n0 j)ZPj NCj+n0 jLjTHP3 5=0 ⌫jn0 j=0 8j2J P j(N0 jn0 j)=0 8j2J P X j2J (NCj+n0 j)ZPj NCj+n0 jLjTHP 0n0 jN0 j8j2J P µ0,⌫ j0, j08j2J P If X j2JP NCjZPj NCjLjTHP, then the optimal solution is n0⇤ j=0for all j2J P, with µ=j=0and ⌫j=cjfor any j2J P. If X j2JP NCjZPj NCjLj >TH P, then µ>0. We define the following subsets of indices related to the optimal solution n0⇤: J0 P:= {j2J P:n0⇤ j=0}, J> P:= {j2J P:0<n 0⇤ j<N 0 j}, J= P:= {j2J P:n0⇤ j=N0 j}. For any j2J0 P, one has n0⇤ j=0,j=0and ⌫j0, hence pµNCjLj pLjZPj/cj .(1) For any j2J> Pwe have ⌫j=j=0, hence n0⇤ j=LjNCj+pµqLjZPj/cj.(2) Moreover, 0<n 0⇤ j<N 0 jimplies NCjLj pLjZPj/cj <pµ<NCj+N0 jLj pLjZPj/cj .(3) For any j2J = P, one has n0⇤ j=N0 j,⌫j=0and j0, hence pµNCj+N0 jLj pLjZPj/cj .(4) Since µ>0, we get THP=X j2JP (NCj+n0 j)ZPj NCj+n0 jLj =X j2J> P Lj+pµpLjZPj/cj pµpLjZPj/cj ZPj +X j2J0 P NCjZPj NCjLj +X j2J= P (NCj+N0 j)ZPj NCj+N0 jLj =X j2J> P ZPj +1 pµX j2J> P pLjZPjcj+X j2J0 P NCjZPj NCjLj +X j2J= P (NCj+N0 j)ZPj NCj+N0 jLj Hence, pµ= P j2J> P qLjZPjcj TH PP j2J> P ZPj P j2J0 P NCjZPj NCjLjP j2J= P (NCj+N0 j)ZPj NCj+N0 jLj := ↵. The definition of the sets J0 P,J> P,J= Pand (2) imply that the optimal solution n0⇤ is given by formula (20). Finally, (1), (3) and (4) guarantee that ↵satisfies conditions (22)–(24) (in the main content). Optimality of Algorithm 1 The conditions (22)–(24) in Theorem 6.1 guarantee that the indices corresponding to the highest values of jbelong
JOURNAL OF L A T EX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 3 to the set J0 P, the indices corresponding to the lowest values of jbelong to the set J= P, while the remaining indices belong to J> P. For this reason, in Algorithm 1 we set J= P equal to the set of indices corresponding to the hsmallest values of j(with h2{0,...,|JP|}), J0 Pequal to the set of indices corresponding to the khighest values of j(with k2{0,...,|JP|}), and J> Pequal to the set of remaining indices. Since the optimal partition exists, the double for loop in Algorithm 1 allows finding it after at most O(|JP|2)iterations. Figure 1 shows an example of the optimal partition {J0 P,J> P,J= P}based on the position of ↵ with respect to the values of jand j. 𝛽1𝛽2𝛾1𝛼𝛽3𝛾3𝛾2 J= 𝑃={1}J> 𝑃={2}J0 𝑃 ={3} 1 Figure 1: Example of optimal partition {J0 P,J> P,J= P}. System Parameters |I| {5, 7, 10, 15} Dij Uniform distribution in [0.1, 0.5] s cjUniform distribution in [0.5, 1] $/h NjUniform distribution in [50, 100] Agent Parameters Episode length 360 steps lr decaying from 0.01 to 0.001 during 3000000 steps 0.1 0.7 train batch size 4096 sgd minibatch size 512 Table 3: Simulation parameters Experimental setup parameters Table 1 and Table 2 present the detailed system specifications used in the scalability analysis and the power consumption parameters, while Table 3 summarizes the key parameters employed in the numerical analyses. Comparison of component and path response times: CF vs. BARON Figures 2a and 2b show the response times (RT) of components and paths for a single instance of a small system with four components and two resources (see Section 8.2), obtained using the KKT-based closed-form solution (CF) and BARON, respectively, along with their corresponding thresholds. The results demonstrate near-identical behavior, with response times virtually identical between the two methods. Edge energy consumption This section analyzes the edge-only energy consumption across all methods. As shown in Figure 3a, the comparison among our approach, BARON [3], and SPACE4AI-D [4] (corresponding to the experiments in Section 8.3.1) reveals greater variability among all methods. Since this metric is not explicitly optimized, the differences arise from placement decisions driven by the total energy objective (which is proportional to the total cost) and by the need to offload edge layers that become bottlenecks under higher loads. Nevertheless, PPO AB often consumes less edge energy than competitors, further confirming the efficiency of its resource allocation policy. Finally, the disconnected lines correspond to cases where a method failed to find feasible solutions in any of the five random instances, reflecting their Text Optimal number of VMs (CF) -0.5 -1 T e xt Te xt T ex t Diff in Opt_n of VMs (CF -BARON) -0.25 -0.5 -0.75 -1 -1.25 Text Text Text Text Cost Cost ratio (%) (BARON - CF)/CF Cost RT of LC (s) RT of GC (s) Response Time (RT) of LCs and GCs by CF. λ RT of LC (s) RT of GC (s) Response Time (RT) of LCs and GCs by solver. λ (a) Optimal number of VMs (b) Cost of VMs and cost ratio (c) Response Time (RT) of LCs and GCs by CF (d) Response Time (RT) of LCs and GCs by solver (c) Response Time (RT) of LCs and GCs by CF (c) Response Time (RT) of LCs and GCs by CF Text Text Text Text (a) Diff in Opt_n of VMs (CF -BARON) λ [req/s] (a) Diff in Opt_n of VMs (CF -BARON) Opt_n difference (b) Cost of VMs and cost ratio - λ [req/s] (b) Cost of VMs and cost ratio (b) Cost of VMs and cost ratio (b) Cost of VMs and cost ratio λ [req/s] (c) Response Time (RT) of LCs and GCs by CF λ [req/s] (d) Response Time (RT) of LCs and GCs by solver Text Te x t - Text -1 1 (a) Response Time (RT) of LCs and GCs by (b) Response Time (RT) of LCs and GCs by solver Figure 2: Comparison of KKT-based closed form (CF) and BARON, single instance of a small system with four components and two resources. scalability limitations. Similarly, Figure 3b compares our approach with PPO DLX [5] and min k cut (corresponding to the experiments in Section 8.3.2). The min k cut method shows the highest edge energy consumption, as its focus on minimizing communication overhead places more components on edge layers, increasing the number of active instances and thus overall energy usage. However, it fails under peak workload conditions in all scenarios, as assigning more components to the edge prevents it from satisfying the QoS constraints. Statistical Analysis To evaluate the effectiveness of PPO AB in minimizing operational costs, we conducted a statistical comparison against four baseline methods: BARON, SPACE4AID, PPO DLX and min k cut. The analysis was performed across four representative scenarios characterized by increasing system complexity (5, 7, 10, and 15 components and five random instances for each scenario as mentioned in Section 8.1). Figure 4a illustrates the cost difference between PPO AB and the two baselines, BARON, SPACE4AI-D, across workloads for each scenario. Each line represents the mean cost difference over five instances, with the shaded region indicating the standard deviation. Positive values indicate that PPO AB outperformed the respective method. Notably, the shaded regions are narrower in the more complex scenarios (10 and 15 components), particularly at higher workload levels. This reduction in shading does not indicate lower variability but is instead due to a decrease in the number of available data points. Specifically, instances where a baseline method failed to produce a feasible solution were excluded from the analysis. For example, in the 15-component scenario, SPACE4AI-D was unable to find feasible solutions for any instances with workloads above 147, resulting in an early termination of its cost curve. Markers in the plots denote workload levels at which a method failed to find feasible solutions in at least four out of five instances. Figure 4b illustrates the cost difference between PPO AB and two additional baseline methods, PPO DLX and min k cut, across varying workload levels for each scenario. As system complexity increases, both PPO DLX and min k cut exhibit a growing number of infeasible cases, especially under high workloads. These frequent infeasibilities, particularly visible for min k cut in the 15-component scenario (where PPO DLX is omitted due to its prohibitively large action space, which renders it inapplicable), underscore the limitations of these baselines in maintaining QoS constraints, whereas PPO AB consistently produces feasible and cost-effective solutions. To quantify the statistical significance of these differences, we performed a robust ANCOVA (Analysis of Co-
JOURNAL OF L A T EX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 4 Energy consumption (KJ) 5 Components Timesteps 7 Components Timesteps Timesteps 10 Components 15 Components Timesteps (a) Our full framework vs BARON and SPACE4AI-D. 5 Components Timesteps Energy consumption (KJ) 7 Components Timesteps Timesteps 10 Components 15 Components Timesteps (b) Our full framework vs PPO DLX and min k cut. Figure 3: Edge energy consumption among our full framework, BARON, SPACE4AI-D, PPO DLX and min k cut average of 5 random instances. 168 84 1 6 8 168 1 68 CostDiff vs PPO_AB 5 Components 168 Text -20 103 7 Components 168 168 Te xt 10 Components 168 168 Te xt 15 Components λ λ λ λ [req/s] [req/s] [req/s] [req/s] (a) BARON and SPACE4AI-D. Text Text 39 39 Text 59 Text 98 0 5 Components 7 Components 10 Components 15 Components CostDiff vs PPO_AB (b) PPO DLX and min k cut. Figure 4: Cost difference (OtherMethod PPO AB) across workloads. Lines show the mean over 5 instances, shaded areas indicate standard deviation. Markers highlight workloads where the methods failed to find a feasible solution in at least 4 out of 5 instances. variance) test [6], treating workload as a covariate. Robust ANCOVA estimates the difference in average cost between methods across varying workload thresholds, reporting both confidence intervals (CIs) and corresponding p-values. A CI, such as [a, b]with a p-value of 0.01, implies that there is a 99% level of confidence that the true cost difference lies within that range. Crucially, when the CI excludes zero—particularly at conventional significance levels (e.g., p<0.05 or p<0.01)—this indicates a statistically significant difference in performance between the methods being compared. The results are summarized in Table 4 and Table 5, which report the estimated cost difference between PPO AB and each baseline at five systematically chosen representative workload levels. These points are selected internally by the WRS2 package to summarize the covariate (in this case, Workload) and facilitate interpretation. The tables also report the corresponding confidence intervals and p-values. In Table 4, the ANCOVA results confirm that PPO AB consistently achieves lower or competitive costs compared to BARON and SPACE4AI-D. For the most complex scenario (15 components), the differences are not only larger but also statistically significant across all workload levels (pvalue < 0.001). In simpler scenarios (7 and 10 components), PPO AB performs comparably to SPACE4AI-D, with differences becoming significant in the higher workload ranges. Against BARON, PPO AB outperforms even in lowcomplexity settings (7 and 10 components). These results demonstrate the robustness and scalability of PPO AB, particularly in scenarios where traditional optimization methods struggle to find feasible or cost-effective solutions. Table 5 presents a detailed statistical analysis of the cost differences between PPO AB and the two baselines, PPO DLX and min k cut. Although PPO AB consistently achieves lower costs than PPO DLX and min k cut across all scenarios (as indicated by the positive Diff values), the differences are not always statistically significant according to the ANCOVA test. This can be attributed to two factors. First, the assumption of homogeneous resources with identical costs across all layers—necessitated by the
JOURNAL OF L A T EX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 5 Scenario [req/s]vs BARON vs SPACE4AI-D Diff CI p-value Diff CI p-value 5 Comps 25.28 -1.0449 [-2.2522, 0.1624] 0.0263 -0.5893 [-1.8452, 0.6667] 0.2281 30.21 -1.0798 [-2.5185, 0.3588] 0.0539 -0.5657 [-2.0326, 0.9012] 0.3218 43.42 -1.0092 [-2.8078, 0.7893] 0.1494 -0.3102 [-2.1477, 1.5272] 0.6644 57.48 -0.9090 [-3.3127, 1.4947] 0.3313 0.1304 [-2.3640, 2.6248] 0.8931 84.08 -2.4320 [-7.5582, 2.6941] 0.2234 -0.8288 [-6.0628, 4.4052] 0.6842 7 Comps 45.31 4.3040 [2.9290, 5.6789] 0.0000 1.6518 [0.5000, 2.8036] 0.0002 51.35 5.0379 [3.3083, 6.7675] 0.0000 1.5887 [0.1554, 3.0219] 0.0045 63.53 6.4227 [4.2770, 8.5684] 0.0000 2.1264 [0.2715, 3.9812] 0.0033 78.10 9.9806 [6.5130,13.4482] 0.0000 4.6482 [1.9023, 7.3941] 0.0000 103.94 43.7517 [33.3007,54.2026] 0.0000 5.5943 [0.2534,10.9353] 0.0075 10 Comps 20.64 8.9085 [4.3870, 13.4299] 0.0000 2.9190 [-0.9622, 6.8002] 0.0535 31.84 11.8843 [6.2591, 17.5095] 0.0000 3.4593 [-1.1473, 8.0659] 0.0538 65.81 16.4093 [8.8757, 23.9429] 0.0000 4.3530 [-1.6157,10.3216] 0.0611 100.55 43.3407 [29.3800,57.3014] 0.0000 9.7334 [2.3599,17.1070] 0.0007 168.02 35.0044 [18.8584,51.1505] 0.0000 31.5321 [16.2192,46.8449] 0.0000 15 Comps 20.64 263.1518 [227.5357,298.7680] 0.0000 31.3049 [26.5777,36.0322] 0.0000 31.84 255.0906 [222.9551,287.2261] 0.0000 36.0979 [30.2831,41.9128] 0.0000 65.81 238.3058 [210.8436,265.7679] 0.0000 45.7484 [38.3317,53.1650] 0.0000 100.55 207.6311 [176.1996,239.0627] 0.0000 107.8733 [89.4390,126.3075] 0.0000 168.02 288.4801 [254.5853,322.3748] 0.0000 240.6555 [235.3294,245.9815] 0.0000 Table 4: ANCOVA results comparing PPO_AB vs BARON and SPACE4AI-D across scenarios. Differences represent the cost of comparator minus the cost of PPO AB. Scenario [req/s]vs PPO DLX vs min k cut Diff CI p-value Diff CI p-value 5 Comps 1.27 0.8537 [-1.2796, 2.9870] 0.3040 0.5033 [-1.6490, 2.6556] 0.5480 9.02 1.0066 [-1.5890, 3.6023] 0.3191 0.6590 [-1.9307, 3.2487] 0.5133 31.17 1.2395 [-1.9654, 4.4444] 0.3204 0.9533 [-2.2780, 4.1846] 0.4484 53.60 1.9389 [-1.6091, 5.4870] 0.1605 16.2284 [10.6286, 21.8283] 0.0000 98.83 6.9412 [3.3377, 10.5447] 0.0000 9.9421 [7.1890, 12.6952] 0.0000 7 Comps 1.12 1.1827 [-1.4814, 3.8468] 0.2542 0.4523 [-2.2197, 3.1243] 0.6636 5.82 1.2136 [-2.0682, 4.4954] 0.3421 0.5379 [-2.7578, 3.8336] 0.6750 18.98 1.2456 [-2.8316, 5.3229] 0.4325 0.6664 [-3.4205, 4.7533] 0.6752 32.35 1.4139 [-2.6859, 5.5137] 0.3757 1.6147 [-2.9485, 6.1778] 0.3634 59.30 17.2312 [10.6671, 23.7954] 0.0000 42.7992 [39.8231, 45.7753] 0.0000 10 Comps 1.05 1.7948 [-0.4168, 4.0065] 0.0372 0.7322 [-1.4751, 2.9394] 0.3941 4.22 1.8080 [-0.8424, 4.4584] 0.0798 0.7938 [-1.8653, 3.4530] 0.4431 12.89 1.8666 [-1.4527, 5.1859] 0.1486 0.9414 [-2.3817, 4.2645] 0.4667 21.73 2.7089 [-1.3037, 6.7215] 0.0830 1.3716 [-2.4159, 5.1591] 0.3522 39.53 43.6529 [35.0983, 52.2075] 0.0000 59.6729 [50.1918, 69.1540] 0.0000 15 Comps 1.05 — — — 2.2154 [-4.0022, 8.4330] 0.3600 4.22 — — — 2.2592 [-5.4602, 9.9785] 0.4521 12.89 — — — 2.7635 [-7.0413,12.5684] 0.4689 21.73 — — — 101.2875 [75.1686,127.4065] 0.0000 39.53 — — — 176.6480 [165.8421,187.4539] 0.0000 Table 5: ANCOVA results comparing PPO_AB vs PPO_DLX and min_k_cut across scenarios. Differences represent the cost of comparator minus the cost of PPO AB. inability of the alternative methods to handle heterogeneous environments (see Section 8.3.2)—diminishes the influence of component placement decisions, thereby narrowing the cost differentials between methods. Second and most importantly, ANCOVA only considers feasible solutions — that is, solutions that meet the QoS constraints. In contrast, the PPO DLX and min k cut methods often incur substantial QoS violations, particularly in large-scale or high-workload scenarios. These infeasible runs are excluded from the ANCOVA analysis, meaning the comparison is based only on their best-performing (feasible) instances. Consequently, the ANCOVA test underestimates the practical advantage of PPO AB, which consistently yields feasible solutions with significantly no violations. In real deployment scenarios, where feasibility is essential, PPO AB demonstrates clear superiority despite conservative statistical significance in some test cases. REFERENCES [1] H. Kanso et al., “Automated power modeling of computing devices: Implementation and use case for raspberry pis,” Sustainable Computing: Informatics and Systems, vol. 37, p. 100 837, 2023. [2] S. P. E. C. (SPEC), Specpower ssj2008 results, https://www.spec. org/power ssj2008/results/, 2025. [3] MINLP:BARON, https://minlp.com/baron-solver, 2025. [4] H. Sedghani et al., “SPACE4AI-D: A Design-Time Tool for AI Applications Resource Selection in Computing Continua,” IEEE Trans. on Services Computing, vol. 17, no. 6, pp. 4324–4339, 2024. [5] E. Paraskevoulakou et al., “Enhancing cloud-based application component placement with ai-driven operations,” in 2024 IEEE 14th CCWC, 2024, pp. 0687–0694. [6] P. Mair et al., “Robust statistical methods in R using the WRS2 package,” Behavior Research Methods, vol. 52, pp. 464–488, 2020.